09 , sessions
A session is the governance boundary around a single agent interaction. It tracks everything from the moment the agent starts working to the moment it finishes: what tools it called, how much budget it consumed, what its declared purpose was, and whether it stayed within bounds.
Sessions solve a fundamental problem: without them, an agent could accumulate unlimited cost or call volume across multiple interactions, and there would be no way to attribute decisions to a specific task. Sessions give you a container for accountability.
Every session has four properties: a unique ID, a purpose declaration (what the agent says it's doing), a budget envelope (maximum calls and cost), and a status (open, closed, or budget-exhausted). When the budget runs out, all subsequent tool calls within that session are denied immediately , the agent cannot bypass this by requesting more budget.
Open a session, execute governed tool calls within it, then close it. All decisions are attributed to the session for audit and cost tracking.
Start a new session with a purpose and budget constraints.
Close the session when the task is complete. Remaining budget is released.
Show all active and recently closed sessions.
See how much budget remains in a session.
Detailed session state including decision history and budget usage.
Update the purpose declaration on an active session.
Session budgets are enforced at the daemon level. Even if the agent SDK does not track costs, the daemon will deny calls once the budget is exhausted.
Need help? Use any of these support options.