Back to catalog / Agent memory
Validate a custom session store with the conformance suite
Run the SDK’s SessionStore contract suite before connecting an external transcript backend.
Goal
Verify that a custom persistence layer satisfies SDK behavior for appending, loading, and deleting sessions.
Steps
- Implement the
SessionStoreinterface with append/load/delete behavior matching the protocol. [stores] - Write a
pytest.mark.anyiotest callingrun_session_store_conformance(lambda: MyStore(...)). [stores] - After the contract passes, test client resume with a controlled session and separately load-test resilience. [stores]
How to verify
All 13 behavioral contracts pass; resume rebuilds the same session transcript without silent data loss.
Troubleshooting
If a test fails, inspect ordering, idempotency, and delete boundaries; passing contracts does not validate production load.
Permissions
Prerequisites
- Python 3.10+, SDK, pytest and anyio test dependencies, and the custom store backend client.
Permissions
- Use synthetic transcript fixtures; real storage needs private access controls and an explicit retention period.
Limitations
The README labels adapters as reference implementations, not maintained production code; conformance does not replace resilience or concurrency testing.
Pinned upstream source
- Repository
- anthropics/claude-agent-sdk-python
- File path
- examples/session_stores/README.md
- Pinned commit
b6e9d12fe1cc98dde988ab7b7713c1feeee50c6c- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Take a coding Agent change from context to verification