# Lyzr — how to use (mcp.ai)

Connect your Lyzr account and use 22 tools for AI agents straight from your AI agent. Connect with your own API key. Build, run, evaluate, and manage AI agents and related Lyzr Studio services, including voice, responsible AI, simulation, memory, scheduling, workflows, and knowledge bases.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_lyzr?ms=1787293560000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `lyzr_add_memory_messages`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/lyzr`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/lyzr/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/lyzr/add/memory/messages` — Store a batch of conversation messages in Lyzr Memory for an owner, session, and optional agent, with optional synchronous fact extraction.
  - body: { agent_id?: string, messages: object[], owner_id: string, session_id: string, instructions?: string, document_mode?: boolean, provider_type?: string, sync_extraction?: boolean, memory_credential_id?: string, extract_assistant_facts?: boolean }
- `POST https://api.mcp.ai/api/lyzr/chat/with/agent` — Send a message or message history to an active Agent Studio agent and return its synchronous inference response for a session.
  - body: { assets?: string[], message?: string, user_id?: string, agent_id: string, messages?: object[], session_id: string, filter_variables?: object, system_prompt_variables?: object }
- `POST https://api.mcp.ai/api/lyzr/clear/memory/session` — Permanently clear messages and memories for one explicit owner and session in Lyzr Memory. Cross-session deletion is always disabled.
  - body: { agent_id?: string, owner_id: string, session_id: string, provider_type?: string }
- `POST https://api.mcp.ai/api/lyzr/create/agent` — Create a single-task Agent Studio agent with an LLM provider, model, instructions, and optional tool configuration.
  - body: { name: string, tool?: string, model: string, top_p?: number, is_active?: boolean, agent_goal?: string, agent_role?: string, description?: string, provider_id: string, temperature?: number, agent_output?: string, agent_context?: string, max_iterations?: integer, store_messages?: boolean, llm_credential_id?: string, agent_instructions: string, tool_usage_description?: string }
- `POST https://api.mcp.ai/api/lyzr/create/agent/schedule` — Create a cron schedule that runs one Agent Studio agent with a message in a specified timezone.
  - body: { message?: string, user_id: string, agent_id: string, timezone?: string, max_retries?: integer, retry_delay?: integer, cron_expression: string }
- `POST https://api.mcp.ai/api/lyzr/delete/agent` — Permanently delete one Agent Studio agent by ID.
  - body: { agent_id: string }
- `POST https://api.mcp.ai/api/lyzr/delete/agent/schedule` — Permanently delete one agent cron schedule and remove its associated scheduler job.
  - body: { schedule_id: string }
- `POST https://api.mcp.ai/api/lyzr/evaluate/text/with/rai/policy` — Apply one owned Responsible AI policy to text and return processed text, block decisions, warnings, detections, and redactions.
  - body: { query?: string, stage?: string, agent_id?: string, policy_id: string, input_text: string, session_id?: string, grounding_source?: string, agent_instructions?: string }
- `POST https://api.mcp.ai/api/lyzr/get/agent` — Return the current configuration and status of one Agent Studio agent by ID.
  - body: { agent_id: string }
- `POST https://api.mcp.ai/api/lyzr/get/knowledge/base` — Return one Lyzr Knowledge Base configuration by its known RAG configuration ID.
  - body: { config_id: string }
- `POST https://api.mcp.ai/api/lyzr/get/simulation/overview` — Return aggregate Agent Simulation counts and average evaluation pass rate for the connected workspace.
- `POST https://api.mcp.ai/api/lyzr/list/agent/schedules` — Return one page of agent cron schedules, optionally filtered by user, agent, or active state.
  - body: { limit?: integer, user_id?: string, agent_id?: string, is_active?: boolean, next_cursor?: string }
- `POST https://api.mcp.ai/api/lyzr/list/agent/simulation/issues` — Return recent performance, error, and Responsible AI issues across monitored agents, optionally filtered by resolution and severity.
  - body: { limit?: integer, resolved?: boolean, severity?: string }
- `POST https://api.mcp.ai/api/lyzr/list/agents` — Return all Agent Studio agents owned by the connected API key, including IDs needed by lifecycle and inference tools.
- `POST https://api.mcp.ai/api/lyzr/list/rai/policies` — Return Responsible AI policies owned by the authenticated user, including policy IDs and enabled guardrail configuration.
- `POST https://api.mcp.ai/api/lyzr/list/superflow/executions` — Return one page of SuperFlow execution records, optionally filtered by workflow and execution status.
  - body: { limit?: integer, status?: string, next_cursor?: string, workflow_id?: string }
- `POST https://api.mcp.ai/api/lyzr/list/superflow/workflows` — Return all SuperFlow workflow definitions accessible to the connected API key, including workflow IDs and graph data.
- `POST https://api.mcp.ai/api/lyzr/list/voice/agents` — Return saved Voice agents accessible to the connected organization, including IDs used to filter transcripts.
- `POST https://api.mcp.ai/api/lyzr/list/voice/transcripts` — Return one page of accessible Voice call transcripts, optionally filtered by agent, session, organization, or date range.
  - body: { limit?: integer, to_time?: string, agent_id?: string, from_time?: string, session_id?: string, sort_order?: string, next_cursor?: string, organization_id?: string }
- `POST https://api.mcp.ai/api/lyzr/retrieve/knowledge` — Retrieve relevant documents from a known Lyzr Knowledge Base using configurable basic, MMR, hypothetical-document, or time-aware retrieval.
  - body: { query: string, top_k?: integer, retrieval_type?: string, score_threshold?: number, knowledge_base_id: string, time_decay_factor?: number, mmr_relevance_diversity_balance?: number }
- `POST https://api.mcp.ai/api/lyzr/search/memories` — Semantically search stored memories for one owner, within one session or across that owner's sessions, using Lyzr's hybrid vector and BM25 retrieval.
  - body: { limit?: integer, query: string, agent_id?: string, category?: string, owner_id: string, session_id?: string, cross_session?: boolean, provider_type?: string, include_historical?: boolean, memory_credential_id?: string }
- `POST https://api.mcp.ai/api/lyzr/set/agent/status` — Activate or deactivate an Agent Studio agent. Deactivated agents reject inference until reactivated.
  - body: { agent_id: string, is_active: boolean }

## Example prompts
- "What can I do in Lyzr?"
- "Show me a summary of my Lyzr account"

## More
- Page: https://mcp.ai/lyzr
- Agent spec (llms.txt): https://mcp.ai/lyzr/llms.txt
- Postman collection: https://mcp.ai/lyzr/postman.json
