Overview
Parlant is an open-source framework for building production-ready LLM agents. Rather than relying solely on fragile system prompts, Parlant introduces structured behavioral constructs (guidelines, journeys, variables, and tool attachments) that are matched and enforced at runtime so agents follow business rules reliably.
Key Concepts and Features
- Guidelines: Natural-language rules with conditions and enforced actions. Guidelines let you express behaviour in plain language (e.g., “if user asks about refunds, check order status first”) and have the framework match and apply them contextually.
- Journeys: Define conversational flows and steps so agents can guide users through multi-step tasks consistently.
- Tool Integration: Attach external APIs, data fetchers, or backend services to specific events or guidelines. Tools are first-class, decorated functions in the SDK that the agent can call deterministically.
- Canned Responses & Domain Adaptation: Use templates and domain glossaries to avoid hallucinations and maintain consistent tone and terminology.
- Explainability: Parlant provides logs and explainability features so developers can see which guideline matched and why a certain action was taken.
- Deployment & SDKs: Distributed as a Python package (pip install parlant), runs with a Server context, and offers a drop-in React widget for frontends.
Typical Usage
Developers install the package, register tools, create an agent and define variables/guidelines. Example (from README):
import parlant.sdk as p
@p.tool
async def get_weather(context: p.ToolContext, city: str) -> p.ToolResult:
return p.ToolResult(f"Sunny, 72°F in {city}")
async with p.Server() as server:
agent = await server.create_agent(name="WeatherBot")
await agent.create_variable(name="current-datetime", tool=get_datetime)
await agent.create_guideline(
condition="User asks about weather",
action="Get current weather and provide a friendly response",
tools=[get_weather]
)Why It Matters
Parlant addresses common production pain points: agents ignoring prompts, inconsistent handling of edge cases, and hallucinations in critical flows. By shifting from monolithic system prompts to enforceable, composable rules and tool bindings, teams can scale predictable conversational behaviour and satisfy compliance requirements in domains like finance, healthcare, legal tech, and e-commerce.
Ecosystem & Community
- Repository and docs are available on GitHub and the project maintains an official site (https://www.parlant.io) with quickstarts and examples.
- The project provides translations of the README, a Discord community, and example integrations (React widget, PyPI package).
- License: Apache 2.0 — suitable for commercial use.
Metrics & Status
According to the repository metadata, the project was created on 2024-02-15 and had strong community attention (reported stars in the README metadata: ~17k stars). It is designed for Python 3.10+ and aims at production integration rather than research prototyping.
