---
title: "Record agent run"
method: POST
path: "/api/v1/agents/runs"
tags: ["agents"]
---

# Record agent run

`POST /api/v1/agents/runs`

## Request body

- RecordRunRequest
  - `agent_mrn` string
  - `ended_at` string
  - `error` string
  - `model` string
  - `observed_assets` string[]
  - `run_id` string
  - `started_at` string
  - `status` string
  - `tokens_in` integer
  - `tokens_out` integer
  - `tool_calls` ToolCallPayload[]
    - `duration_ms` integer
    - `started_at` string
    - `status` string
    - `target_mrn` string
    - `tool_name` string

## Response `201`

Created

- AgentRun
  - `agent_id` string
  - `created_at` string
  - `duration_ms` integer
  - `ended_at` string
  - `error` string
  - `id` string
  - `model` string
  - `run_id` string
  - `started_at` string
  - `status` string
  - `tokens_in` integer
  - `tokens_out` integer
  - `tool_calls` ToolCall[]
    - `duration_ms` integer
    - `ordinal` integer
    - `started_at` string
    - `status` string
    - `target_mrn` string
    - `tool_name` string

## Changes

> 56 revisions in range; 1 not diffed.

- **2026-08-24** `0bd802afff21` — 2 info
  - the endpoint scheme security `ApiKeyAuth` was added to the API
  - the endpoint scheme security `BearerAuth` was added to the API

[Change history](https://skmtc.dev/marmotdata/apis/marmot-api/changes/api/v1/agents/runs/post.md)

---

[API](https://skmtc.dev/marmotdata/apis/marmot-api.md) · [All operations](https://skmtc.dev/marmotdata/apis/marmot-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/marmotdata/marmot-api/revisions/0bd802afff21/schema)
