> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Agent - POST /v1/workspaces/:workspace_id/agent/run

> Let an autonomous agent run toward a goal via POST /v1/workspaces/:workspace_id/agent/run, streamed as SSE. Minimum role viewer.

Let an autonomous (ReAct) agent run toward a goal for a number of steps, optionally applying an Agent Loadout. The response is streamed as **SSE**.

## Endpoint

```http theme={null}
POST /v1/workspaces/:workspace_id/agent/run
```

## Authentication

`Authorization: Bearer <jwt>` or `X-API-Key <sk_...>`. Minimum role: **viewer**.

## Path parameters

**workspace\_id** `string` *required*

Workspace id.

## Request body

**goal** `string` *required*

The goal the agent should achieve.

**max\_steps** `integer`

Maximum number of execution steps.

**agent\_id** `string`

Agent loadout id to apply; default capabilities when omitted.

## Response (stream)

`Content-Type: text/event-stream`. Each `data:` line is incremental text. If the goal references a loadout, the agent automatically assembles its bound KBs, memory cubes, skills, and other assets.

## Example

```bash cURL theme={null}
curl -N -X POST https://memo.ariacompute.com/v1/workspaces/ws_01a2b3c4d5e6/agent/run \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{"goal":"Summarize this week's new documents","max_steps":10,"agent_id":"agent_01a2b3c4d5e6"}'
```

```text stream theme={null}
data: Retrieving knowledge base...
data: Extracted 3 key points:
data: 1. AriaMem supports bidirectional conversion
data: 2. Memory has four tiers
data: 3. Cubes support visibility
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.