Skip to content
gist.link ↗

sendAgentMessage

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

Append a user message to a project’s agent conversation and run the agent loop. Starts a new session when sessionId is omitted; reuses the session otherwise. Rejected while the session is already running. modelOption (an agentModelOptions id) switches the session’s model from this turn on; omitted keeps the session’s current choice. ROLE_ADMIN or ROLE_DEPLOY_MANAGER.

deploy:mutation:sendAgentMessage

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

type Mutation {
sendAgentMessage(projectId: Int!, sessionId: Int, content: String!, modelOption: String): AgentSession!
}
Argument Type Required Description
projectId Int! Yes —
sessionId Int No —
content String! Yes —
modelOption String No —

AgentSession! — 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": "mutation SendAgentMessage($projectId: Int!, $sessionId: Int, $content: String!, $modelOption: String) { sendAgentMessage(projectId: $projectId, sessionId: $sessionId, content: $content, modelOption: $modelOption) { id uuid status created_at updated_at } }",
"variables": {
"projectId": 10,
"sessionId": 10,
"content": "example",
"modelOption": "example"
}
}
JSON