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

# CreateAgentSession

> Start a new session with a coding or chat agent from ListAgents.

# CreateAgentSession

Start a new session with a coding or chat agent from ListAgents. Provide the agent botId and a self-contained initial prompt. The new session does not inherit this conversation. Returns its session ID after the first prompt is accepted, not completed work. Use ManageAgentSession to continue an existing session. Create once; do not automatically retry after an uncertain failure.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `agentId` | string | Yes | Agent persona botId from ListAgents. |
| `prompt` | string | Yes | Complete initial task and relevant context. |


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