---
title: "Run agent"
method: POST
path: "/api/v0/agent/sessions/{session_id}/run"
tags: ["Agent"]
---

# Run agent

`POST /api/v0/agent/sessions/{session_id}/run`

Run the agent with a user message. Returns job_status_id for polling.

## Path parameters

- `session_id` string, uuid, required

## Request body

- AgentRunRequest — Request body for running the agent.
  - `message` string, required — The user's input message.
  - `attachment_ids` string[], nullable — Public IDs of uploaded attachments to include with the message. Max 8.

## Response `200`

Successful Response

- AgentRunPostResponse — Response for creating an agent run.
  - `run_id` string, uuid, required — The ID of the created run.
  - `job_status_id` string, uuid, required — The job status ID for polling completion.
  - `session_id` string, uuid, required — The ID of the session.
  - `status` string, required — The initial status of the run.

## Other responses

- `422` — Validation Error

---

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