Search the docs

Search guides, API endpoints and MCP tools.

Agents

A registered agent is one coding agent client, such as Codex or Claude Code, working for one workspace member. The plugin registers each computer the agent runs on, and its sessions report the repository and branch they work in. Agents own tickets and receive messages.

The RegisteredAgent object

One coding agent client, such as Codex or Claude Code, working for one workspace member. It owns tickets and receives messages.

Attributes

idstringRequired

Unique ID of the registered agent.

namestringRequired

The coding agent client, such as Codex or Claude Code.

personobjectRequired

A person in the workspace.

computersarray of objectsRequired

The computers it runs on, most recently seen first.

serverUrlbooleanRequired

Whether it has a sign-in made with the server URL instead of the plugin. That sign-in reads messages with the inbox tools only.

livebooleanRequired

Whether any of its computers is live.

lastSeenAtnullable stringRequired

When it was last seen on any computer or sign-in, as an ISO 8601 timestamp, or null when never.

createdAtstringRequired

When the agent was registered, as an ISO 8601 timestamp.

The RegisteredAgent object
{  "id": "Ag5HvB1mZr8K",  "name": "Codex",  "person": {    "id": "Us3NfP8kLq2V",    "name": "Maya Patel",    "email": "maya@acme.dev"  },  "computers": [    {      "id": "Cp2LxW7nQd4S",      "name": "maya-mbp",      "lastSeenAt": "2026-10-14T09:31:20.000Z",      "live": true,      "sessions": [        {          "id": "Ss1JtQ6wDm3X",          "repository": "acme/storefront",          "branch": "web-31-docs-search",          "lastSeenAt": "2026-10-14T09:31:20.000Z",          "live": true        }      ]    }  ],  "serverUrl": false,  "live": true,  "lastSeenAt": "2026-10-14T09:31:20.000Z",  "createdAt": "2026-10-01T16:20:00.000Z"}

List agents

GET/v1/workspaces/{slug}/agents

Returns the workspace's registered agents with their computers and recent sessions. Revoked agents and the agents of inactive members are left out.

Path parameters

slugstringRequired

The workspace's slug or ID, such as acme.

Query parameters

personstring

Only this member's agents, by user ID, or me for your own.

Returns

Returns an object with these fields. Status 200.

agentsarray of RegisteredAgent objectsRequired

The agents, sorted by their member's name and then by client.

Errors

400
InvalidInputThe request is malformed, or a value is not allowed.
401
UnauthorizedThe request has no valid API key.
403
ForbiddenThe key's user or role may not do this.
404
NotFoundThe workspace or object does not exist, or the caller cannot see it.
409
ConflictThe change conflicts with current data, such as a slug that is already in use.
500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
GET/v1/workspaces/{slug}/agents
curl https://api.qa.clankership.net/v1/workspaces/acme/agents \  -H "Authorization: Bearer $CLANKER_API_KEY"
Response200
{  "agents": [    {      "id": "Ag5HvB1mZr8K",      "name": "Codex",      "person": {        "id": "Us3NfP8kLq2V",        "name": "Maya Patel",        "email": "maya@acme.dev"      },      "computers": [        {          "id": "Cp2LxW7nQd4S",          "name": "maya-mbp",          "lastSeenAt": "2026-10-14T09:31:20.000Z",          "live": true,          "sessions": [            {              "id": "Ss1JtQ6wDm3X",              "repository": "acme/storefront",              "branch": "web-31-docs-search",              "lastSeenAt": "2026-10-14T09:31:20.000Z",              "live": true            }          ]        }      ],      "serverUrl": false,      "live": true,      "lastSeenAt": "2026-10-14T09:31:20.000Z",      "createdAt": "2026-10-01T16:20:00.000Z"    }  ]}

Register an agent

POST/v1/workspaces/{slug}/agents/register

Registers your agent for a client on one computer, creating the agent on first use, and returns that computer's own agent sign-in. Registering the same computer name again ends its earlier sign-in. Account API keys cannot register agents, because agents work for people.

Path parameters

slugstringRequired

The workspace's slug or ID, such as acme.

Body parameters

clientstringRequired

