Introduction
What is Conversation Modeling?β

You've built an AI agentβthat's great! However, when you actually test it, you see it's not handling many customer interactions properly, and your business experts are displeased with it. What do you do?
Enter Conversation Modeling (CM): a new powerful and reliable approach to controlling how your agents interact with your users.
A conversation model is a structured, domain-specific set of principles, actions, objectives, and terms that an agent applies to a given conversation.
Why Conversation Modeling?β
The problem of getting your AI agent to say what you want it to say is a hard one, experienced by virtually anyone building customer-facing agents. Here's how Conversation Modeling compares to other approaches to solving this problem.
-
Flow engines (such as Rasa, Botpress or LangFlow) force the user to interact according to predefined flows. In contrast, a CM engine dynamically adapts to a user's natural interaction patterns while conforming to your rules.
-
Free-form prompt engineering (such as with LangGraph or LlamaIndex) leads to inconsistency, frequently failing to uphold requirements. Conversely, a CM engine leverages structure to enforce conformance to a Conversation Model.
π What is Parlant?β
Parlant is an open-source Conversation Modeling Engine for LLM agents, which means that you use it to precisely control how your agent interacts with users in different scenarios.
Parlant comes with a bunch of built-in goodies to help you ramp up quickly and make the modeling process as easy as possible:
- Responsive conversation REST API and persistent session storage
- Utterance template support (based on Jinja2), for complete control of response style and zero output hallucinations
- User-input moderation and jailbreak protection
- Integrated playground UI for testing your conversation models
- Informed and reliable API integration via contextually-guided tool calls
- Native API clients in Python and TypeScript
π€ Why Parlant?β
Many use cases require strict conformance to business rules and protocols when interacting with users. However, until now this has been exceedingly difficult to achieve consistently with LLMs.
Parlant is tailored to solve this challenge. By implementing a structured approach to modeling conversational behavior, through carefully designed rules, entities, and relationships, Parlant allows you to define, enforce, and reason about agent decisions in a simple and elegant manner.
Read on and you'll see exactly what we mean by that!
βοΈ Conversation Modeling 101: Atomic Guidelinesβ
The most powerful entity in a Conversation Model is guidelines. In Parlant, guidelines are atomic. This means that, instead of defining your guidelines in free-form fashion (much like what you'd do in a system prompt), you define them in granular fashion, where each guideline adds an individual clarification on how to approach a situation.
Parlant automatically selects the most appropriate set of guidelines to apply in any given situation, out of all of the guidelines you provide it. It does this by looking both at a guideline's condition (describing the circumstances in which it should apply) and the action (what it should do).
Finally, it applies enforcement to ensure that the matched guidelines are actually followed, and provides you with explanations for your agent's interpretation of situations and guidelines at every turn.
With sufficient guidelines, you ultimately tell your agent exactly how to approach and handle various different circumstances according to your needs and expectations.
parlant guideline create \
--tag returns \
--condition "the customer wants to return an item" \
--action "get the order number and item name and then help them return it"
Once guidelines are installed, you can get clear feedback regarding their evaluation at every turn by inspecting Parlant's logs.
Learn more about this in the section on how Parlant implements enforcement & explainability.
The Components of a Conversation Modelβ
- πͺͺ Agent Identity: Describes the agent's general job, disposition, and personal traits.
- π§© Guidelines and Relationships: Guidelines can be modeled to contextually override each other, depend on each other in various forms, or help to disambiguate each other.
- π Glossary Terms: Important or domain-specific terms that the Conversation Model needs to understand in conversations as well as when mentioned in your instructions.
- ποΈ Global and User-Specific Variables: Provide important context (e.g., locale, date/time, etc.) as well as user-specific values (e.g., subscription plan, personal traits, preferences, and so forth).
- π Tools (Integrated APIs): Integrate real-world actions into your Conversation Model. Note that tool integration in Parlant is more powerful than what you may be accustomed to, as you can add deep contextual guidance on when, how, and why to call your tools, and control how to communicate their results to the user.
- π¬ Utterance Templates: An optional feature that, when used, forces the agent to speak in the exact language you allow it. This gives you absolute control over the interaction, as well as allow you to completely eliminate output hallucinations. Utterance templates use the Jinja2 engine, supporting variable substitutions using tool results, and generative substitutions (when explicitly allowed).
π€ Understanding the Pain Pointβ
While everyone knows hallucinations are important to solve, at present too few are aware of the alignment challenges that come with building conversational LLM agents.
Think of an LLM like a stranger with an encyclopedic knowledge of different approaches to every possible situation. Although incredibly powerful, this combination of versatility and lack of context is precisely why it so rarely behaves as we'd expectβthere are too many options.
This is why, without clear guidelines, an LLM will always try to draw optimistically from its vast but unfiltered set of observations. It will use tones that are out of touch with the customer or the situation, make irrelevant offers, get into loops, or just lose focus and go off on tangents.


With a Conversation Model, guiding your agent becomes easy. Every time you see it missing the mark, you can usually narrow it down to a necessary change in the model, and solve it quickly by adjusting your model. You do this primarily using guidelines, as well as other modeling elements that Parlant supports, like tools, glossary terms, and context variables.
Parlant is designed from the ground up to allow you to quickly tune-up your agent's behavior whenever you encounter unexpected behavior or get feedback from customers and business experts. The result is an effective, controlled, and incremental cycle of improvement.



The premise behind Parlant is that unguided AI agents are a dead-end. Without guidance, an AI agent is bound to encounter numerous ambiguities, and end up trying to resolve them using many incorrect or even problematic approaches. Only you can authoritatively teach your agent how to make the right choices for youβso you should be able to do so easily, quickly, and reliably.
Instead of an agent that goes around the bush, meanders, and offers irrelevant solutions or answers, Parlant paves the way for you to build an agent that is guided, focused, and feels well-designed. A focused and guided agent is one your customers could actually use!


So pack your bags and get ready to model some awesome AI conversations. Or crappy ones. You've got the controls now and the choice is yours. Let's start!