Skip to main content

No project description provided

Project description

Parlant Logo

Parlant

A structured approach to building and guiding customer-facing AI agents

Website | Introduction | Installation | Tutorial | About

PyPI - Version PyPI - Python Version Apache 2 License GitHub last commit Discord

Parlant Preview

What is Parlant?

Parlant is a structured way to create and manage guided customer-facing AI agents. It lets you build robust agents from scratch; or, in more advanced cases, a robust interaction layer for your prebuilt agents.

Structure is what lets Parlant get better accuracy than most other agentic frameworks. It allows Parlant to run pinpointed, real-time conformance checks that ensure your agents adhere to your instruction. It also gives you specific feedback on where agents may have misinterpreted your instructions, so you can quickly troubleshoot and improve.

Just as importantly, Parlant's way of breaking behavioral guidance down to different elements helps it understand your intentions better. Using this understanding, Parlant actively gives you feedback on your configuration to help you maintain a behavioral configuration for your agents that's coherent and free of confusing contradictions.

Why use Parlant?

Building conversational AI agents is relatively simple for most developers—at least, it's relatively simple to build an initial prototype.

But these prototypes are rarely ready to meet customers. Once the prototype is functional, it has to be continually tuned so that its behavior actually provides customers with a good experience that business stakeholders approve.

With DIY prompt-engineering, reliably incorporating feedback from stakeholders is challenging, as simple implementations tend to be fragile and inconsistent.

Parlant bridges this gap by making it easy and fast for developers to adjust the behavior of AI agents reliably, allowing you to iterate quickly with feedback from customers and business stakeholders.

Real-world impact

Revenued, a business capital provider, could get into trouble if their AI agents make false or misleading claims.

With Parlant, they've been able to quickly integrate feedback from customer service experts and then test and verify that the agents aren't making problematic promises or statements to customers.

Key benefits

Control that actually works

  • Guidelines: Control responses by writing contextual rules - like "offer limited time coupons if it's a holiday" or "make it very clear we don't offer loans if a customer asks about it". By using condition/action definitions, you define exactly when and how your agent should respond
  • Glossary: Teach your agent your business-specific terminology so that both you and your customers can speak to it naturally in your language
  • Coherence checks: Catch conflicts by having Parlant evaluate new guidelines against existing ones before they're applied
  • Dynamic context: Make your agent context-aware by setting user-specific variables like customer account or subscription tier. These shape how your agent responds to each user
  • Guided tool use: Control API access by linking tools to specific guidelines. This way, your agent only calls APIs when appropriate and with clear intent

Developer friendly

  • See changes instantly: Modify behavior on the fly by updating guidelines directly, no retraining or redeployment needed
  • Track changes in Git: Manage agent behavior like code by storing configuration as JSON in your repo. Review, rollback, branch, and merge just like any other code
  • Clean architecture: Separate concerns by keeping business logic in tools and conversation patterns in guidelines. Each piece does what it does best
  • Type safety: Build rapidly using native TypeScript/JavaScript SDKs with proper type definitions

Deploy with confidence

  • Reliable at scale: Parlant filters and selects guidelines per context, allowing you to scale your agent's complexity and use-cases while maintaining consistent, focused behavior
  • Debug with ease: Troubleshoot effectively by tracing which guidelines were applied and why for any given response
  • Test before deploy: Validate changes using the built-in chat UI to test new behaviors before they reach customers

Works with all major LLM providers

Getting started

$ pip install parlant
$ parlant-server
$ # Open http://localhost:8000 and play

Install client SDKs:

$ # For Python clients:
$ pip install parlant-client
$ # For TypeScript clients:
$ npm install parlant-client

To start building with Parlant, visit our documentation portal.

Need help? Send us a message on Discord. We're happy to answer questions and help you get up and running!

Usage Example

Adding a guideline for an agent—for example, to ask a counter-question to get more info when a customer asks a question:

parlant guideline create \
    --agent-id CUSTOMER_SUCCESS_AGENT_ID
    --condition "a free-tier customer is asking how to use our product" \
    --action "first seek to understsand what they're trying to achieve"

In Parlant, Customer-Agent interaction happens asynchronously, to enable more natural customer interactions, rather than forcing a strict and unnatural request-reply mode.

Here's a basic example of a simple client (using the TypeScript client SDK):

import { ParlantClient } from 'parlant-client';

const client = ParlantClient({ environment: SERVER_ADDRESS });

session_id = "...";

// Post customer message
const customerEvent = await client.sessions.createEvent(session_id, {
   kind: "message",
   source: "customer",
   message: "Hey, I'd like to book a room please",
});

// Wait for and get the agent's reply
const [agentEvent] = (await client.sessions.listEvents(session_id, {
   kinds: "message",
   source: "ai_agent",
   minOffset: customerEvent.offset,
   waitForData: 60 // Wait up to 60 seconds for an answer
}));

// Print the agent's reply
const { agentMessage } = agentEvent.data as { message: string };
console.log(agentMessage);

// Inspect the details of the message generation process
const { trace } = await client.sessions.inspectEvent(
   session_id,
   agentEvent.id
);

Contributing

We're currently finalizing our Contributor License Agreement (CLA). Full contribution guidelines will be available soon!

Want to get involved? Join us on Discord and let's discuss how you can help shape Parlant. We're excited to work with contributors directly while we set up our formal processes!

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

parlant-1.1.0.tar.gz (475.8 kB view details)

Uploaded Source

Built Distribution

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

parlant-1.1.0-py3-none-any.whl (573.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parlant-1.1.0.tar.gz
  • Upload date:
  • Size: 475.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.5 Darwin/23.5.0

File hashes

Hashes for parlant-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f26ea0f1bb681cb5e9a82cad8b93806fd54bc9c789af3eb417a1198009fd7ff5
MD5 5fbe0df4c636a63d2fadf3c2ddc70e5c
BLAKE2b-256 49aabbeb53e133337090d5a6c3bd7240b242201529901f75aeb777ecf92805c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: parlant-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 573.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.5 Darwin/23.5.0

File hashes

Hashes for parlant-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8240a12931cf466523036354a56adedce89915eb144cc4dc5d40dc85e250cd60
MD5 8364ddd14f7e6238b5fe5e9f28c11cf9
BLAKE2b-256 12f7d68d19f5aecf76f28b2f8ad0f3e146ded28af401c06a5be2f5f9965c74df

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