Skip to content

Comments

feat: add SQLite session persistence for agent-framework#184

Merged
cristipufu merged 1 commit intomainfrom
feat/agent-framework-session-persistence
Feb 19, 2026
Merged

feat: add SQLite session persistence for agent-framework#184
cristipufu merged 1 commit intomainfrom
feat/agent-framework-session-persistence

Conversation

@cristipufu
Copy link
Member

Summary

  • Add SqliteSessionStore for persisting AgentSession state between turns, keyed by runtime_id
  • Factory manages a shared store singleton (lazy init with async lock, DB path from context.resolved_state_file_path)
  • Runtime loads session before execute()/stream() and saves after, passing session=session to agent.run()
  • Agent Framework's InMemoryHistoryProvider auto-injects and accumulates conversation history in session.state
  • Add aiosqlite dependency and 10 tests covering save/load, isolation, roundtrip, auto-setup, and reconnect

Test plan

  • mypy passes (0 errors, 21 source files)
  • ruff check passes
  • ruff format passes
  • pytest passes (39/39 — 29 existing + 10 new storage tests)
  • Manual test: multi-turn conversation persists history across calls
  • Manual test: different runtime_ids have isolated sessions

🤖 Generated with Claude Code

Add SqliteSessionStore to persist AgentSession state between turns,
keyed by runtime_id. Each runtime gets isolated conversation history
via Agent Framework's auto-injected InMemoryHistoryProvider. The
factory manages a shared store singleton and the runtime loads/saves
sessions around each execute/stream call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cristipufu cristipufu merged commit 6cc77ae into main Feb 19, 2026
46 checks passed
@cristipufu cristipufu deleted the feat/agent-framework-session-persistence branch February 19, 2026 11:31
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