canonical: https://jentic.com/apis/lyzr.ai/lyzr

# Lyzr Agent API

Jentic publishes the only available OpenAPI specification for Lyzr Agent API, keeping it validated and agent-ready. The Lyzr Agent API exposes Lyzr's AI agent framework across 16 endpoints covering users, sessions, agents, and a single-task agent template. Authentication uses an Authorization header API key. The API supports the lifecycle of creating users, opening conversational sessions tied to a specific agent, exchanging messages, and pulling session history, summary, and full conversation transcripts.

## For AI agents

Create Lyzr AI agents (general or single-task), open conversational sessions, exchange messages, and pull session history, summaries, and full transcripts.

## Scope

Does not handle voice synthesis, image generation, or low-level model fine-tuning - use for Lyzr user, session, and agent lifecycle management only.

## Capabilities

- Create and update users that own sessions and agents via POST `/v1/users`/ and PUT `/v1/users/{user_id}`
- Open a session against a specific agent with POST `/v1/sessions/{agent_id}` and manage its lifecycle (get, update, delete)
- Pull a session's running history, the auto-generated summary, and the full conversation via dedicated endpoints
- List, create, get, update, and delete agents under the v3 namespace
- Spin up a single-task agent quickly via POST `/v3/agents/template/single-task`
- Build conversational AI applications without managing model routing or session storage in your own infrastructure

## Use cases

### Embed a Lyzr conversational agent inside a product

Product teams use Lyzr as a managed agent runtime instead of wiring their own LLM orchestration. POST `/v3/agents`/ creates a configured agent, POST `/v1/sessions/{agent_id}` opens a session for a user, and the session's GET history, GET summary, and GET conversation endpoints power the chat UI. This avoids hosting a vector store, prompt template engine, and message log in-house.

Example prompt: POST `/v3/agents`/ to create an agent, POST `/v1/sessions/{agent_id}` to open a session for the user, and GET `/v1/sessions/{session_id}/conversation` to render the chat history.

### Single-task agents for narrow workflows

Rather than configuring a fully general agent, narrow workflows like 'classify this email' or 'summarise this ticket' use POST `/v3/agents/template/single-task` to spin up a focused agent in one call. This cuts setup time from minutes to seconds and gives the operations team a clean separation between the chat-style assistants and the back-office classifiers.

Example prompt: POST `/v3/agents/template/single-task` with the task description 'summarise customer support ticket' and return the new agent_id.

### Session summary and conversation export

After an agent session, downstream tools (CRM, BI, QA review) need either a digest or the full transcript. GET `/v1/sessions/{session_id}/summary` returns the auto-generated digest, GET `/v1/sessions/{session_id}/conversation` returns the full message log, and GET `/v1/sessions/{session_id}/history` returns the running history during the session. This pattern keeps human reviewers in the loop without slowing down the conversation itself.

Example prompt: Pull GET `/v1/sessions/{session_id}/summary` to get the digest, then GET `/v1/sessions/{session_id}/conversation` if a human reviewer wants the full transcript.

### Agent-driven Lyzr orchestration via Jentic

An autonomous agent is asked to spin up a domain-specific Lyzr agent, run a session, and post the summary into Slack. Jentic stores the Lyzr Authorization API key in your Jentic One instance and exposes the agent-create, session-create, and session-summary operations by intent so the calling agent can chain them without holding the raw key.

Example prompt: Search Jentic for 'create lyzr single-task agent', execute it with the task description, then chain POST `/v1/sessions/{agent_id}` and GET `/v1/sessions/{session_id}/summary.`

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/users/` | Create a user |
| POST | `/v1/sessions/{agent_id}` | Open a session against a specific agent |
| GET | `/v1/sessions/{session_id}/conversation` | Get the full conversation for a session |
| GET | `/v1/sessions/{session_id}/summary` | Get the auto-generated session summary |
| POST | `/v3/agents/` | Create an agent |
| POST | `/v3/agents/template/single-task` | Create a single-task agent from a template |
| GET | `/v3/agents/` | List agents in the workspace |

## Key resources

- **Users** — Create and update users that own sessions and agents
- **Sessions** — Open, get, update, delete sessions plus history, summary, and full conversation
- **Agents** — List, create, get, update, delete agents in the v3 namespace
- **Agent Templates** — Single-task agent template under `/v3/agents/template/single-task`

## Why Jentic

- **Setup:** Wiring the Lyzr Agent API by hand means sending its API key on every request and coordinating it across user, session, and agent-lifecycle paths on the agent.api.lyzr.app host. Through Jentic you install once, import the Lyzr Agent API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Lyzr puts the agent id in the URL path (`/v1/sessions/{agent_id}`), so a rule can pin your agent to opening sessions against one Lyzr agent and nothing else. You choose the operations it may call, so agent creation is not included unless you add it.
- **Credential handling:** Your Lyzr key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a Lyzr agent', 'open a Lyzr session', or 'get a session summary', and Jentic returns the matching Lyzr operation with its parameter schema so the agent calls the right endpoint directly.

## Related APIs

- **OpenAI** — Foundation-model API including chat completions and Assistants
- **Anthropic Messages** — Anthropic Messages API for Claude-based completions
- **Synthflow AI** — Voice-first AI agent platform that complements text-based Lyzr agents

## FAQ

### Why is there no official OpenAPI spec for Lyzr Agent API?

Lyzr does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Lyzr Agent API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Lyzr Agent API use?

Lyzr Agent API uses an Authorization header carrying an API key. Send the key as the Authorization value on every request to agent.api.lyzr.app. Through Jentic, the key is stored encrypted in your Jentic One instance and injected per request so it never enters the agent's prompt.

### Can I spin up a single-purpose agent quickly?

Yes. POST `/v3/agents/template/single-task` creates a focused agent in one call rather than walking through the full agent configuration. Use this when the workflow is narrow - classify an email, summarise a ticket, draft a reply - and you do not need a general conversational agent.

### What are the rate limits for the Lyzr Agent API?

Specific rate limits are not declared in this spec. Expect per-account limits tied to your Lyzr plan and the cost of underlying model inference - design clients to back off on 429 responses and avoid creating sessions in tight loops.

### How do I get the summary of a Lyzr session through Jentic?

Search Jentic for 'lyzr session summary', load GET `/v1/sessions/{session_id}/summary`, and execute it with the session_id. Jentic injects the Authorization API key automatically and returns the auto-generated digest you can post into Slack or a CRM note.

### Can I limit what my agent is allowed to do with the Lyzr Agent API?

Yes. Because you run Jentic One yourself, your own rules decide which Lyzr operations and credentials the agent may use. Since Lyzr puts the agent id in the URL path at POST `/v1/sessions/{agent_id}`, you can pin the agent to opening sessions against a single Lyzr agent and reading that session's history, summary, and conversation, while leaving agent creation at POST `/v3/agents`/ out unless you explicitly add it. The stored API key is injected only for the operations you allow, so it never reaches the agent's prompt.
