PA

Parlant

Framework for building controlled conversational AI agents

Self-Hosted AI ★ 18.3k stars Medium setup Apache-2.0

Parlant is an open-source engine for building customer-facing conversational AI agents whose behavior is governed by explicit guidelines. It runs as a self-hosted server with an SDK for defining agent rules.

Key features

  • Guideline-driven agents
  • Behavior control
  • Self-hosted server
  • SDK for rules

Pros & cons

Strengths

  • Guideline-driven behavior
  • Predictable agent responses
  • Developer-friendly SDK

Trade-offs

  • Young project
  • Narrow conversational focus

Parlant replaces

Last reviewed Aug 26, 2026 · 804 words

The difference between Parlant and a system prompt is that Parlant checks. You write guidelines as condition-action pairs ("when the customer asks for a refund, first confirm the order number"), and before every reply the engine decides which guidelines apply to the current turn, feeds only those to the model, and structures the generation so the model has to account for each one explicitly. That loop is what "controlled" means here, and it is what stops a support agent inventing a discount at turn 40 because the instruction scrolled out of attention. It is not a general agent framework and it will not write your code; it is for the narrow, high-stakes case of a bot that talks to your customers.

Guidelines, journeys, tools and a glossary

import parlant.sdk as p

@p.tool
async def get_order_status(context: p.ToolContext, order_id: str) -> p.ToolResult:
    return p.ToolResult(data={"status": "shipped"})

async def main():
    async with p.Server() as server:
        agent = await server.create_agent(
            name="Support",
            description="Handles order questions for a small shop.",
        )
        await agent.create_guideline(
            condition="the customer asks where their order is",
            action="ask for the order number, then look it up and report the status",
            tools=[get_order_status],
        )

Run that and the server starts on port 8800 with a test chat UI in the browser. Beyond single guidelines, journeys describe multi-step flows (an onboarding, a cancellation) as states the agent walks through; a glossary pins down domain terms so the model does not improvise definitions; and canned responses let you require exact wording for legal or brand-sensitive lines. All of it is data rather than prompt prose, which is what makes it reviewable by someone who is not an engineer.

Self-hosting is a Python server plus a model endpoint

The engine is one Python process (pip install parlant, then parlant-server run, or the SDK above), and it keeps agents, sessions and guidelines in local files under its home directory by default. 1 GB of RAM is right for the server itself. The model is the real dependency: by default Parlant talks to OpenAI, with adapters for Anthropic, Gemini and OpenAI-compatible endpoints. That last one is how you keep it entirely on-premise: point it at vLLM or Ollama, through LiteLLM if you want one gateway, and pick a model that follows instructions well, because guideline matching is itself model work and a weak model makes the whole control loop unreliable. Expect several model calls per customer message rather than one; latency and cost scale with that, which is fine for support and wrong for anything that must feel like instant chat.

Where it stops

Parlant has no channel integrations to speak of: it exposes a REST API and a chat widget, and getting it into WhatsApp, a phone line or your help desk is your integration work. It has no knowledge-base ingestion of its own; retrieval is a tool you write. It is not a low-code canvas, so if the people who own the conversation design are not comfortable in Python, Typebot or Dify will be more approachable at the cost of weaker behaviour control. And the guideline model does not make prompt injection go away; a customer can still try to talk the agent out of its rules, so the usual defences apply, with the difference that here the rules are re-asserted every turn rather than stated once.

Evaluate it like software, because it is

The reason to pick Parlant over a hand-rolled prompt is that guidelines are testable: each has a condition you can construct a message for, and the server reports which guidelines it matched on every turn. Build 30 or 40 scripted conversations covering the rules you care about, run them against every change to the guideline set, and watch the match log, not just the final text. That is the evals-before-vibes discipline, and Parlant's structure makes it cheap. Add Langfuse if you want the per-call traces kept for longer than a session.

What I'd do

Use Parlant for exactly one thing: a customer-facing agent whose mistakes cost money or trust, such as support, bookings or intake. Run the server on-premise, front it with a capable instruction-following model (a hosted frontier model if the data allows, a large local one through an OpenAI-compatible endpoint if it does not), write the first 10 guidelines from your existing support macros, and build the scripted test set before you go live. For an internal assistant, a research agent, or anything where a wrong answer is merely annoying, a plain framework or a chat UI is less work, and Parlant's control loop is overhead you do not need.

Similar self-hosted ai apps