emcie-co/parlant
A policy-driven Python SDK for customer-facing agents that handle shifting topics
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Parlant runs a single customer-facing agent backed by a catalog of policies, procedures, tools, and canned responses. On each turn it selects applicable policies, resolves priority and exclusion relationships, and runs tools enabled by those policies. Tool results can add context and trigger another pass through policy selection. The reply is then composed with relevant wording guidance and can be reviewed before delivery. The control flow is driven by what applies now, not by a predefined route for every combination of topics.
The async entry point is parlant.sdk: start p.Server() with an async context manager, register an agent with server.create_agent, and bind an async @p.tool returning p.ToolResult to a policy. That Python tool boundary is the extension point for business systems. The package declares FastAPI, HTTPX, aiosqlite, aiopenapi3, and FastMCP dependencies; the demonstrated integration path is a Python callable, not a requirement to expose every integration through OpenAPI or MCP. The tree separates src/, examples/, tests/, and widget/.
Key Capabilities & Differentiators
Policies can combine rules about wording with actions grounded in business data. An order-status policy, for example, can request a missing order number, invoke a lookup, and present a delivery date as an estimate rather than a promise. Canned responses are approved wording examples that can be adapted to the conversation. Tool reviews can check actions before execution, message reviews can check replies before delivery, and adaptive effort can dedicate more work to turns that rules identify as high-stakes.
The quickstart uses OpenRouter; other documented options include OpenAI, Anthropic, Gemini, LiteLLM, and custom providers. Model routing allows the model choice to vary by job. Simulated conversations test cases such as plan-dependent offers, and observability links a reply to the policies, tool calls, and checks behind it. A web chat widget, same-chat human handoff, and conversation analytics round out the customer-facing workflow.
Trade-offs & Limitations
Compared with a graph-first framework such as LangGraph, Parlant is a better fit when customers can interrupt, mix topics, or change direction and the primary job is to reselect the right policies. It avoids hard-coding a transition for each topic combination, but shifts complexity into policy overlaps, exclusions, and regression cases. Relevance filtering reduces competing instructions, not the need for testing: exercise both missed policy matches and contradictory matches, and measure the latency impact of checks and tool calls on high-stakes turns.
Compared with managed CX platforms such as Intercom Fin, Sierra, and Decagon, Parlant gives teams control over the agent code, integrations, and model selection. The team takes on policy maintenance, authorization, and rollback for side-effecting actions. A rule that exposes a refund tool or a review that approves its use is not a substitute for backend authorization. Apache-2.0 covers the SDK; inference, infrastructure, and any managed Dashboard subscription remain separate cost and operating decisions.
Hardware & Deployment Guide
Parlant v4.0.9 is a Python package requiring >=3.10,<3.15. Install with pip install parlant. The local Dashboard quickstart sets OPENROUTER_API_KEY and PARLANT_DASHBOARD_PROJECT_TOKEN, then starts the example with python main.py; parlant init my-agent --scaffold retail-store creates a fuller example, with lead-gen and basic also available. The API runtime can be self-hosted, or the agent can be deployed from GitHub on the managed Dashboard. Local execution with OpenRouter still depends on a remote inference API, not an offline model. Size the service using realistic session concurrency, provider rate limits, and tool wait times.
The 4.0 release sequence refines rule and tool behavior. v4.0.7 added exclude() for rules and groups and except_when=[...] for policies and observations. v4.0.8 updated the parlant lint WTV001 guidance so deduplicating canned wording preserves required disclosures and actions. v4.0.9 added ToolRecaller.min_relevance_score for tools that no applicable rule has enabled this turn or earlier in the session; it narrows which tools are offered to the model rather than authorizing their execution.
prioritize_over() retains the lower-priority policy in the instructions; exclude() removes an excluded rule while the exclusion applies.ToolRecaller.min_relevance_score filters tools not enabled by an applicable rule this turn or earlier in the session.widget/ for web chat, same-chat human handoff, and a choice of self-hosted or managed runtime.Support and CX teams that own their Python integrations and need one agent to apply changing policies across order support, account questions, and lead qualification.
You want a no-code, vendor-operated contact center, or your primary requirement is an explicit workflow and deterministic authorization rather than conversational policy selection.
Quick Start & Installation
pip install parlant export OPENROUTER_API_KEY="<YOUR_API_KEY>" export PARLANT_DASHBOARD_PROJECT_TOKEN="<YOUR_PROJECT_TOKEN>"
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| parlant ★ | 18.4k | +15 | Python | Apache-2.0 | A policy-driven Python SDK for customer-facing agents that handle shifting topic |
| browser-use | 122.7k | +477 | Python | MIT | Python REPL and CDP for adaptive browser automation |
| langgraph | 45.8k | +293 | Python | MIT | Python graph orchestration for stateful, resumable agents and workflows |
| langchain | 150.4k | +290 | Python | MIT | Modular Python framework for building agents across model providers |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/emcie-co/parlant.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about parlant
How do I integrate a private order or CRM API?
@p.tool, return a p.ToolResult, and attach the function to a policy through tools=[...]. The policy gives the agent conversational context for using the tool; the backend should still authenticate the caller and verify that the order belongs to the customer before returning data.Do I need a GPU, and what drives runtime overhead?
Can we self-host Parlant commercially and keep customer data in our environment?
When should I choose Parlant over LangGraph or a managed CX platform?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy