Integrate conversational AI into Python applications in minutes - an async SDK for bots, agents, and autonomous workflows that keeps AI orchestration server-side, so your app stays lightweight and future-proof.

Building conversational AI applications in Python should be simple. ChatBotKit's Python SDK provides a lightweight, fully-async interface for integrating intelligent bots, agents, and conversational workflows into Python applications. Instead of running heavy AI logic locally, the SDK offloads orchestration, model management, and execution to ChatBotKit's servers - so your Python code stays focused on business logic while benefiting from enterprise-grade AI infrastructure.

Unlike local AI frameworks that burden your application with model loading, token management, and execution complexity, the Python SDK keeps your application lean. As new AI models emerge and ChatBotKit adds capabilities, your applications automatically benefit without code changes. This server-first architecture means you build faster, scale easier, and stay compatible with tomorrow's AI innovations.

What You Can Build

Autonomous Agents and Workflows

Create intelligent agents that operate autonomously or in response to user requests:

  • Autonomous Agents: Build agents that make decisions, take actions through skillsets, and accomplish goals with minimal human intervention
  • Workflow Automation: Orchestrate multi-step processes where agents create and manage todo lists, process files, and coordinate with other agents
  • Background Job Processing: Run long-running operations asynchronously using the SDK's fully async architecture
  • Scheduled Triggers: Execute agents on timelines or in response to events

Conversational Interfaces

Build chat experiences and conversational AI into your Python applications:

  • Chat Completions: Stream responses token-by-token for responsive, real-time chat interfaces
  • Multi-turn Conversations: Maintain full conversation history and context across exchanges
  • Session Management: Automatically handle user sessions and conversation persistence
  • Streaming Responses: Real-time token streaming that enables progressive message rendering

Data Access and Manipulation

Access and manage all ChatBotKit resources programmatically:

  • Bots and Conversations: Create, retrieve, and manage bots and ongoing conversations
  • Datasets: Build and search knowledge bases that your bots use for context and retrieval
  • Skillsets and Abilities: Configure agent capabilities and custom actions
  • Spaces and Files: Access collaborative workspaces and managed files
  • Memories: Create, search, and leverage persistent memory systems
  • Contacts and Teams: Manage users, contacts, and team collaboration

Key Features

Fully Async Architecture

Built from the ground up with async/await, the SDK scales efficiently and enables concurrent operations:

Server-Side AI Orchestration

Complex AI operations run on ChatBotKit's infrastructure, not your application. This means:

  • Lightweight Runtime: Your application stays lean - no model loading, no token management overhead
  • Automatic Model Selection: The platform chooses optimal models based on task requirements
  • Future-Proof: New models, capabilities, and optimizations automatically benefit your applications
  • Enterprise Reliability: Benefit from platform-level error handling, retries, and failover

Type-Safe Development

Comprehensive type hints throughout the SDK enable IDE autocomplete and catch errors before runtime:

Unified Resource Access

Access all ChatBotKit resources through a single, intuitive client interface:

Common Use Cases

Python Web Applications

Integrate conversational AI into FastAPI, Django, or other Python web frameworks. The SDK's async nature fits perfectly with modern async web applications:

Data Processing Pipelines

Build AI-powered data workflows that leverage ChatBotKit agents for analysis, extraction, and transformation:

  • Process documents by asking agents to extract key information
  • Generate insights by having agents analyze data and produce summaries
  • Classify and categorize data using conversational AI
  • Create intelligent automation workflows that adapt based on data

Scheduled AI Workflows

Create background jobs that run agents on a schedule or in response to events. Agents can read from datasets, process files from Spaces, create records, and send results to integrations - all without user interaction.

Multi-Agent Orchestration

Coordinate multiple specialized agents working toward a common goal:

Getting Started

Installation

Install the SDK from PyPI:

Or directly from GitHub:

For agent functionality, install with the agent extra:

Requires Python 3.10 or later. The SDK uses httpx for HTTP operations and is fully async.

Basic Setup

Create a client and start chatting:

Configuration

Customize the client with environment-specific settings:

Agent Framework

For advanced use cases, build local agent logic with the agent framework:

Advanced Features

Streaming and Real-Time Updates

The SDK fully supports streaming for real-time token-by-token responses:

Context Management

Use Python's async context managers for clean resource handling:

Error Handling

The SDK provides detailed error information for robust applications:

Concurrent Operations

Leverage Python's async nature to handle multiple operations concurrently:

Integration with Other Features

The Python SDK works seamlessly with all ChatBotKit capabilities:

  • Spaces and Files: Upload files, manage shared workspaces, and access file contents programmatically
  • Datasets: Create and search datasets that power your bots' knowledge bases
  • Memory System: Create, search, and leverage persistent memories within conversations
  • Skillsets: Configure custom abilities and actions that agents can use
  • Tasks and Triggers: Schedule agent execution or trigger workflows based on events
  • Multi-Agent Orchestration: Coordinate multiple specialized agents toward complex goals

Developer Resources

  • GitHub Repository: chatbotkit/python-sdk
  • PyPI Package: chatbotkit on PyPI
  • Python 3.10+: Full async/await support for modern Python applications
  • Example Projects: Sample implementations and patterns in the repository
  • Community Support: Reach out on Discord or GitHub for questions

The Python SDK makes it straightforward to build intelligent, conversational applications in Python while maintaining a lightweight, efficient architecture. Install the package and start building in minutes!