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
-
Clone the repository
git clone <repo-url> cd chatbot-builder
-
Install dependencies
# Using pip pip install -e . # Or using poetry poetry install
-
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chatlie-0.8.1.tar.gz.
File metadata
- Download URL: chatlie-0.8.1.tar.gz
- Upload date:
- Size: 106.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53fcbbe98230c920b2e78019d91ee854a6ad626a55c3b96fad73ba0dde3cf65f
|
|
| MD5 |
894d2ed07f418679a2c71199128191b7
|
|
| BLAKE2b-256 |
7416780f8233d12faaa1cdb95c0dba0b0df076385213016889ef70e0672996f6
|
File details
Details for the file chatlie-0.8.1-py3-none-any.whl.
File metadata
- Download URL: chatlie-0.8.1-py3-none-any.whl
- Upload date:
- Size: 93.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f437f1ace8060e9db3cee044707302ca7374c6e75e83a50c0fe01535abba01be
|
|
| MD5 |
8715954d7d18d3a163d40c3092c411cf
|
|
| BLAKE2b-256 |
43a61d44bbc9dc4dd11455c224ba3ab4df6ff3f7b8372b61d0f6dbb0846a6633
|