Sessions
Agent sessions are created automatically when an MCP client makes tool calls through the Igris gateway. They group related tool calls and give you controls to stop an agent: Suspend, Resume, and Kill. Sessions track MCP tool calls only. LLM gateway traffic does not create sessions and is not affected by suspension.How Sessions Work
When the gateway receives atools/call, Igris looks for an active session for that organization and connection. If none exists, it creates one. Later calls on the same connection join that session, so there is one live session per connection on each API instance (session state is held in memory per instance).
Each session records:
- Connection — the connection slug the calls go through
- Status —
active,suspended, orcompleted - Tool call count — calls made under this session, counted from the audit trail
- Started at — when the session was created
- Ended at — set when the session is killed (
completed) - Suspended at / reason — set while the session is suspended
Suspend, Resume, and Kill
You need the
sessions:write permission to use them (Owner, Admin, Developer, and CISO roles by default; Auditors can only read). See Permissions. In the dashboard, open a session at /sessions and use the Suspend, Resume, or Kill Session button on its detail page.
Suspend
Suspension is enforced per connection, not per session ID. If any session on a connection is suspended, every tool call to that connection is refused, whichever agent or user sends it. The caller gets a JSON-RPC error with code-32000:
session_suspended event is sent to webhooks subscribed to Session Suspensions. Suspending does not write an audit event or emit an SSE event.
Kill
Kill ends one session for good. The gateway drops it, and the agent’s next tool call opens a new session. To stop an agent from calling at all, use Suspend instead. Killing a suspended session also clears its suspension. If it was the connection’s only suspended session, the connection is unblocked and the agent can call again. A session that has ended (completed) cannot be suspended, resumed, or killed again. These calls return 409.
API
Base URL:https://api.igrisecurity.com/api/v1. All requests need Authorization: Bearer <token>. Single-resource responses are wrapped in { "data": ... }, and lists return { "data": [...], "meta": { "total", "limit", "offset" } }.
Suspend a session
reason is optional (max 500 characters; defaults to “Manual suspension”).
Resume a session
Kill (terminate) a session
404 if the session doesn’t exist and 409 if it has already ended.
List and get sessions
status=active, status=suspended, or status=completed. Separate several statuses with commas. Use limit and offset to page. GET /api/v1/sessions/{id} returns one session. Both need the sessions:read permission.
Use Cases
- Incident response — immediately halt a misbehaving agent without restarting infrastructure
- Maintenance windows — suspend a connection during upstream maintenance
- Investigation — pause activity while reviewing anomaly alerts
- Cost control — stop a runaway agent racking up API costs
Related
- Policies — rules that govern what tool calls are allowed
- Anomaly Detection — automatic alerts on rate spikes and destructive patterns
- Tool Calls — how
igris.mcpcalls flow through the proxy and are audit-logged