# Repository Briefing: emcie-co/parlant
> Source: https://repoforai.com/repo/emcie-co/parlant (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/emcie-co/parlant
- **Official Docs / Website**: https://www.parlant.io
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (96/100 · Maintenance 35/35 · Adoption 21/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v4.0.9 (2026-11-24) — https://github.com/emcie-co/parlant/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, API
- **Momentum**: 18,365 ★ total (+1 24h / +15 7d) · 1,559 forks
- **Topics**: `ai-agent`, `customer-experience`, `customer-service`, `customer-success`, `lead-generation`, `llm`, `python`
- **When to Use**: Best for: 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. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Turn-level orchestration: Selects applicable policies and procedures as topics change, without a predefined route or handoff between sub-agents.
- Conflict semantics: `prioritize_over()` retains the lower-priority policy in the instructions; `exclude()` removes an excluded rule while the exclusion applies.
- Tool selection: `ToolRecaller.min_relevance_score` filters tools not enabled by an applicable rule this turn or earlier in the session.
- Action and reply controls: Tool reviews can check actions before execution, message reviews can check replies before delivery, and canned responses supply approved wording.
- Testing and traceability: Simulated conversations exercise policy combinations; traces connect replies to policies, tool calls, and checks.
- Delivery surface: An async Python SDK, API, `widget/` for web chat, same-chat human handoff, and a choice of self-hosted or managed runtime.
```

## Quick Start / Clone
```bash
pip install parlant
export OPENROUTER_API_KEY="<YOUR_API_KEY>"
export PARLANT_DASHBOARD_PROJECT_TOKEN="<YOUR_PROJECT_TOKEN>"
```
