Retire an agent: off duty for good, its keys revoked and its own credentials deleted
const url = 'http://localhost:11044/api/v1/agents/example/retire';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The agent’s name
Request Bodyrequired
Section titled “Request Bodyrequired”reason, optional, is recorded (trimmed) with the retirement for whoever reads the agent later; send {} to retire without one
Why an agent is being retired, sent to POST /agents/{name}/retire
object
The reason, recorded with the retirement after trimming; may be empty
Example generated
{ "reason": "example"}Responses
Section titled “Responses”What was revoked
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
Name of the agent that was retired
How many of your API keys were revoked because they could talk to this agent, including keys scoped to other agents as well
How many of the agent’s own credential slots (its own-account secrets) were deleted from your wallet
Example generated
{ "agent": "example", "keysRevoked": 1, "slotsDeleted": 1}No authenticated principal
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
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
Extra context where there is some, such as the fields a body may carry; null otherwise
A plain-language explanation, written to be shown. Never carries an exception message
The body the servlet error dispatch answers for a status raised by an exception rather than written by the endpoint. Every failure except 404, which answers the not-found HTML page
object
The status’s standard reason phrase, such as Bad Request or Forbidden
The request path that failed
The HTTP status code, repeated from the status line
Example generated
{ "code": "example", "detail": "example", "message": "example"}No such agent in your world

