Skip to main content
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. Screenshot of the Agent API button in Lyzr Studio, located in the agent configuration view.

Request body

A basic request passes a query field. When calling a Manager Agent, you also include the managed_agents array. Screenshot of an example Manager Agent API request body showing the query field and managed_agents array.

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:
{
  "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.