Monitor Sessions
Observe live AI agent sessions and revoke them instantly — suspend or terminate with a single call.
A Session is a live, observable, revocable run of an AI agent. Sessions are how you answer "what is running right now, and can I stop it?" — the core of AI incident response.
1. Start a session#
In production a session is opened by the runtime when an agent begins work. You can also create one directly (useful for testing and for integrations that report their own sessions):
curl -X POST "https://your-company.authspoke.com/api/v1/ai/sessions" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{
"agentName": "support-copilot",
"agentId": "…",
"status": "ACTIVE",
"toolCallsInFlight": 3,
"mcpConnections": 1,
"clientIp": "203.0.113.9"
}'
Capture the returned sessionId. Creating a session emits a SESSION_STARTED event.
2. Suspend (revocable pause)#
curl -X POST "https://your-company.authspoke.com/api/v1/ai/sessions/$SID/suspend" -H "Authorization: Bearer $TOKEN"
Status → SUSPENDED, in-flight tool calls and MCP connections drop to 0. Emits SESSION_SUSPENDED.
3. Terminate (instant kill)#
curl -X POST "https://your-company.authspoke.com/api/v1/ai/sessions/$SID/terminate" -H "Authorization: Bearer $TOKEN"
Status → TERMINATED, counters zeroed, SESSION_TERMINATED (WARNING) recorded. This is your single-session break-glass.
4. Observe#
curl -s "https://your-company.authspoke.com/api/v1/ai/sessions" -H "Authorization: Bearer $TOKEN" \
| jq '.[] | {agentName, status, toolCallsInFlight, mcpConnections, clientIp}'
Session status values: ACTIVE, SUSPENDED, TERMINATED, EXPIRED.
Session vs. kill switch#
| Action | Scope | Use when |
|---|---|---|
| Terminate a session | One agent run | A specific agent is misbehaving |
| Kill switch | Whole tenant, a class of action | Stop all agent execution / MCP / external LLM at once |
Console#
Enterprise AI → Sessions streams active sessions with in-flight tool calls and MCP connections. Terminate and Suspend act instantly.