Agent Management
Register agents, list and read them, rotate credentials, and suspend, resume, or revoke agents through the control plane.
Agent routes manage machine principals and their Ed25519 public keys. Lifecycle semantics are described in Credential lifecycle.
| Operation | Roles |
|---|---|
| List and read agents | Any member |
| Register | owner, admin, operator |
| Suspend, resume, revoke, rotate | owner, admin |
The agent record
{
"id": "3f2b8c1e-6a4d-4f7e-9b21-5c8d0e7a4b13",
"organization_id": "9a7e5d2c-1b3f-4c6a-8e0d-2f4b6a8c0e1d",
"name": "billing-agent",
"framework": "langgraph",
"status": "active",
"credential_status": "active",
"registered_at": "2026-11-30T12:00:00.000Z",
"last_activity_at": null
}| Field | Values |
|---|---|
status | active, suspended, revoked |
credential_status | active, rotated, revoked, none |
framework | langchain, langgraph, crewai, openai_agents, python, typescript, mcp, custom |
Register an agent
public_key is the 32-byte Ed25519 public key as 43 characters of unpadded base64url, for example from agentshield_sdk.public_key(seed) or publicKey(seed). Registration appends agent.registered.
/api/v1/agentsRegister an agent public key
Stores the raw Ed25519 public key. Secret key fields are rejected. The caller must be an owner, admin, or operator.
Request body · required
namestringrequiredmin length 1 · max length 128
frameworkstringrequiredone of
langchain,langgraph,crewai,openai_agents,python,typescript,mcp,custompublic_keystringrequiredUnpadded base64url of the raw 32-byte Ed25519 public key.
pattern
^[A-Za-z0-9_-]{43}$
Responses
201AgentRegistered agent
400ErrorBodyError
401ErrorBodyError
curl -X POST "http://127.0.0.1:8080/api/v1/agents" \
-H "Authorization: Bearer $AGENTSHIELD_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @body.jsonExamples are generated from the schema. Values are placeholders.
Conflicts return 409: a name already used in the organization, or a public key already registered anywhere.
List and read
GET /api/v1/agents returns agents newest first and accepts limit and cursor.
/api/v1/agentsList agents in the caller's organization
The organization comes from the session.
Parameters
limitquery · integermin 1 · max 200
cursorquery · string
Responses
200AgentPageAgent page
401ErrorBodyError
curl -X GET "http://127.0.0.1:8080/api/v1/agents" \
-H "Authorization: Bearer $AGENTSHIELD_TOKEN"Examples are generated from the schema. Values are placeholders.
/api/v1/agents/{agentId}Get one agent
Returns 404 when the agent is outside the caller's organization.
Parameters
agentIdpath · string (uuid)required
Responses
200AgentAgent
404ErrorBodyError
curl -X GET "http://127.0.0.1:8080/api/v1/agents/$AGENT_ID" \
-H "Authorization: Bearer $AGENTSHIELD_TOKEN"Examples are generated from the schema. Values are placeholders.
Rotate a credential
/api/v1/agents/{agentId}/credentials/rotateAdd a new public key and mark the previous key rotated
The server stores the public key only and marks the previous active key rotated.
Parameters
agentIdpath · string (uuid)required
Request body · required
public_keystringrequiredpattern
^[A-Za-z0-9_-]{43}$
Responses
201CredentialNew credential metadata
curl -X POST "http://127.0.0.1:8080/api/v1/agents/$AGENT_ID/credentials/rotate" \
-H "Authorization: Bearer $AGENTSHIELD_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @body.jsonExamples are generated from the schema. Values are placeholders.
Suspend, resume, revoke
/api/v1/agents/{agentId}/suspendSuspend an agent without retiring its key
The key stays active and the agent cannot call the gateway until a later phase resumes it.
Parameters
agentIdpath · string (uuid)required
Responses
200AgentSuspended agent
curl -X POST "http://127.0.0.1:8080/api/v1/agents/$AGENT_ID/suspend" \
-H "Authorization: Bearer $AGENTSHIELD_TOKEN"Examples are generated from the schema. Values are placeholders.
/api/v1/agents/{agentId}/resumeLet a suspended agent call again
Implemented for owner and admin. A revoked agent stays revoked and returns 409.
Parameters
agentIdpath · string (uuid)required
Responses
200AgentAgent is active
409ErrorBodyThe agent is revoked
curl -X POST "http://127.0.0.1:8080/api/v1/agents/$AGENT_ID/resume" \
-H "Authorization: Bearer $AGENTSHIELD_TOKEN"Examples are generated from the schema. Values are placeholders.
/api/v1/agents/{agentId}/revokeRevoke an agent and its active credentials
Revocation is permanent for the agent and its credential records.
Parameters
agentIdpath · string (uuid)required
Responses
200AgentRevoked agent
404ErrorBodyError
curl -X POST "http://127.0.0.1:8080/api/v1/agents/$AGENT_ID/revoke" \
-H "Authorization: Bearer $AGENTSHIELD_TOKEN"Examples are generated from the schema. Values are placeholders.
Revocation is permanent
A revoked agent cannot be resumed or rotated. Register a new agent to continue the workload.
Was this page helpful?