Skip to content

Retire an agent: off duty for good, its keys revoked and its own credentials deleted

POST
/api/v1/agents/{name}/retire
curl --request POST \
--url http://localhost:11044/api/v1/agents/example/retire \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "reason": "example" }'

Final. Its record of runs and receipts is kept.

name
required
string

The agent’s name

reason, optional, is recorded (trimmed) with the retirement for whoever reads the agent later; send {} to retire without one

Media typeapplication/json

Why an agent is being retired, sent to POST /agents/{name}/retire

object
reason
required

The reason, recorded with the retirement after trimming; may be empty

string

Example generated

{
"reason": "example"
}

What was revoked

Media typeapplication/json

What retiring an agent took with it, as POST /agents/{name}/retire answers: the agent is off duty for good and its record is kept

object
agent
required

Name of the agent that was retired

string
keysRevoked
required

How many of your API keys were revoked because they could talk to this agent, including keys scoped to other agents as well

integer format: int32
slotsDeleted
required

How many of the agent’s own credential slots (its own-account secrets) were deleted from your wallet

integer format: int32

Example generated

{
"agent": "example",
"keysRevoked": 1,
"slotsDeleted": 1
}

No authenticated principal

One of:

A refusal with a machine-readable code and a plain-language message. ApiErrorAdvice answers it for a failed validation, a missing resource or a conflicting state, and some controllers answer it directly

object
code
required

Machine-readable key to branch on, such as validation_failed, unknown_field, not_found or conflict. Open: a surface may answer codes of its own

string
detail

Extra context where there is some, such as the fields a body may carry; null otherwise

string
message
required

A plain-language explanation, written to be shown. Never carries an exception message

string

Example generated

{
"code": "example",
"detail": "example",
"message": "example"
}

No such agent in your world