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

# Agents API

> 以编程方式创建、配置并与 Agent 交互。

# Agents API

## 列出 Agent

```bash theme={null}
GET /api/agents
```

## 创建 Agent

```bash theme={null}
POST /api/agents
```

```json theme={null}
{
  "name": "Research Assistant",
  "model": "gpt-4o",
  "tools": ["browser", "file_system"],
  "system_prompt": "You are a research assistant..."
}
```

## 发送消息

```bash theme={null}
POST /api/agents/:id/messages
```

```json theme={null}
{
  "content": "Research the AI agent market in 2026"
}
```

## 获取对话历史

```bash theme={null}
GET /api/agents/:id/messages
```