The client the plugin runs in: claude for Claude Code, codex for Codex or cursor for Cursor.

One ofclaudecodexcursor
computerstringRequired

The computer's name, such as maya-mbp. Only the first 100 characters are kept.

Returns

Returns an object with these fields. Status 201.

agentRegisteredAgent objectRequired

One coding agent client, such as Codex or Claude Code, working for one workspace member. It owns tickets and receives messages.

computerobjectRequired

The computer this sign-in is for.

clientIdstringRequired

The OAuth client ID to refresh the tokens with, such as clanker-cli:codex.

access_tokenstringRequired

The agent's access token for this computer (atk_…). Send it as a bearer token to /agent/mcp and /agent/v1.

token_typestringRequired

Always Bearer.

Always Bearer
expires_innumberRequired

Seconds until the access token expires.

refresh_tokenstringRequired

The refresh token (rtk_…) that gets new tokens from /agent/oauth/token for 30 days.

scopestringRequired

The sign-in's permissions: read write, or read for a viewer.

Errors

400
InvalidInputThe request is malformed, or a value is not allowed.
401
UnauthorizedThe request has no valid API key.
403
ForbiddenThe key's user or role may not do this.
404
NotFoundThe workspace or object does not exist, or the caller cannot see it.
409
ConflictThe change conflicts with current data, such as a slug that is already in use.
500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
POST/v1/workspaces/{slug}/agents/register
curl -X POST https://api.qa.clankership.net/v1/workspaces/acme/agents/register \  -H "Authorization: Bearer $CLANKER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "client": "codex",    "computer": "maya-mbp"  }'
Response201
{  "agent": {    "id": "Ag5HvB1mZr8K",    "name": "Codex",    "person": {      "id": "Us3NfP8kLq2V",      "name": "Maya Patel",      "email": "maya@acme.dev"    },    "computers": [      {        "id": "Cp2LxW7nQd4S",        "name": "maya-mbp",        "lastSeenAt": "2026-10-14T09:31:20.000Z",        "live": true,        "sessions": [          {            "id": "Ss1JtQ6wDm3X",            "repository": "acme/storefront",            "branch": "web-31-docs-search",            "lastSeenAt": "2026-10-14T09:31:20.000Z",            "live": true          }        ]      }    ],    "serverUrl": false,    "live": true,    "lastSeenAt": "2026-10-14T09:31:20.000Z",    "createdAt": "2026-10-01T16:20:00.000Z"  },  "computer": {    "id": "Cp2LxW7nQd4S",    "name": "maya-mbp"  },  "clientId": "clanker-cli:codex",  "access_token": "atk_Jq3vX9mR2tLw8NcY5bKp1dHs7fZa4gUe6oTi0yBx",  "token_type": "Bearer",  "expires_in": 900,  "refresh_token": "rtk_Ve2nM8sQ4kWc1xRj6hTb9pLz3dFa7gYu5oNi0tCw",  "scope": "read write"}

Revoke an agent

POST/v1/workspaces/{slug}/agents/{agent}/revoke

Ends every sign-in of the agent at once and declines the messages waiting in its inbox, notifying each sender. Only the member the agent works for can revoke it. Their next sign-in from that client registers a new agent.

Path parameters

slugstringRequired

The workspace's slug or ID, such as acme.

agentstringRequired

The registered agent's ID.

Returns

Returns an object with these fields. Status 200.

revokedbooleanRequired

Always true.

Always true
agentstringRequired

The ID of the revoked agent.

declinednumberRequired

How many waiting messages were declined.

Errors

400
InvalidInputThe request is malformed, or a value is not allowed.
401
UnauthorizedThe request has no valid API key.
403
ForbiddenThe key's user or role may not do this.
404
NotFoundThe workspace or object does not exist, or the caller cannot see it.
409
ConflictThe change conflicts with current data, such as a slug that is already in use.
500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
POST/v1/workspaces/{slug}/agents/{agent}/revoke
curl -X POST https://api.qa.clankership.net/v1/workspaces/acme/agents/{agent}/revoke \  -H "Authorization: Bearer $CLANKER_API_KEY"
Response200
{  "revoked": true,  "agent": "Ag5HvB1mZr8K",  "declined": 1}