Sessions are the top-level containers for all agent interactions. They persist state, memory, and history.
Create Session
Unique identifier for the agent (e.g.,
finance_bot_v1).Arbitrary JSON key-value pairs for application context (e.g., user tier, region).
The starting state payload for the session.
Time-to-live in seconds. Default is 24 hours. Max is 30 days.
The unique session ID (e.g.,
sess_01H...).ISO 8601 timestamp when the session will auto-delete.
Get Session
Retrieve the full context including current state.The ID of the session to retrieve.
Get Session Context
The primary endpoint for building your agent’s prompt. It performs a parallel lookup of the current State, relevant Semantic Memories (via vector search), and the most recent N turns.The ID of the session to retrieve.
The search query for semantic memory retrieval (usually the user’s current input).
Number of semantic memories to retrieve.
Number of recent conversation turns to include.
Delete Session
Permanently remove a session and all its distributed state (Redis + Postgres + Vector DB).The ID of the session to delete.