Skip to main content

Chatbot Framework

A production-grade Python framework for building embeddable AI chatbots with optional capabilities for SQL databases, web access, RAG (Retrieval-Augmented Generation), validation, and memory management.

Status: 232 tests passing | Type-safe (Pyright strict mode) | Production-ready

Quick Start

Prerequisites

  • Python 3.9+

  • pip or poetry

Installation

  1. Clone the repository

    git clone <repo-url>
    
    cd chatbot-builder
    
  2. Install dependencies

    # Using pip
    
    pip install -e .
    
    # Or using poetry
    
    poetry install
    
  3. Verify installation

    pytest tests/ -q
    

Build & Run

Run all tests:

pytest tests/ -q

Run specific test suite:

pytest tests/unit/ -v

pytest tests/integration/ -v

Type checking:

pyright src/

Code formatting & linting:

ruff check src/

ruff format src/

Features

  • Agentic Loop: Plan → Execute → Observe → Replan

  • Multi-Capability: SQL, Web, RAG integration

  • Quality Control: Built-in validators and reflection

  • Memory Management: Conversation history and context

  • Security: Credential filtering, authorization checks

  • Observability: Structured event tracking

  • Modular Design: Use only what you need

Project Structure


src/chatbot_framework/

├── core/              # Core chatbot engine

├── adapters/          # LLM, DB, and RAG providers

├── planning/          # Query planning engine

├── rag/               # Retrieval-Augmented Generation

├── sql/               # Database query handling

├── tools/             # Built-in tools

├── validation/        # Quality control

├── reflection/        # Self-evaluation

├── memory/            # Conversation memory

├── observability/     # Event tracking

└── web/               # Web capabilities

examples/              # Sample implementations

tests/                 # Test suites

Examples

See the examples/ directory for sample implementations:

  • 01_minimal_chatbot.py - Basic setup

  • 02_knowledge_chatbot.py - With RAG

  • 03_enterprise_chatbot.py - Full features

  • 06_sql_and_rag_chatbot.py - SQL + RAG

  • 07_fastapi_integration.py - API integration

  • 11_local_llm_ollama.py - Local LLM support

Configuration

Configure the framework via environment variables or config files:

  • API keys for LLM providers

  • Database connections

  • Vector store settings

  • Security policies

See SIMPLIFIED_API.md for detailed API documentation and INTEGRATION_GUIDE.md for integration examples.

Testing

The project includes comprehensive test coverage:

# All tests

pytest tests/

# Specific module

pytest tests/unit/test_config.py -v

# With coverage

pytest tests/ --cov=src/

Type Safety

The project uses Pyright strict mode for type safety:

pyright src/

Development

Install development dependencies:

pip install -e ".[dev]"

This includes:

  • pytest & pytest plugins

  • pyright

  • ruff

  • type stubs

  • Modular design

  • Composable capabilities

License

See LICENSE file for details.

Download files

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

Source Distribution

chatlie-0.7.9.tar.gz (119.6 kB view details)

Uploaded Source

Built Distribution

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

chatlie-0.7.9-py3-none-any.whl (89.8 kB view details)

Uploaded Python 3

File details

Details for the file chatlie-0.7.9.tar.gz.

File metadata

  • Download URL: chatlie-0.7.9.tar.gz
  • Upload date:
  • Size: 119.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for chatlie-0.7.9.tar.gz
Algorithm Hash digest
SHA256 2c91785344a47d580c09e15c3c93a22649d3c9c16c097f117b9c9726fca5e8a3
MD5 c108c4ab6013c1fdb2dd62f442de2f0a
BLAKE2b-256 ac3e7b6b5b957ba2f519bd9897dfd711eab9337df8a8600c68cd9b0e25dc1fa7

See more details on using hashes here.

File details

Details for the file chatlie-0.7.9-py3-none-any.whl.

File metadata

  • Download URL: chatlie-0.7.9-py3-none-any.whl
  • Upload date:
  • Size: 89.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for chatlie-0.7.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0ba53f4f4cf5f1964fe7df3d5c4c747e478c0e46f64b12893711e41c1159a5e7
MD5 920c2755b9e1af9162c282d48258e003
BLAKE2b-256 b0c636b66b3bf8b60b21872d82f8bee81f98ba85194a807e4edd57c844848f83

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 Sentry Error logging StatusPage Status page