Motivation
The Problem​
Most teams building conversational AI agents hit the wall. The approaches differ, but the frustration is the same.
System prompt agents cram every rule into a single prompt. It works for demos. Then users ask something you didn't anticipate, and the agent ignores half your rules, hallucinates the other half, and you can't tell why. As the prompt grows, adherence to all instructions degrades—a phenomenon known as the Curse of Instructions. Every fix risks breaking something else, and the severity of mistakes is unbounded: the agent can say anything.
Intent-based graph frameworks (like LangGraph) take a different approach: classify intents, route to specialized nodes, narrow the context. For linear workflows, this is a real improvement. But conversations aren't linear. Users jump between topics, ask compound questions, and change their mind mid-sentence. Routing to a specialized node for topic X means that node is inherently ungrounded for topic Y. And at the point of generation—when the agent actually speaks—you still have very little control.
Both approaches share the same fundamental gap: no structured control over what the agent says (or can say), when, and why. They just aren't designed to control the needs, risks, and complexities of real-world conversation.
What is Parlant?​
Parlant is an open-source context engineering framework designed specifically for conversation, not workflows. Instead of cramming rules into a single prompt or routing messages through a graph, Parlant dynamically assembles the right context for each moment in the dialogue.
Your agent's behavioral rules are modeled as structured guidelines that Parlant matches to each conversation turn automatically, so the agent gets the right context at the right time, without predefining every path.
At critical moments, canned responses let you bypass generation entirely and control exactly what the agent says. And every decision is traced end-to-end: which contextual items fired, why, and what they produced.
The result is chat agents you can design, scale, debug, and actually trust in production.
How Parlant Solves This​
Granular Guidelines​
The most powerful concept in Parlant is the guideline. Instead of defining rules in free-form fashion (as you would in a system prompt), you define them in granular fashion, where each guideline adds an individual behavioral instruction for a specific situation.
await agent.create_guideline(
condition="you have suggested a solution that did not work for the user",
action="ask if they'd prefer to talk to a human agent, or continue troubleshooting with you",
)
Parlant automatically filters and selects only the most relevant guidelines for each conversation turn, keeping the model in the "safe zone" where instruction-following is highly consistent. This is what makes Parlant scale: you can have hundreds of guidelines without degrading performance, because only the few that match the current moment are loaded into context.
Much of what Parlant does behind the scenes is understanding when a guideline should apply. This is trickier than it may seem. Parlant automatically tracks whether a guideline has already been applied, distinguishes between guidelines that are always applicable versus those that apply once, and does this while minimizing cost and latency.
Every guideline evaluation is logged and traceable. You can inspect exactly which guidelines fired, why, and what they produced—at every turn.
Learn more in the section on enforcement & explainability.
Dynamic Context Assembly​
Rather than routing messages to specialized nodes, Parlant evaluates ALL of your guidelines and loads only the relevant ones for each conversation turn.
When a user says "I need to return this laptop, and what's your warranty on replacements?" Parlant doesn't route to one node and lose context for the other. It assembles guidelines for returns, warranties, and anything else that's relevant, simultaneously. The agent composes a response grounded in all of them.
This is why Parlant handles multi-topic conversations, topic switching, and intertwined concerns naturally—without attempting to predefine paths through natural dialogue that is inherently unpredictable in its structure.
Canned Responses​
For high-stakes moments where generation risk is unacceptable, Parlant supports canned responses: pre-approved response templates that bypass generation entirely.
The agent's behavior—how it interprets conversations, makes decisions, and acts—remains fully agentic. But the final output is deterministically controlled. This caps failure severity: the agent literally cannot say unauthorized things in moments that matter.
And critically, canned responses that depend on data gathered from tools and retrievers (like refund_amount) will never be selected unless those fields are provided by successfully-run tools. This means that the agent can never claim a business-critical action was taken when it wasn't.
The Iterative Workflow​
The premise behind Parlant is that poorly guided AI agents are a dead-end. Without guidance, agents encounter ambiguities and resolve them using incorrect or problematic approaches. Only you can authoritatively teach your agent how to make the right choices—so you should be able to do so easily, quickly, and reliably.
Every time you see your agent missing the mark, you narrow it down to a necessary guideline change, and fix it. Working iteratively—adding guidelines wherever you find the need—you build an agent that is guided, focused, and feels well-designed. One that your customers would actually use.
Ready to build? Let's start!