> ## 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.

# Agents

> Core concepts for configuring and running Lyzr agents.

An agent in Lyzr is an LLM configured with a role, a goal, and instructions, with optional connections to tools, knowledge, and memory. Every agent exposes a persistent REST endpoint and maintains session state.

## Core configuration

Every agent has three required fields:

**Role** sets the agent's persona and decision-making frame.
`"You are a senior financial analyst specializing in SaaS metrics."`

**Goal** defines what the agent is trying to accomplish at a high level.
`"Help finance teams understand their ARR, churn, and LTV from raw data exports."`

**Instructions** contain detailed behavioral rules: tone, constraints, output format, and step-by-step logic. Better instructions produce better agent behavior.

## Optional features

| Feature           | What it does                                                              |
| ----------------- | ------------------------------------------------------------------------- |
| Memory            | Retains context across turns (session) or sessions (long-term via Cognis) |
| Knowledge Base    | Connects RAG, Knowledge Graph, or Semantic Model retrieval                |
| Tools             | Lets the agent call external systems (APIs, apps, databases)              |
| Responsible AI    | Applies guardrail policies (PII, toxicity, injection blocking)            |
| Global Context    | Applies org-wide instructions to all agents in the workspace              |
| Structured Output | Forces a JSON response conforming to a schema you define                  |

## Agent as API endpoint

Every agent in Lyzr is automatically exposed as a REST endpoint at agent creation time. No server code is required.

Available endpoint modes:

* `POST /v3/agent/{id}/chat`: standard chat (request/response)
* `POST /v3/agent/{id}/stream-chat`: streaming response (server-sent events)
* `POST /v3/agent/{id}/multimodal-chat`: accepts image and file inputs

Pass a stable `session_id` for multi-turn conversations. A new UUID in each request creates a stateless, one-off interaction.

## Model selection

Lyzr agents are model-agnostic. Supported providers include OpenAI (GPT-4o, GPT-4o Mini, and reasoning models), Anthropic (Claude Sonnet, Claude Opus, Claude Haiku), Google (Gemini 2.0 Flash, Gemini 2.5 Pro, Gemini 3.x preview models), Amazon Bedrock, Groq, and Perplexity. You can swap models on any agent without changing your integration.

Enterprise plan users can also bring their own model. Go to **Models** in Agent Studio, select **Add**, provide the model details, and the custom model appears in every agent's provider dropdown.

## Next steps

* [Add a Knowledge Base to your agent](../../agent-studio/knowledgebase/studiokb)
* [Connect tools to your agent](../../agent-studio/tools/overview)
* [Set up multi-agent orchestration](multi-agent-orchestration)
