Parlant is a Python framework for building customer-facing conversational agents whose behaviour is defined as explicit rules rather than a long system prompt. Instead of asking the model to remember many instructions, you declare guidelines as condition and action pairs, optionally attached to tools, and the engine matches the relevant ones to the current conversational state before each response is generated.
When a message arrives, the engine matches guidelines and resolves the journey state, calls the tools associated with that context, and then either generates a message (fluid output mode) or returns a canned response (strict output mode). Journeys define step-by-step customer flows; behavioural guidelines are written in natural language; tools attach external APIs, data fetchers, or backend services to specific interaction events; a glossary teaches domain terminology; canned responses provide templates for consistent style; and explainability reports why and when each guideline was matched and followed. Context variables, such as the current date and time, can be refreshed on a configurable interval.
An agent is defined in code with the parlant.sdk package: a Server context, createagent, createguideline, create_variable, and @p.tool decorated functions that return ToolResult. A local test playground runs on port 8800, and an official React chat widget can be embedded in a web app. The parlant.testing module provides a scenario suite with an InteractionBuilder to preload conversation history, send a customer message, and assert on the reply using an LLM-as-a-judge should(...) check, run with parlant-test. Python 3.10 or newer is required.
Features
- Guidelines: condition and action rules in natural language, matched contextually and optionally bound to tools
- Journeys: defined customer flows that specify how the agent responds at each step
- Tool use: external APIs, data fetchers, and backend services attached to specific interaction events
- Domain glossary: domain-specific terminology and personalised responses
- Canned responses: response templates for a strict output mode alongside generated fluid output
- Explainability: a record of why and when each guideline was matched and followed
- Context variables: tool-backed values refreshed on a configurable interval
- Testing framework: scenario suites with preloaded history and LLM-as-a-judge assertions via parlant-test
- React widget: a drop-in chat UI for web apps
- Conversation analytics: insight into agent behaviour across conversations
