Creating a Session
- Resolves
agentTypeto adeployment_id(latest version) - Creates instance on Podium (via gateway → coordinator)
- Establishes native protocol WebSocket to the coordinator at
/agent/{instanceId} - Creates session database (
data/sessions/{id}/session.db) - Notifies client with
thread/started
Resuming a Session
Turn Processing
Data Persistence
Every session event is persisted to the session’s SQLite database:session.db tables
| Table | Contents |
|---|---|
turns | Turn metadata (id, started_at, completed_at, token_usage) |
elements | Content elements (text, tool calls, file changes) |
messages | User and agent messages |
approvals | Approval requests and responses |
diffs | File diffs produced during turns |
plans | Agent plans |
memory.db tables
| Table | Contents |
|---|---|
memories | Agent memory entries (key-value with metadata) |
summaries | Conversation summaries |
Session Cleanup
When a thread is deleted or archived:- Agent instance is stopped on Podium
- Native protocol WebSocket to Podium is closed
- Session databases are preserved (for archived) or deleted
- Litestream replicas persist in S3 for recovery