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

# Agents

> Interact with agents and their tasks via the API

<sup>Questions or issues? Contact us at [api-support@manus.ai](mailto:api-support@manus.ai).</sup>

Agents are custom AI entities in Manus with their own identity (nickname and description) that can be customized for specific use cases. This includes the agents you create in the Cue app. Each agent has a **main task** that serves as its persistent conversation thread. You can manage agents and interact with their tasks through the API.

Every account comes with a default **IM (Instant Messaging) agent** for general-purpose conversations. You can access it directly using [shortcuts](#shortcuts) without looking up its UUID.

## Quick start: talk to an agent

Every agent's `task_id` from [agent.list](https://open.manus.ai/docs/v2/agent.list.md) or [agent.detail](https://open.manus.ai/docs/v2/agent.detail.md) is its main task. Pass it as `task_id` to [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage.md) to talk to that agent. For the IM agent, the shortcut `agent-default-main_task` resolves to the same task, so no lookup is needed:

> [tab] cURL
>
> ```bash theme={null}
> # Send a message to the IM agent
> curl -X POST https://api.manus.ai/v2/task.sendMessage \
>   -H "Content-Type: application/json" \
>   -H "x-manus-api-key: $MANUS_API_KEY" \
>   -d '{
>     "task_id": "agent-default-main_task",
>     "message": { "content": "Summarize today's tech news" }
>   }'
> ```

> [tab] Python
>
> ```python theme={null}
> import requests
>
> response = requests.post(
>     "https://api.manus.ai/v2/task.sendMessage",
>     headers={
>         "Content-Type": "application/json",
>         "x-manus-api-key": MANUS_API_KEY,
>     },
>     json={
>         "task_id": "agent-default-main_task",
>         "message": {"content": "Summarize today's tech news"},
>     },
> )
> print(response.json())
> ```

Then poll for the agent's response:

```bash theme={null}
curl 'https://api.manus.ai/v2/task.listMessages?task_id=agent-default-main_task&order=desc&limit=5' \
  -H 'x-manus-api-key: $MANUS_API_KEY'
```

## Shortcuts

The following shortcuts are available so you don't need to look up UUIDs first:

| Shortcut | Used as | Description |
| - | - | - |
| `agent-default-main_task` | `task_id` | The IM agent's main task. Accepted anywhere a `task_id` is expected. |
| `agent-default` | `agent_id` | The IM agent. Use in [task.list](https://open.manus.ai/docs/v2/task.list.md) with `scope=agent_subtask`. |

## Managing agents

Use the `agent.*` endpoints to list, view, and update your agents:

| Action | Endpoint |
| - | - |
| List all agents | [agent.list](https://open.manus.ai/docs/v2/agent.list.md) |
| View agent details | [agent.detail](https://open.manus.ai/docs/v2/agent.detail.md) |
| Update nickname / description | [agent.update](https://open.manus.ai/docs/v2/agent.update.md) |

## Agent subtasks

Agents can create subtasks during execution. To view an agent's subtasks, use [task.list](https://open.manus.ai/docs/v2/task.list.md) with `scope=agent_subtask`:

```bash theme={null}
curl 'https://api.manus.ai/v2/task.list?scope=agent_subtask&agent_id=agent-default' \
  -H 'x-manus-api-key: $MANUS_API_KEY'
```

Subtasks have `task_type: "agent_subtask"` in the response and can be interacted with like any other task — [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage.md), [task.listMessages](https://open.manus.ai/docs/v2/task.listMessages.md), [task.stop](https://open.manus.ai/docs/v2/task.stop.md), etc.


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