Aller au contenu
login
arrow_backRetour aux issues
agentdecksdk/agentdeck #366

docs: add a session-persistence example across process restarts

ecoDébutant documentation good first issue area:docs

descriptionDescription

## Context AgentDeck preserves conversational history across turns using `session_id`, durable event stores (`AGENTDECK_EVENTS`), and checkpoint storage (`AGENTDECK_CHECKPOINT`). ## Current state - Existing examples run sequential in-memory turns inside a single script run. - There is no example demonstrating session resumption across distinct process invocations. - Users frequently hit the mismatch where events default to memory while checkpoints default to SQLite. ## What is missing A minimal worked example under `examples/session-persistence/` (`run.py`, `.agentdeck/`, `README.md`) and a corresponding guide page in `docs-site/content/guides/session-persistence.mdx` demonstrating how conversation state persists and resumes across separate process runs using SQLite. ## Expected contribution 1. `examples/session-persistence/run.py` executing turn 1, exiting, and resuming turn 2 with the same `session_id` to verify recalled state. 2. `examples/session-persistence/README.md` detailing storage configuration and environment variable setup. 3. `docs-site/content/guides/session-persistence.mdx` walking through multi-turn session persistence. ## Relevant APIs and source files - `agentdeck/deck.py` - `Deck.run(session_id=...)` - `agentdeck/runtime/settings.py` - `AGENTDECK_EVENTS` and `AGENTDECK_CHECKPOINT` - `docs-site/content/resources/known-issues.mdx` - events and checkpoint durability relationship ## Files to change - `examples/session-persistence/` (new directory) - `docs-site/content/guides/session-persistence.mdx` (new guide page) ## Acceptance criteria - [ ] Uses only public APIs from `agentdeck` - [ ] Any code shown runs against the current release - [ ] Demonstrates conversation continuity across process restarts - [ ] Explicitly configures matching durable event store and checkpoint backends - [ ] Includes expected terminal output in `README.md` - [ ] Does not duplicate the Quickstart - [ ] Links the related reference page - [ ] `make check` passes - [ ] `docs-site` builds ## Out of scope - No API redesign - No new runtime behavior - No changes to store adapters ## How to verify locally ```bash make install make check cd examples/session-persistence && python run.py cd docs-site npm install npm run dev ``` ## Difficulty small
codeOuvre sur GitHub