Skip to content
chatflow-agent logochatflow-agent
chatflow-agent v0.3.4 • Python >= 3.10

Build Contextual Multi-Agent Systems in Python

Lightweight, async-first Python framework for conversational AI agents with native handoffs, SQLite-backed session persistence, and production-ready channel integrations.

Installation & Quickstart

Install the published package and get a persistent multi-agent runner operational in under a minute.

$pip install chatflow-agent
quickstart.py
import asyncio
from chatflow_agent import Agent, Runner, SQLiteSessionStore

# 1. Define a specialized conversational agent
support_agent = Agent(
    name="SupportAgent",
    instructions="You are a helpful customer support agent. Answer questions or delegate.",
    model="gemini-2.5-flash",
)

# 2. Initialize Runner with persistent SQLite session store
runner = Runner(
    starting_agent=support_agent,
    session_store=SQLiteSessionStore("chatflow_sessions.db"),
)

# 3. Process conversation turn asynchronously
async def main():
    response = await runner.run_async(
        session_id="user_session_42",
        user_message="Hello! How do I connect this agent to WhatsApp?",
    )
    print(response.content)

if __name__ == "__main__":
    asyncio.run(main())
Native asyncioSQLite State & Rollback
Python >= 3.10

Explore the Documentation

Comprehensive guides, architecture overviews, and verified Python examples for every stage of your conversational workflow.

Installation & Setup

Set up your Python virtual environment, install chatflow-agent, and configure provider credentials.

Multi-Agent Handoffs

Architect specialized agents, configure runner lifecycle, and delegate conversation turns deterministically.

Production Webhooks & API

Integrate incoming webhooks with HMAC signatures, deploy with FastAPI, and connect real-time channels.

Engineered for Real-World Conversational Workflows

Everything you need to deploy reliable multi-agent applications without monolithic orchestration bloat.

Native Multi-Agent Handoffs

Seamless context-aware delegation between specialized agents while preserving conversation history and state.

Production-Ready Channels

Built-in channel adapters for WhatsApp, Telegram, Webhooks with HMAC signature verification, and interactive CLI.

Multi-Provider LLM Engines

Works out of the box with Google Gemini, Gemma, OpenAI, Anthropic Claude, and xAI Grok with unified configuration.

SQLite Session State & Memory

Built-in SQLite persistence, conversational turn history, turn rollbacks, and sequential execution preventing race conditions.

Async-First Performance

Built natively on Python asyncio to handle concurrent messaging traffic and real-time webhook streams with low overhead.

Extensible Tool Calling

Equip agents with custom Python functions, automatic schema generation, and safe execution within multi-turn dialogues.

Open Source

Open Source & Community-Driven

chatflow-agent is an open-source project released under the MIT License, created and led by Gustavo Baranda with contributions from developers worldwide.