A production-grade agentic AI framework for Python: a unified multi-provider model gateway with built-in observability, cost governance, memory, retrieval (RAG), multi-agent orchestration, and deterministic testing.
Project description
๐ง kel โ The Open-Source Agentic AI Framework for Python
kel is a production-grade agentic AI framework for Python: a unified multi-provider model gateway with built-in observability, cost governance, memory, retrieval (RAG), multi-agent orchestration, self-healing, and deterministic testing โ engineered to close the gaps that LLM orchestration frameworks commonly leave open: opaque execution, no native cost control, no reproducible testing, and context/loop failures.
If you're evaluating AI agent frameworks, production-ready agent orchestration libraries, or a Python framework for building autonomous AI agents with real observability and cost governance โ this is built for exactly that.
๐ป GitHub ยท ๐ฆ PyPI ยท ๐ Design & Architecture ยท ๐ Usage Guide ยท ๐ Issues
๐ฆ Install with
pip install pykelโ the PyPI distribution is named pykel (thekelname was already registered), but the import staysimport keland the CLI command stayskel.
โจ Why kel
| ๐ฏ Common pain point in LLM orchestration frameworks | โ How kel solves it |
|---|---|
| ๐ณ๏ธ No first-class tracing โ bolt on a third-party observability product or go without | ๐ Every call traced by default, self-hostable via Grafana/OTel |
| ๐ธ Hidden token/cost consumption, surprise bills | ๐ฐ Budget objects threaded through every call โ hard caps, not suggestions |
| ๐งต Deeply nested abstractions, painful debugging | ๐ชถ Flat, composable classes โ no multi-layer wrapper hierarchies to step through |
| ๐ Agents loop forever, no stuck-loop detection | ๐ Built-in stuck-loop + step-budget guardrails |
| ๐งช No deterministic testing story | ๐ฌ Record/replay testing โ real API calls once, deterministic CI forever |
| ๐ค Multi-agent state gets lost between agents | ๐ Shared context bus โ downstream agents see what upstream agents decided |
| ๐ Real disclosed CVEs (deserialization, path traversal, SQLi) | ๐ก๏ธ Hardened by design โ restricted unpickling, parameterized queries, Trivy-scanned every push |
| ๐ Forces credentials everywhere | โ๏ธ Credentials optional by design โ works natively on EC2/EKS/IAM roles, IRSA, self-hosted anonymous access |
๐ Feature Highlights
- ๐ Model Gateway โ one interface across Anthropic, OpenAI, Cohere, Gemini, Mistral, sync + real async
- ๐ Observability โ every span traced automatically โ console, Grafana, or the built-in live dashboard
- ๐ต Budget & Rate Limiting โ token/cost/tool-call caps + RPM/TPM throttling, composable
- โก Caching โ in-memory or SQLite response caching, never double-charges budget on a hit
- ๐ง Memory โ working / episodic / semantic / procedural, layered like a real cognitive architecture
- ๐ Retrieval (RAG) โ Qdrant, Pinecone, Weaviate, Chroma, pgvector, hybrid search, recursive splitting, PDF loading
- ๐ค Multi-Agent Orchestration โ sequential, supervisor, parallel, and swarm patterns, streaming included
- ๐งญ Brain โ fast rule/embedding routing with LLM fallback, parallel-to-finish scheduling
- ๐ฉน Self-Healing โ diagnosis-driven retries with a non-negotiable idempotency guardrail
- ๐งฐ Built-in Tools โ web search (7 providers), URL fetch, Python/shell exec, SQL query
- โ Testing โ record/replay + LLM-graded evaluation, no live API key needed in CI
- ๐ฅ๏ธ Live Monitoring Dashboard โ zero-dependency, real-time metrics + logs in your browser
- ๐ DevSecOps Built In โ Trivy vulnerability/secret scanning,
pip-audit, and Bandit SAST on every push
๐ฆ Install
pip install -e ".[dev]" # core + test tooling
pip install -e ".[anthropic]" # + Anthropic
pip install -e ".[openai]" # + OpenAI
pip install -e ".[gemini]" # + Google Gemini
pip install -e ".[mistral]" # + Mistral
pip install -e ".[qdrant]" # + Qdrant vector store
pip install -e ".[all]" # everything
โก Quickstart
from kel import get_model, Message
model = get_model("anthropic:claude-sonnet-5", api_key="...")
response = model.generate([Message.user("Hello!")])
print(response.text)
Swapping providers is a one-line change โ same interface, zero rewrites:
model = get_model("openai:gpt-5.2", api_key="...")
model = get_model("gemini:gemini-2.5-flash") # falls back to env vars / ADC
model = get_model("mistral:mistral-large-latest") # falls back to MISTRAL_API_KEY
๐ฉบ Status
Every subsystem in DESIGN.md has a working, tested implementation โ model gateway, observability, budget, context/loop, memory, retrieval, specs, runtime graph, multi-agent orchestration, brain, self-healing, testing, storage, SDK/CLI, monitoring dashboard, and realtime orchestration (interfaces only, by design โ see DESIGN.md ยง7). Known gaps are listed honestly at the bottom of USAGE.md โ no overclaiming.
๐ก๏ธ Security
Every push and pull request runs a full DevSecOps pipeline: Trivy filesystem + secret scanning, pip-audit for known CVEs in dependencies, and Bandit static analysis over the codebase. Results surface in the repo's Security tab. See security.yml. To report a vulnerability, see SECURITY.md.
๐ค Contributing
Issues and PRs welcome โ see CONTRIBUTING.md. Adding a new model provider, vector store, or tool follows the same lazy-import adapter pattern throughout the codebase โ see any file under src/kel/models/providers/ for the template.
๐ License
MIT ยฉ kvenkatprasad
Project 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 pykel-1.0.1.tar.gz.
File metadata
- Download URL: pykel-1.0.1.tar.gz
- Upload date:
- Size: 144.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0351dbba5119aa52e05e3364274ce53e4086efcc0b16893710fb7fb557c3fb2a
|
|
| MD5 |
f46e574ed2637f29247926b845fcba6e
|
|
| BLAKE2b-256 |
49ab4a5f3c70d9e98042e9bf2d2fc3dc027d776e4c3209fbd99a1c272c0d0ec8
|
File details
Details for the file pykel-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pykel-1.0.1-py3-none-any.whl
- Upload date:
- Size: 124.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd188c72d57166c5daaea01467be860c498fa2c706e1edb044ddc3c6c6178273
|
|
| MD5 |
3b531db72e44f428c2d3f6c372ac72f4
|
|
| BLAKE2b-256 |
47519c6660e40d4e5491b7e9a45a1ba997824205022cad3fb0162e2d4c2430ee
|