Skip to content
gist.link ↗

agentSession

Query Deploy API — POST https://deploy.api.gist.link/graphql

One agent session plus its messages. Pass afterSequence to fetch only messages newer than those already loaded (the chat panel’s poll loop).

deploy:query:agentSession

The calling IAM key must hold this permission (or a wildcard that covers it: deploy:query:* or deploy:*) and the access token must have been minted with audience=deploy. See Permissions.

type Query {
agentSession(id: Int!, afterSequence: Int): AgentSessionDetail
}
Argument Type Required Description
id Int! Yes —
afterSequence Int No —

AgentSessionDetail — see the Deploy types reference.

Terminal window
curl https://deploy.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query AgentSession($id: Int!, $afterSequence: Int) { agentSession(id: $id, afterSequence: $afterSequence) { session { id uuid status created_at updated_at } messages { id sequence role content tool_calls tool_results created_at } } }",
"variables": {
"id": 10,
"afterSequence": 10
}
}
JSON