{ "opencollection": "1.0.0", "info": { "name": "Public Agents Sessions API", "version": "1.0.0" }, "items": [ { "info": { "name": "Sessions", "type": "folder" }, "items": [ { "info": { "name": "List sessions", "type": "http" }, "http": { "method": "GET", "url": "https://api.gumloop.com/api/v1/agents/:agent_id/sessions", "params": [ { "name": "agent_id", "value": "", "type": "path", "description": "ID of the agent whose sessions to list." }, { "name": "page_size", "value": "", "type": "query", "description": "Number of sessions to return per page. Defaults to `20`, maximum `100`." }, { "name": "cursor", "value": "", "type": "query", "description": "Cursor for the next page of results. Use the `next_cursor` value from a previous response." }, { "name": "search", "value": "", "type": "query", "description": "Free-text search query to filter sessions by name or content. Also accepted as `search_query`." }, { "name": "sort_order", "value": "", "type": "query", "description": "Sort order for the results (e.g. `newest` or `oldest`)." }, { "name": "type", "value": "", "type": "query", "description": "Filter sessions by type (e.g. `api`, `web`, `slack`)." }, { "name": "state", "value": "", "type": "query", "description": "Filter sessions by state." }, { "name": "creator_user_id", "value": "", "type": "query", "description": "Filter sessions by the user who created them." }, { "name": "trigger_id", "value": "", "type": "query", "description": "Filter sessions by the trigger that initiated them." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "List sessions for an agent with cursor-based pagination, optional filtering, and search.\n" }, { "info": { "name": "Create session", "type": "http" }, "http": { "method": "POST", "url": "https://api.gumloop.com/api/v1/agents/:agent_id/sessions", "params": [ { "name": "agent_id", "value": "", "type": "path", "description": "ID of the agent to start a session on." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Create a new session for an agent. When `input` is provided, the message is enqueued and the agent begins processing — the response returns `202` with the session in `processing` or `queued` state. When `input` is omitted, an idle session stub is created and the response returns `201`.\n\n### Streaming the response\n\n`api.gumloop.com` only serves the non-streaming response above. To stream agent output as it's produced, send the same request body (with `stream: true`) to the streaming host instead:" }, { "info": { "name": "Retrieve session", "type": "http" }, "http": { "method": "GET", "url": "https://api.gumloop.com/api/v1/sessions/:session_id", "params": [ { "name": "session_id", "value": "", "type": "path", "description": "ID of the session to retrieve." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Retrieve a session by ID, including its messages, current state, agent metadata, and participants." }, { "info": { "name": "Send message", "type": "http" }, "http": { "method": "POST", "url": "https://api.gumloop.com/api/v1/sessions/:session_id/messages", "params": [ { "name": "session_id", "value": "", "type": "path", "description": "ID of the session to continue." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Append a user message to an existing session and resume the agent. The session must be in a terminal state (`idle`, `completed`, or `failed`); sending to a session that is `processing` or `queued` returns `409 interaction_not_in_terminal_state`.\n\n### Streaming the response\n\n`api.gumloop.com` only serves the non-streaming response above. To stream agent output as it's produced, send the same request body (with `stream: true`) to the streaming host instead:\n\n```\nPOST https://ws.gumloop.com/api/v1/" }, { "info": { "name": "Cancel session", "type": "http" }, "http": { "method": "POST", "url": "https://api.gumloop.com/api/v1/sessions/:session_id/cancel", "params": [ { "name": "session_id", "value": "", "type": "path", "description": "ID of the session to cancel." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Cancel an in-progress session. If the session is currently `processing` or `queued`, any running stream is aborted and the session is transitioned to `failed`. If the session is already `completed` or `failed`, its current state is returned unchanged.\n\nThe response carries a `session` envelope but only `id`, `agent_id`, and `state` are populated.\n" } ] } ], "bundled": true }