# AgentRunMetrics
Source: https://docs.maelstrom-ai.co/dev/reference/protocol/interfaces/agentrunmetrics/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

Defined in: [packages/protocol/src/lib/agent-wire.ts:146](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L146)

Counters describing the cost of one Agent Run.

The agent loop is experimental in 0.3 and may change in any minor release.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

## Properties

### elapsedMs

> **elapsedMs**: `number`

Defined in: [packages/protocol/src/lib/agent-wire.ts:152](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L152)

Wall-clock duration of the run in milliseconds.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

* * *

### inputTokens

> **inputTokens**: `number`

Defined in: [packages/protocol/src/lib/agent-wire.ts:154](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L154)

Model input tokens consumed.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

* * *

### outputTokens

> **outputTokens**: `number`

Defined in: [packages/protocol/src/lib/agent-wire.ts:156](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L156)

Model output tokens produced.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

* * *

### toolCalls

> **toolCalls**: [`AgentRunToolCallCounts`](https://docs.maelstrom-ai.co/dev/reference/protocol/interfaces/agentruntoolcallcounts/)

Defined in: [packages/protocol/src/lib/agent-wire.ts:150](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L150)

Tool calls requested and admitted across all turns.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

* * *

### turns

> **turns**: `number`

Defined in: [packages/protocol/src/lib/agent-wire.ts:148](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L148)

Loop model turns taken.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.
