Skip to main content

No project description provided

Project description

Parlant - AI Agent Framework

Finally, LLM agents that actually follow instructions

🌐 Website⚡ Quick Start💬 Discord📖 Examples

Deutsch | Español | français | 日本語 | 한국어 | Português | Русский | 中文

PyPI Python 3.10+ License Discord GitHub Repo stars

Trending on TrendShift

🎯 The Problem Every AI Developer Faces

You build an AI agent. It works great in testing. Then real users start talking to it and...

  • ❌ It ignores your carefully crafted system prompts
  • ❌ It hallucinates responses in critical moments
  • ❌ It can't handle edge cases consistently
  • ❌ Each conversation feels like a roll of the dice

Sound familiar? You're not alone. This is the #1 pain point for developers building production AI agents.

⚡ The Solution: Stop Fighting Prompts, Teach Principles

Parlant flips the script on AI agent development. Instead of hoping your LLM will follow instructions, Parlant ensures it.

# Traditional approach: Cross your fingers 🤞
system_prompt = "You are a helpful assistant. Please follow these 47 rules..."

# Parlant approach: Ensured compliance ✅
await agent.create_guideline(
    condition="Customer asks about refunds",
    action="Check order status first to see if eligible",
    tools=[check_order_status],
)

Parlant gives you all the structure you need to build customer-facing agents that behave exactly as your business requires:

  • Journeys: Define clear customer journeys and how your agent should respond at each step.

  • Behavioral Guidelines: Easily craft agent behavior; Parlant will match the relevant elements contextually.

  • Tool Use: Attach external APIs, data fetchers, or backend services to specific interaction events.

  • Domain Adaptation: Teach your agent domain-specific terminology and craft personalized responses.

  • Canned Responses: Use response templates to eliminate hallucinations and guarantee style consistency.

  • Explainability: Understand why and when each guideline was matched and followed.

How It Works

When your agent receives a message, Parlant's engine prepares a fully-aligned response before generating it:

%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#e8f5e9', 'primaryTextColor': '#1b5e20', 'primaryBorderColor': '#81c784', 'lineColor': '#66bb6a', 'secondaryColor': '#fff9e1', 'tertiaryColor': '#F3F5F6'}}}%%
flowchart LR
    A(User):::outputNode

    subgraph Engine["Parlant Engine"]
        direction LR
        B["Match Guidelines and Resolve Journey States"]:::matchNode
        C["Call Contextually-Associated Tools"]:::toolNode
        D["Generated Message"]:::composeNode
        E["Canned Message"]:::cannedNode
    end

    A a@-->|💬 User Input| B
    B b@--> C
    C c@-->|Fluid Output Mode?| D
    C d@-->|Strict Output Mode?| E
    D e@-->|💬 Fluid Output| A
    E f@-->|💬 Canned Output| A

    a@{animate: true}
    b@{animate: true}
    c@{animate: true}
    d@{animate: true}
    e@{animate: true}
    f@{animate: true}

    linkStyle 2 stroke-width:2px
    linkStyle 4 stroke-width:2px
    linkStyle 3 stroke-width:2px,stroke:#3949AB
    linkStyle 5 stroke-width:2px,stroke:#3949AB

    classDef composeNode fill:#F9E9CB,stroke:#AB8139,stroke-width:2px,color:#7E5E1A,stroke-width:0
    classDef cannedNode fill:#DFE3F9,stroke:#3949AB,stroke-width:2px,color:#1a237e,stroke-width:0

The guidelines and tools relevant to the current conversational state are carefully matched and enforced, keeping your agent focused and aligned, even with complex behavioral configurations.

🚀 Get Your Agent Running in 60 Seconds

pip install parlant
import parlant.sdk as p

@p.tool
async def get_weather(context: p.ToolContext, city: str) -> p.ToolResult:
    # Your weather API logic here
    return p.ToolResult(f"Sunny, 72°F in {city}")

@p.tool
async def get_datetime(context: p.ToolContext) -> p.ToolResult:
    from datetime import datetime
    return p.ToolResult(datetime.now())

