Docs

Agent Sessions

GET
/v1/agent-sessions

List ai-agent monitor sessions for this workspace. Newest first, capped at 50.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

curl -X GET "https://example.com/v1/agent-sessions"
{  "sessions": [    {      "id": "string",      "triggerType": "string",      "subjectId": "string",      "subject": {        "deploymentName": "string",        "deploymentGroupId": "string",        "deploymentGroupName": "string",        "releaseId": "string",        "releaseCommitMessage": "string",        "releaseCommitRef": "string",        "projectId": "string",        "projectName": "string"      },      "status": "string",      "createdAt": "string",      "updatedAt": "string"    }  ]}
GET
/v1/agent-sessions/{id}

Retrieve one ai-agent monitor session by id.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/agent-sessions/string"
{  "id": "string",  "triggerType": "string",  "subjectId": "string",  "subject": {    "deploymentName": "string",    "deploymentGroupId": "string",    "deploymentGroupName": "string",    "releaseId": "string",    "releaseCommitMessage": "string",    "releaseCommitRef": "string",    "projectId": "string",    "projectName": "string"  },  "status": "string",  "createdAt": "string",  "updatedAt": "string",  "resultText": "string",  "toolNames": [    "string"  ],  "error": "string",  "pendingApproval": {    "approvalId": "string",    "toolCallId": "string",    "toolName": "string",    "input": null  }}
GET
/v1/agent-sessions/{id}/events

Incrementally read a session's event log (steps, tool calls, report deltas, approvals, status transitions). Pass the previous response's latestSeq as after to fetch only new events.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100
after?|
Range0 <= value
Default0
limit?integer
Range1 <= value <= 500
Default200

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/agent-sessions/string/events"
{  "events": [    {      "seq": 0,      "createdAt": "string",      "type": "status",      "payload": {        "status": "string",        "error": "string"      }    }  ],  "latestSeq": 0,  "hasMore": true}
POST
/v1/agent-sessions/{id}/approve

Approve a halted ai-agent monitor session. Proxies to the ai-agent service, minting a fresh CLI session for the caller so the ai-agent's own auth applies.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/agent-sessions/string/approve"
{  "jobId": "string",  "status": "string",  "resumed": true}
POST
/v1/agent-sessions/{id}/stop

Stop (cancel) a running, queued, or halted ai-agent monitor session. Proxies to the ai-agent service, minting a fresh CLI session for the caller so the ai-agent's own auth applies. Idempotent — stopping an already-terminal session is a 200 no-op.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/agent-sessions/string/stop"
{  "jobId": "string",  "status": "string",  "canceled": true}