Skip to main content
Python SDK Reference / Server / Server Memory Context Store / InMemoryContextStore
from agentstack_sdk.server.store.memory_context_store import InMemoryContextStore
Bases: ContextStore

Methods

Initialize in-memory context store with TTL cache.Args: max_contexts: Maximum number of contexts to keep in memory ttl_seconds: Time-to-live for context instances in seconds (default: 1 hour) Parameters
NameTypeDefault
max_contextsint1000
context_ttltimedeltatimedelta(hours=1)
Parameters
NameTypeDefault
context_idstr
initialized_dependencieslist[Dependency]
Returns: ContextStoreInstance