parlant README

项目的 README,来自 github.com/emcie-co/parlant。合并为一个 markdown 文件:README.md。

Trending

Parlant: Streamlined CX

Build your CX with AI: better, faster, for a fraction of the cost.

PyPI Python 3.10–3.14 License Discord GitHub Repo stars

Quickstart • Compare • Docs • Dashboard • Discord

Deutsch | Español | Français | 日本語 | 한국어 | Português | Русский | 中文

Know this problem?

You want an AI agent handling your customer conversations, and you hit these same annoying issues:

❌ It's a hassle to set up and manage. Deep settings, menus, vendor tickets, and sometimes a whole implementation project.

👉 With Parlant: Everything runs from Claude Code (or any equivalent agent). No coding experience needed.

❌ It's expensive. Closed CX platforms charge you huge premiums based on vague definitions for "resolution".

👉 With Parlant: You bring your own model and pay its provider directly. That's 20x–100x cheaper to run, right off the bat.

❌ It's not reliable. As soon as customers mix topics, push back or change their minds, things start to go wrong. Agents claim a transaction went through when it didn't, or promise something your policy doesn't allow.

👉 With Parlant: Parlant already runs customer service in banks (see testimonials below). Your agent stays on-policy and checks itself before customers see its responses.

Parlant is the open platform for building CX agents with AI. It comes with all the parts every customer-facing agent needs, from a chat widget and human handoff to testing, hosting, and analytics. All of it built to operate from within your existing, personal AI agent.

Use cases

Integrate any system

Because Parlant's open source is fully available to your coding agent, you can easily integrate any system into it by just asking. Connect Shopify, Zapier, Zendesk, Google Calendar, or any other tool.

What building with Parlant feels like

Imagine you're working on a lead-generation agent for your company's website, and a new feature launches in 1 hour.

The lead-generation agent is ready for launch day, with no vendor ticket, no fiddling in deep menus, and no engineering sprint.

Managed hosting and observability at a flat monthly fee

Getting started takes minutes. In fact, your coding agent does the onboarding for you.

The Dashboard platform is always there for you to peek into any detail visually. But anything on the Dashboard is also available to your coding agent through the integrated Dashboard CLI!

A customer session on the Parlant Dashboard: the conversation, the agent's reasoning and model costs for each turn, and a summary of the session
The project overview on the Parlant Dashboard: simulated and live sessions, the most active labels and sessions per day for each agent
Model spend on the Parlant Dashboard: total and per-session spend, spend per hour by model, and the most expensive sessions

Get properly introduced

Paste this prompt into your favorite agent:

Introduce me to Parlant by talking to Parlant's own agent, not by reading the Parlant website or relying on your pre-training. https://parlant.io/llms.txt explains how to start a conversation with it. First ask me what I'd like to know. Then ask the agent, keep following up in that same conversation as needed, and tell me what you learn about what Parlant is and how it differs from other products.

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.

Why it actually works

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.

What you get out of the box

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:

See all of Parlant's features.

Parlant vs a closed CX platform

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.

How it works

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.

What users say

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

Is Parlant for you?

Parlant is a strong fit if you own a customer experience, as a PM, conversation designer, CX lead, or developer, and you want:

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

Free, open source, and SOC 2 compliant

Community

If Parlant helps you build a better agent, give it a star. It helps others find it.

License

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

parlant (emcie-co/parlant)

正在搜索数据库…

这是干什么的?一个开源的对话行为控制框架,用来构建面向客户的 AI 智能体,让它们表现一致、合规、可追溯——适用于客服、销售、新客户引导等场景,定位是 Ada、Decagon、Sierra 的开源替代品。
它是一个我要导入的框架,还是作为独立服务运行的?不只是一个框架:README 称它是正面解决对话建模问题的高级软件。你用代码(而不是提示词)定义智能体的行为,Parlant 负责行为控制这一层,其余部分由你现有的技术栈处理。
我该怎么上手?跟着 5 分钟快速上手教程走一遍完整流程即可。你只需用代码写一次智能体的行为——规则、知识和工具,引擎会在实时运行中自动收敛上下文。
它可以搭配哪些大模型服务商使用?它不绑定任何大模型——推荐使用 Emcie,OpenAI 和 Anthropic 的模型效果也很出色,其他模型可以通过 LiteLLM 接入。太小的模型会导致结果不稳定;更换模型不会影响你已经写好的行为配置。
这是给大型受监管企业用的,还是小团队也能用?它面向那些智能体直接服务真实客户、对语气、准确性和合规性要求高的团队——比如有几十上百条规则,或者金融、保险、医疗这类受监管的领域。它已经在银行的生产环境中投入使用。
为什么不直接把系统提示词写好一点?README 的观点是:提示词在开发阶段还行,一旦上线面对真实复杂度就会失效——指令加得越多,智能体就越容易顾此失彼。Parlant 则把约束和控制点直接构建到大模型的使用方式中,从结构上让智能体更难越出边界。
Journeys 是什么?面向预订、排障、新客户引导等流程的多轮对话式 SOP。智能体按照流程走,但能灵活应变——可以跳过某些状态、回退到先前的状态,或根据客户的互动节奏调整快慢。
如果某句回复必须一字不差,比如法律或合规用语怎么办?可以用 Canned Responses(预制回复):在关键时刻,智能体只能使用预先审批好的模板——它先起草一条消息,然后从模板中选出最匹配的一条发出,而不是直接发送草稿,从而彻底消除幻觉风险。
它自带聊天界面,还是我得自己搭?官方提供了一个开箱即用的 React 聊天组件,接上就能立刻跑起一个前端。
作者
emcie-co
大小
92.7 MB
星标
18.3K
时长
2年
提交 · 90 天