Skip to content

Repository files navigation

Parlant - AI Agent Framework

Finally, LLM agents that actually follow instructions

🌐 Website⚡ Quick Start💬 Discord📖 Examples

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

PyPIPython 3.10+LicenseDiscordGitHub 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 ✅awaitagent.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.

🚀 Get Your Agent Running in 60 Seconds

pip install parlant
importparlant.sdkasp@p.toolasyncdefget_weather(context: p.ToolContext, city: str) ->p.ToolResult:
# Your weather API logic herereturnp.ToolResult(f"Sunny, 72°F in {city}")
@p.toolasyncdefget_datetime(context: p.ToolContext) ->p.ToolResult:
fromdatetimeimportdatetimereturnp.ToolResult(datetime.now())
asyncdefmain():
asyncwithp.Server() asserver:
agent=awaitserver.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.awaitagent.create_variable(name="current-datetime", tool=get_datetime)
# Control and guide agent behavior with natural languageawaitagent.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__":
importasyncioasyncio.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 ServicesHealthcareE-commerceLegal Tech
Compliance-first designHIPAA-ready agentsCustomer service at scalePrecise legal guidance
Built-in risk managementPatient data protectionOrder processing automationDocument 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

About

LLM agents built for control. Designed for real-world use. Deployed in minutes.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages