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

# Manager Agent API

The Agent API lets you send requests to a deployed Lyzr agent from any external application. For a Manager Agent, requests must include a `managed_agents` array that tells the manager which sub-agents it can invoke for the given task.

To find your agent's API key and endpoint URL, open the agent in Lyzr Studio and click **Agent API**.

<img src="https://mintcdn.com/lyzrinc/-WzxrhqdhBRBVgIy/assets/images/studio/maa1.png?fit=max&auto=format&n=-WzxrhqdhBRBVgIy&q=85&s=831b1b23a76d2e984e20044b8a7d8c62" alt="Screenshot of the Agent API button in Lyzr Studio, located in the agent configuration view." width="518" height="121" data-path="assets/images/studio/maa1.png" />

## Request body

A basic request passes a `query` field. When calling a Manager Agent, you also include the `managed_agents` array.

<img src="https://mintcdn.com/lyzrinc/-WzxrhqdhBRBVgIy/assets/images/studio/maa2.png?fit=max&auto=format&n=-WzxrhqdhBRBVgIy&q=85&s=6c5ce967a120e4429c6bff9e7c3d626f" alt="Screenshot of an example Manager Agent API request body showing the query field and managed_agents array." width="456" height="300" data-path="assets/images/studio/maa2.png" />

## The managed\_agents array

The `managed_agents` array tells the Manager Agent which sub-agents are available for the current request. Each item in the array identifies one sub-agent:

```json theme={null}
{
  "query": "How many days of leave does an employee get?",
  "managed_agents": [
    {
      "id": "68415b37b1a7c0cc7b2be6bd",
      "name": "trial [Documentation Agent]",
      "usage_description": "Answers questions from the employee handbook."
    }
  ]
}
```

### Fields

**`id`** (string, required)

The unique identifier for the sub-agent, generated by Lyzr Studio. The Manager Agent uses this ID to invoke the correct sub-agent at runtime. You can find it in Studio when viewing an agent's configuration, or in API responses that list agents.

**`name`** (string, required)

A human-readable label for the sub-agent. This appears in logs and traces to identify which agent was invoked.

**`usage_description`** (string, required)

A short description of the sub-agent's purpose. The Manager Agent reads this at runtime to decide which sub-agent to route a task to. A specific, unambiguous description improves routing accuracy.

## Related

* [Set up a Manager Agent in Studio](./studio)
* [Agents API reference](../../api/agents/introduction)
