Self-host parlant
v4.0.4Behavior-control harness for customer-facing AI agents
pip install parlant- Stars
- 18 328
- Port
- 8800 (Parlant's FastAPI server: REST API and built-in session interface)
What is parlant?
Parlant is an open-source interaction-control layer for teams building conversational AI agents that face real customers (support, sales, onboarding, advisory). Rather than one large system prompt, you express behaviour in Python as observations and condition-action guidelines, multi-turn journeys, glossary terms, per-customer variables, tools and retrievers; the engine decides which of them apply on each turn and only that narrowed context reaches the model, so hundreds of rules can coexist without diluting adherence. At sensitive moments a guideline can switch to strict composition mode so the reply is drawn from pre-approved canned templates, and sessions can be escalated to a human operator. Input moderation, including a paranoid jailbreak mode using Lakera Guard, screens abusive or risky customer messages before the agent sees them, and every matching decision is exported as OpenTelemetry traces, metrics and logs.
You install the package with pip, define your agent in code and launch it: p.Server() starts a FastAPI server that listens on port 8800 by default and also serves a browser interface for opening test sessions. The production guide shows containerizing your app with your own Dockerfile, deploying it on Kubernetes as a stateless service with MongoDB holding session and customer data, adding JWT-based authorization and rate limiting, and optionally Redis-backed limiter storage. Client SDKs for Python and TypeScript and an official React chat widget build on the same server. NLP providers are interchangeable, with Emcie as the recommended default plus OpenAI, Anthropic, Google, AWS Bedrock, Azure OpenAI and others; Python 3.10 or newer is required. The code is Apache-2.0 licensed, free for commercial use, and the maintainers say Parlant itself is not monetized or made freemium.
parlant alternatives
PlatypusPlatypus is a self-hosted, open-source platform for building AI agents with multi-tenant workspaces, MCP, A2A, Kanban boards, and memory.ComparePlatypus with parlant
heliconeHelicone is a self-hosted, open-source LLM observability platform and AI gateway for 100+ models with cost tracking, agent tracing, prompt management, and a playground.Comparehelicone with parlant
Open ResponsesA self-hosted, open-source server implementing the OpenAI Responses API specification with support for multiple LLM providers and the Agents SDK.CompareOpen Responses with parlant
orbitSelf-hosted AI gateway connecting private data to local or hosted LLMs via one OpenAI-compatible API with built-in auth, quotas, audit logs, and admin UI.Compareorbit with parlant
Open-Poe-AIOpen AI Agents Hub is a self-hosted, open-source platform for building and chatting with AI agents — LLM chat and media generation from one web interface.CompareOpen-Poe-AI with parlant
OpenBotEnterprise AI agent platform on your infrastructure. Any AG-UI agent as coworker with company knowledge and computer use. Data in PostgreSQL; models yours to choose.CompareOpenBot with parlant
AgentaOpen-source, self-hosted workspace where teams build AI agents by chatting, run them in Slack, Telegram or WhatsApp, and schedule automations on any LLM.CompareAgenta with parlant
SillyTavernSelf-hosted open-source LLM frontend with unified API interface, character management, chat history, image generation, TTS, and plugin extensibility.CompareSillyTavern with parlant
All self-hosted alternatives to Ada → All self-hosted alternatives to Decagon → All self-hosted alternatives to Sierra →
Should you self-host parlant?
parlant scores 73/100 on selfhost.directory (how scoring works) and ranks #23 of 209 in AI Agents. It has 18 328 GitHub stars, +32 in the last 30 days.
It shipped 7 stable releases in the past year. The latest, v4.0.4, came out on 8 November 2026. New versions land roughly every 2 weeks.
Setup is advanced: plan for several services and some ongoing maintenance. It is Apache-2.0-licensed and written mostly in Python.
Its closest alternative on selfhost.directory is Orca (91/100, 120 615 stars). It scores higher overall, so compare the two before you pick. See parlant vs Orca side by side.
Features
- Authorization policies and rate limiting
- Built-in web session interface
- Canned response templates
- Condition-triggered tool calling
- Contextual guideline matching
- Domain glossary
- Human handoff
- Input moderation and jailbreak protection
- Knowledge retrieval
- LLM provider flexibility
- Multi-turn journeys (SOPs)
- OpenTelemetry observability
- Per-customer variables
- REST API
- Stateless horizontal scaling
parlant README
Quickstart • Compare • Docs • Dashboard • Discord
Deutsch | Español | Français | 日本語 | 한국어 | Português | Русский | 中文
Parlant is an open platform for building customer-facing chat agents with AI. You describe how the agent should behave, and your coding agent implements it for you. Parlant provides the rest: an engine that keeps the agent on your rules in every conversation, plus the parts every customer-facing agent needs, from a chat widget and human handoff to testing, hosting, and analytics.
Because the agent runs on your own code, it can use any system you can reach and any model you choose, and—unlike closed CX platforms—you pay model providers directly instead of an overpriced fee per resolution.
Imagine you're working on a lead-generation agent for your company's website, and a new feature launches in 1 hour.
- Monday, 8:43: Marketing sends you the final FAQ for the new Pro plan, which launches at 10:00.
- 8:45: You tell your local coding agent: "Make it answer Pro questions from this FAQ. If a Basic customer hits their project limit, mention Pro once. Never pitch it to Pro customers." Then you go make a coffee.
- 9:00: Your coding agent adds a policy and uses each customer's plan to decide when Pro is relevant.
- 9:01: You tell your coding agent: "Test it with two simulated personas: a Basic customer at their project limit, and a Pro customer." While they run, you grab a cookie.
- 9:10: You open the two test sessions on the Dashboard and check that they went as you expected: the Basic customer hears about Pro once, and the Pro customer never does.
- 9:15: You push the change. At 10:00, your agent is ready for launch-day questions.
The lead-generation agent is ready for launch day, with no vendor ticket, no fiddling in deep menus, and no engineering sprint.
Paste this prompt into your favorite agent:
Read https://www.parlant.io/llms.txt first. Then ask me what I'd like to know and—as needed—follow up on what Parlant is, how it differs from other products, including black-box agents, and in what cases it is a better fit for one's customer-facing use case. It's a conversation.
When you're ready to build, the quickstart gives you a prompt that has your coding agent install Parlant and set up an example agent or your own, one step at a time. From there, take it live on the Dashboard's managed hosting and put it on your site with the chat widget.
Prefer to write the code yourself?
Install Parlant and set a key for the default OpenRouter provider. Then, in the Dashboard, create a Local development project and set its project token:
pip install parlant export OPENROUTER_API_KEY="<YOUR_API_KEY>" export PARLANT_DASHBOARD_PROJECT_TOKEN="<YOUR_PROJECT_TOKEN>"
Create main.py:
import asyncio import parlant.sdk as p ORDERS = { "1234": "shipped with UPS, tracking 1Z999AA10123456784, arriving Thursday", "5678": "still being packed, expected to ship tomorrow", } @p.tool async def check_order_status(order_id: str) -> p.ToolResult: """Look up an order's current status.""" status = ORDERS.get(order_id) if status is None: return p.ToolResult(data=f"There's no order {order_id}. Ask the customer to check the number.") return p.ToolResult(data=f"Order {order_id} is {status}.") async def main() -> None: async with p.Server() as server: agent = await server.create_agent( id="support", name="Homeware Support", instructions="You help customers of an online homeware store. Be warm and concise.", ) # Approved wording the agent follows when this policy applies late_order = await agent.create_canned_response( "I'm sorry it's taking longer than expected. Let me check where it is right now.", note="Apologize once, then get straight to the order's status.", ) # A policy is plain language; Parlant brings it in only when it's relevant await agent.create_policy( title="Order status", content=( "When a customer asks where an order is, ask for the order number " "if they haven't given it, look it up with check_order_status, and " "give the status. Give delivery dates as estimates, never as promises." ), tools=[check_order_status], canned_responses=[late_order], ) if __name__ == "__main__": asyncio.run(main())
Run it with python main.py. Back in the Dashboard, click Check connection, then Open project. On the Overview page, click New session and ask where order 5678 is. The agent looks it up and tells you it ships tomorrow. Ask about an order that doesn't exist, and it asks you to check the number.
For a full project, run parlant init my-agent --scaffold retail-store (a working support agent), --scaffold lead-gen (a website agent that qualifies visitors and books meetings) or --scaffold basic (an empty one). Parlant also supports OpenAI, Anthropic, Gemini, LiteLLM, and custom providers; see Configuring Models and Providers.
Writing the new rule took you minutes. The hard part is making sure your agent follows it correctly and consistently: with a customer who changes the subject, mixes different topics, or turns out to be on a different plan than they think.
That's where Parlant's got your back! Customer-facing agents face pressures that assistant-style agents never do:
| AI Assistant | Customer-Facing Agent | |
|---|---|---|
| Who uses it | A cooperative, informed user | A possibly confused, impatient, or hostile customer |
| Cost of a mistake | A retry or a revised draft | Financial losses, brand damage, and customer relationships |
| Supervision | The user corrects it iteratively | Nobody is there to catch mistakes during the interaction |
| Structure | Conversation is led by the user | The agent must often stick to specific operating procedures |
| Language | Free to improvise | On-policy at all times, sometimes with exact wording |
| Accountability | Nice to have on occasion | Behavior must always be explainable |
Most AI frameworks, and the code a coding agent writes on top of them, are built for that left column: for assistant agents. Parlant is built for the right column. If your coding agent suggests a general agent framework, see how Parlant compares with LangGraph, Mastra, Agno, the Claude Agent SDK, Google ADK, and the OpenAI Agents SDK.
A customer-facing agent needs much more than a model and a prompt. Parlant ships it, so your coding agent builds on it instead of inventing it:
- Agentic orchestration: brings in the relevant policies as the customer's needs change, without predefined conversation paths.
- Tool and message validation: checks actions such as refunds before they run, and replies before they're sent.
- Canned responses: approved wording examples that your agent adapts to each conversation.
- Adaptive effort: spends more on a turn only when your rules recognize a high-stakes moment.
- A chat widget for your website or app, and human handoff to your team in the same chat.
- Simulated test conversations, conversation analytics, and observability that links each reply to the policies, tool calls, and checks behind it.
- Managed hosting on the Dashboard, deployed from GitHub, or self-hosted anywhere.
- Any model from any provider, paid at the provider's price with no markup, and any system your code can reach.
See all of Parlant's features.
Closed CX platforms such as Intercom Fin, Sierra, and Decagon let you build an agent through their settings, and run it for you. With Parlant, your coding agent does that work, on code you own.
| Closed CX platform | Parlant | |
|---|---|---|
| Building the agent | Click through the platform's settings | Describe it; your coding agent builds and tests it |
| What it can do | What the settings offer | Anything your code can do, in any system it can reach |
| Models | The vendor's | Yours, chosen per job |
| Pricing | Per conversation or per resolution | Free and open source; you pay model providers directly, and the Dashboard is a flat monthly fee |
| Your data | On the vendor's platform | Where you choose |
If you're comfortable experimenting with a coding agent, Parlant is the better choice. If you'd rather not build with one yet, a closed platform is. Read the comparisons with Intercom Fin, Sierra, Decagon, and Wonderful.
You build one agent and give it a catalog of policies, procedures, tools, and canned responses. On every turn, Parlant works out which of them the conversation has made relevant and puts only those in front of the model. Customers can change topic mid-sentence or ask two things at once, and the agent keeps the right rules in view, with no paths to predefine and no handoffs between sub-agents.
flowchart LR
C[Customer] -->|Message| M[Find the policies that apply]
M --> R[Resolve priorities between them]
R --> T[Run the tools they allow]
T -. New context .-> M
R --> G["Write the reply<br/>(guided by canned responses)"]
G --> V[Optional check]
V -->|Reply| C
Adding policies makes the agent more capable without asking the model to pay equal attention to everything at once. Read more about policies and procedures, canned responses, checks on replies and actions, and the agent architecture.
Parlant runs customer conversations for banks, energy companies, and startups.
With other frameworks we've tried, precision wasn't good enough. — Sarthak Dalabehera, Principal Engineer, slice (customer service for 18 million banking clients)
I am particularly impressed by Parlant's consistency, which eliminates the unpredictability often found in AI tools. The speed at which we saw value was truly remarkable. — Arpit Parashar, Deputy Manager, Greenko Group
We tested Parlant extensively. The failure patterns that exist in our production logs, capturing them in Parlant takes minutes. — Vishal Ahuja, ML Tech Lead, JPMorgan Chase
Parlant is a strong fit if you own a customer experience, as a PM, conversation designer, CX lead, or developer, and you want:
- An agent that follows your policies, even when customers mix topics or push back.
- Connections to your own systems, not only a vendor's connector catalog.
- A running cost far below a closed CX platform's, with no fee per resolution.
- Changes in minutes, made by describing them to your coding agent.
It's the wrong fit if nobody on your team is ready to build with a coding agent yet (a closed CX platform fits better until you are), if the agent isn't customer-facing (for coding agents, internal assistants, or long-running automated processes, use a general agent framework), or if the agent's own logic must live in a non-Python codebase (Parlant runs as a Python service that any stack talks to over HTTP, but its behavior is written in Python).
- The framework is free. Apache 2.0, with no usage limits. You pay your model provider directly, and Parlant never marks up inference.
- The Dashboard is where you test, host, and monitor your agents. It's a flat monthly fee per workspace, and free for development. It's SOC 2 Type II compliant. See pricing.
- Join Discord for help and discussion.
- Use GitHub Issues for bug reports and feature requests.
- Read CONTRIBUTING.md to contribute.
If Parlant helps you build a better agent, give it a star. It helps others find it.
Parlant is licensed under Apache 2.0 and is free for commercial use.
Start the quickstart • Compare with your platform • Join Discord
Built by the team at Emcie
FAQ
Does this work with my existing LLM?
Parlant is provider-agnostic, though the officially recommended providers are Emcie, OpenAI (also via Azure) and Anthropic (also via AWS Bedrock or others).
Won't canned responses make conversations feel rigid?
The agent still decides when to use a template based on the flow of the interaction, so wording is controlled only where it matters.
How do I prevent hallucinations in critical moments?
Use canned responses with strict composition mode, and design replies to reference required fields so a template whose data is missing is disqualified from being selected.
What about scenarios I didn't write rules for?
The underlying LLM keeps handling general conversation naturally; rules are only needed where special behaviour is expected.
How is Parlant different from LangChain or LangGraph?
Those are workflow tools that move data between steps, whereas Parlant governs behaviour: you add behavioural rules and relationships rather than restructuring a graph.
How is context engineering different from prompt engineering?
Prompt engineering optimizes a template the model already has, while context engineering decides what goes into that template in the first place; the two are described as complementary.
What is context engineering?
It is the practice of putting exactly the right material — no more, no less — into the prompt at the right time; Parlant assembles only the rules, data and tools relevant to each turn.
More in AI Agents
PaseoOpen-source environment to run coding agents like Claude Code, Codex, Copilot, and OpenCode in parallel from desktop, mobile, or CLI; self-hosted via Docker or npm.
PawFlow-AgentsPawFlow is an open-source, self-hosted AI agent runtime connecting agents to real files and desktops via relays with durable context and deterministic workflows.
payram-mcpPayRam MCP Server is an open-source MCP server letting AI agents deploy and operate a self-hosted crypto payment gateway with no KYC.
pearlBubble Lab is a self-hosted, open-core workflow automation platform for developers. It combines visual workflows with TypeScript type safety for AI agents.
peerdpeerd is a self-hosted browser extension turning Chrome/Firefox into an AI agent workstation with local WASM compute, BYOK models, and P2P agent communication.
pentagiSelf-hosted, open-source multi-agent platform that runs autonomous penetration tests with professional security tools in Docker sandboxes and produces reports.
picoclawSelf-hosted, open-source AI assistant in Go: a single binary under 10MB RAM with cron jobs, MCP tools, web search and 19+ chat channels like Telegram and Discord.
pinchySelf-hosted AI agent platform adding enterprise guardrails to OpenClaw — scoped permissions, RBAC, signed audit logs, connectors for Odoo, email, Telegram, local LLMs.
PipelexBuild AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
pipeshubThe open-source context layer for AI agents. PipesHub turns your company's knowledge (Slack, Drive, Jira, GitHub, Microsoft 365 and 40+ connectors) into a permission-aware workspace that agents can search, grep, navigate and cite. MCP, SDKs and built-in agents. Self-hosted.
Pizza BotSelf-hosted inbox for long-running AI agents with human-in-the-loop approvals, supporting multiple model providers.
plan42Collavre is a self-hosted, open-source workspace where every block is a document, task, discussion, and AI agent context in one. Built on Rails with MCP.

0 comments