Skip to content

feat: v0.16.0 — Memory & Persistence#4

Merged
johnnichev merged 1 commit intomainfrom
release/v0.16.0
Mar 13, 2026
Merged

feat: v0.16.0 — Memory & Persistence#4
johnnichev merged 1 commit intomainfrom
release/v0.16.0

Conversation

@johnnichev
Copy link
Copy Markdown
Owner

Summary

  • Persistent Sessions: SessionStore protocol with 3 backends (JSON file, SQLite, Redis), TTL expiry, auto-save/load via AgentConfig
  • Summarize-on-Trim: LLM-generated summaries of trimmed messages injected as system context
  • Entity Memory: LLM-based entity extraction (person, org, project, etc.) with deduplication, LRU pruning, and system prompt injection
  • Knowledge Graph Memory: Relationship triple extraction with in-memory and SQLite storage, keyword-based querying
  • Cross-Session Knowledge: Daily logs + persistent MEMORY.md with auto-registered remember tool

Stats

  • 40 files changed, +9377 / -984 lines
  • 182 new tests (total: 1365)
  • 4 new observer events (total: 19), 5 new trace step types
  • 4 new module docs, 5 new examples (33-37)
  • Version bump: 0.15.0 -> 0.16.0

Test plan

  • pytest tests/ -k "not e2e" -x -q — 1352 passed, 0 failures
  • flake8 src/ — clean
  • mypy — passed (via pre-commit)
  • bandit — passed (via pre-commit)
  • mkdocs build — passes, no broken links
  • Verify GitHub Pages deploys after merge
  • Test PyPI publish: python3 -m build && twine upload dist/*

🤖 Generated with Claude Code

Add five new memory and persistence features:

- Persistent Sessions: SessionStore protocol with JSON file, SQLite, and
  Redis backends. Auto-save/load via AgentConfig with TTL expiry.
- Summarize-on-Trim: LLM-generated summaries of trimmed messages injected
  as system context to preserve conversation history.
- Entity Memory: LLM-based named entity extraction with deduplication,
  LRU pruning, and system prompt injection.
- Knowledge Graph Memory: Relationship triple extraction with in-memory
  and SQLite storage, keyword-based querying.
- Cross-Session Knowledge: Daily logs + persistent facts with auto-registered
  remember tool for durable memory across conversations.

Also includes:
- 4 new AgentObserver events (total: 19)
- 5 new trace step types
- 182 new tests (total: 1365)
- 4 new module docs, 5 new examples (33-37)
- Updated ARCHITECTURE, QUICKSTART, notebook, README, CHANGELOG, ROADMAP
- Version bump: 0.15.0 -> 0.16.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@johnnichev johnnichev merged commit 5bc33ad into main Mar 13, 2026
4 checks passed
@johnnichev johnnichev deleted the release/v0.16.0 branch March 13, 2026 13:00
johnnichev added a commit that referenced this pull request Mar 24, 2026
Security:
- Path traversal in JsonFileSessionStore — validate session_id (#9)
- Unicode homoglyph bypass in injection screening — NFKD + zero-width
  strip + homoglyph map (#13)

Data integrity:
- FileKnowledgeStore._save_all() atomic write via tmp + os.replace (#10)
- JsonFileSessionStore.save() atomic write (#31)

Agent core:
- astream() uses self._effective_model (was self.config.model) (#1)
- Sync _check_policy rejects async confirm_action with clear error (#2)
- Sync _streaming_call isinstance(chunk, str) guard (#18)

Providers:
- FallbackProvider stream()/astream() record success after consumption,
  not before — circuit breaker now works for streaming (#3)
- Gemini response.text ValueError catch for tool-call-only responses (#4)

Tools:
- aexecute() uses run_in_executor(None) shared executor (#5)
- execute() awaits coroutines from async tools via asyncio.run (#6)

RAG:
- Hybrid search O(n²) → O(1) via text_to_key dict lookup (#7)
- SQLiteVectorStore thread safety + WAL mode (#8)

Evals:
- OutputEvaluator catches re.error on invalid regex (#11)
- JsonValidityEvaluator respects expect_json=False (#12)

16 new regression tests. Full suite: 2000 passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant