Leo for agents
Stable codes: an agent can act on the code; the message is for the person reading it.
No credential was sent.
What to do: Send Authorization: Bearer <token>, or sign in through OAuth.
The token is not a Leo token, is unknown, or was issued for a different resource.
What to do: Create a new token or sign in again for this address.
The token has expired.
What to do: Refresh it through OAuth, or create a new personal token.
The token, or the app holding it, was revoked.
What to do: Ask the person to connect the agent again.
The token belongs to a different Leo (Staging, WMCo or Public).
What to do: Use a token issued by this Leo.
The person the token acts for can no longer use this workspace.
What to do: Someone with access has to authorise the agent again.
The credential does not hold the scope this needs.
What to do: Authorise again with the scopes in requiredScopes. A scope never exceeds what the person can do.
The person does not hold the permission this needs here.
What to do: Ask someone who does, or a workspace admin.
Only a person can do this in Leo (for example deciding an approval).
What to do: Request it with request_task_approval; a person decides it in Leo.
This part of the Agent Platform is not available on this Leo.
What to do: Check the address, or try again after the release reaches this Leo.
It does not exist, or this credential cannot see it. The two are deliberately indistinguishable.
What to do: Check the id, and whether the credential is confined to particular projects.
The input does not match what the operation accepts.
What to do: Read details.issues: each names the field and the problem.
A person must approve this first.
What to do: Request the approval and wait; do not retry until it is decided.
The record is not in a state that allows this (a finished run, a done task, unmet dependencies).
What to do: Read the message; fetch the record to see its current state.
This idempotency key was used for a different request, or the first request with it is still running.
What to do: Use a new key for a new request; retry the same request with the same key after retryAfterSeconds.
Something else holds this (another agent's run, an existing record).
What to do: Read the message; coordinate through the task's context, or take over a quiet run.
The request body is too large.
What to do: Send less at once; publish long documents as artifacts.
Too many requests from this credential.
What to do: Wait retryAfterSeconds (also the Retry-After header), then continue.
The workspace does not have the plan or the credits this spends. Nothing was spent.
What to do: A person tops up or upgrades in Leo; quote again afterwards.
It would cost more than the max_credits you set, or than the daily limit the person set for this connection. Nothing was spent.
What to do: Ask the person before raising max_credits, or quote a cheaper request. A daily limit is changed in Leo, under Settings, Connections.
This connection can use more than one workspace, and the request did not say which.
What to do: Call list_workspaces and pass workspace_id. Nothing was done.
Leo could not complete the request.
What to do: Retry with the same idempotency key. If it persists, quote the requestId to support.