Installation & Setup
Set up your Python virtual environment, install chatflow-agent, and configure provider credentials.
Lightweight, async-first Python framework for conversational AI agents with native handoffs, SQLite-backed session persistence, and production-ready channel integrations.
Install the published package and get a persistent multi-agent runner operational in under a minute.
pip install chatflow-agentimport 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())
Comprehensive guides, architecture overviews, and verified Python examples for every stage of your conversational workflow.
Set up your Python virtual environment, install chatflow-agent, and configure provider credentials.
Architect specialized agents, configure runner lifecycle, and delegate conversation turns deterministically.
Integrate incoming webhooks with HMAC signatures, deploy with FastAPI, and connect real-time channels.
Everything you need to deploy reliable multi-agent applications without monolithic orchestration bloat.
Seamless context-aware delegation between specialized agents while preserving conversation history and state.
Built-in channel adapters for WhatsApp, Telegram, Webhooks with HMAC signature verification, and interactive CLI.
Works out of the box with Google Gemini, Gemma, OpenAI, Anthropic Claude, and xAI Grok with unified configuration.
Built-in SQLite persistence, conversational turn history, turn rollbacks, and sequential execution preventing race conditions.
Built natively on Python asyncio to handle concurrent messaging traffic and real-time webhook streams with low overhead.
Equip agents with custom Python functions, automatic schema generation, and safe execution within multi-turn dialogues.
chatflow-agent is an open-source project released under the MIT License, created and led by Gustavo Baranda with contributions from developers worldwide.