# Check that one of your agents can work

> Page: https://docs.plotwork.dev/api/post-user-agents-id-check. Index of every page: https://docs.plotwork.dev/llms.txt

Runs every rule the agent's next call would meet, on the server, and answers each one and the agent as it stands.

`POST /user/agents/{id}/check`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Check that one of your agents can work. |
| What does it take? | `id` in the path. |
| What does it return? | Status 200 with a body of type [`AgentCheck`](https://docs.plotwork.dev/api/schemas.md#agentcheck). |
| What can go wrong? | `401` not signed in; `403` the origin may not make changes; `404` no such agent of yours; `429` too many requests. Every failure uses the one error envelope. |

## What it does

Runs every rule the agent's next call would meet, on the server, and answers each one and the agent as it stands.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | `string` | yes |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | Every check, and the agent. | [`AgentCheck`](https://docs.plotwork.dev/api/schemas.md#agentcheck) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | The origin may not make changes. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such agent of yours. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`AgentCheck`](https://docs.plotwork.dev/api/schemas.md#agentcheck).

| Field | Type | Required | Description |
|---|---|---|---|
| `agent` | `Agent` | yes |  |
| `agent.id` | `string` | yes |  |
| `agent.credential` | `"oauth" \| "key"` | yes | How it signs in: a browser sign-in (OAuth) or an API key in its settings. |
| `agent.name` | `string` | yes | The connection's registered agent name, or the key's name. |
| `agent.agent` | `object \| null` | yes | What the agent called itself (`clientInfo`) when it last opened an MCP session, or null when it never has. |
| `agent.agent.name` | `string` | yes |  |
| `agent.agent.version` | `string \| null` | yes |  |
| `agent.orgId` | `string \| null` | yes |  |
| `agent.createdAt` | `integer` | yes |  |
| `agent.lastUsedAt` | `integer \| null` | yes | Its last call, to within five minutes. |
| `agent.sessionAt` | `integer \| null` | yes | When it last opened an MCP session. |
| `agent.expiresAt` | `integer \| null` | yes |  |
| `agent.status` | `"live" \| "ready" \| "idle" \| "waiting" \| "blocked"` | yes | `live`: a call in the last 15 minutes. `ready`: in the last 30 days. `idle`: earlier. `waiting`: never used. `blocked`: its next call would be refused, and `blocked` says why. |
| `agent.blocked` | `"expired" \| "network" \| "two_factor" \| "membership" \| "policy" \| null` | yes |  |
| `checks` | `object[]` | yes | Every rule its next call would meet, in the order it meets them. |
| `checks[].id` | `"credential" \| "expiry" \| "network" \| "organisation" \| "two_factor" \| "policy" \| "allowance"` | yes |  |
| `checks[].ok` | `boolean` | yes |  |
| `remaining` | `integer` | yes | Calls left today on the allowance it spends. |
| `checkedAt` | `integer` | yes |  |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