async def main():
    async with p.Server() as server:
        agent = await server.create_agent(
            name="WeatherBot",
            description="Helpful weather assistant"
        )

        # Have the agent's context be updated on every response (though
        # update interval is customizable) using a context variable.
        await agent.create_variable(name="current-datetime", tool=get_datetime)

        # Control and guide agent behavior with natural language
        await agent.create_guideline(
            condition="User asks about weather",
            action="Get current weather and provide a friendly response with suggestions",
            tools=[get_weather]
        )

        # Add other (reliably enforced) behavioral modeling elements
        # ...

        # 🎉 Test playground ready at http://localhost:8800
        # Integrate the official React widget into your app,
        # or follow the tutorial to build your own frontend!

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

That's it! Your agent is running with ensured rule-following behavior.

🎬 See It In Action

Parlant Demo

🔥 Why Developers Are Switching to Parlant

🏗️ Traditional AI Frameworks

Parlant

  • Write complex system prompts
  • Hope the LLM follows them
  • Debug unpredictable behaviors
  • Scale by prompt engineering
  • Cross fingers for reliability
  • Define rules in natural language
  • Ensured rule compliance
  • Predictable, consistent behavior
  • Scale by adding guidelines
  • Production-ready from day one

🎯 Perfect For Your Use Case

Financial Services Healthcare E-commerce Legal Tech
Compliance-first design HIPAA-ready agents Customer service at scale Precise legal guidance
Built-in risk management Patient data protection Order processing automation Document review assistance

🛠️ Enterprise-Grade Features

  • 🧭 Conversational Journeys - Lead the customer step-by-step to a goal
  • 🎯 Dynamic Guideline Matching - Context-aware rule application
  • 🔧 Reliable Tool Integration - APIs, databases, external services
  • 📊 Conversation Analytics - Deep insights into agent behavior
  • 🔄 Iterative Refinement - Continuously improve agent responses
  • 🛡️ Built-in Guardrails - Prevent hallucination and off-topic responses
  • 📱 React Widget - Drop-in chat UI for any web app
  • 🔍 Full Explainability - Understand every decision your agent makes

📈 Join 10,000+ Developers Building Better AI

Companies using Parlant:

Financial institutions • Healthcare providers • Legal firms • E-commerce platforms

Star History Chart

🌟 What Developers Are Saying

"By far the most elegant conversational AI framework that I've come across! Developing with Parlant is pure joy." — Vishal Ahuja, Senior Lead, Customer-Facing Conversational AI @ JPMorgan Chase

🏃‍♂️ Quick Start Paths

🎯 I want to test it myself → 5-minute quickstart
🛠️ I want to see an example → Healthcare agent example
🚀 I want to get involved → Join our Discord community

🤝 Community & Support

📄 License

Apache 2.0 - Use it anywhere, including commercial projects.


Ready to build AI agents that actually work?

Star this repo • 🚀 Try Parlant now • 💬 Join Discord

Built with ❤️ by the team at Emcie

Project details


Release history Release notifications | RSS feed

This version

3.1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parlant-3.1.1.tar.gz (82.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parlant-3.1.1-py3-none-any.whl (87.3 MB view details)

Uploaded Python 3

File details

Details for the file parlant-3.1.1.tar.gz.

File metadata

  • Download URL: parlant-3.1.1.tar.gz
  • Upload date:
  • Size: 82.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for parlant-3.1.1.tar.gz
Algorithm Hash digest
SHA256 c7d286a6adc46794f6a7067a045cc31500e21e87f947d40af0a5e600b7fefbbc
MD5 b9d2db0a3163bd3b04e2ff014e636e3a
BLAKE2b-256 06f1b184dd8b583da203930740e4155c5ba1ffe6cf3f81af205eca5884d36e90

See more details on using hashes here.

File details

Details for the file parlant-3.1.1-py3-none-any.whl.

File metadata

  • Download URL: parlant-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 87.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for parlant-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae9735d3dd6ee568bf19dd747b2f84052b1e12bdeac3efe3e5ea30e9990d3100
MD5 025461e5ac528fa36685d283397a7dc5
BLAKE2b-256 81b58acfae1fbc4c482340368541070953cfb52884dd6460d4fa4d6871ce0894

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page