# agentRun (/api/reference/queries/agent-run)

One agent run by id, or null when the workspace has no such run. Poll it every few seconds while its `status` is `PENDING` or `RUNNING`.

```graphql
agentRun(
  id: ID!
): AgentRun
```

### Arguments [#arguments]

#### [`agentRun.id`](#id) · [`ID!`](/api/reference/scalars/id) `non-null` `scalar` [#id]
The run's id.

### Type [#type]

#### [`AgentRun`](/api/reference/objects/agent-run) `object` [#agentrun-object]
One piece of work an agent did, or is doing. A sourcing run also keeps a timeline of what happened and the full log of the process.