Skip to main content

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.

build security pypi license python PRs welcome

๐Ÿ’ป GitHub ยท ๐Ÿ“ฆ PyPI ยท ๐Ÿ“– Design & Architecture ยท ๐Ÿ“˜ Usage Guide ยท ๐Ÿ› Issues

๐Ÿ“ฆ Install with pip install pykel โ€” the PyPI distribution is named pykel (the kel name was already registered), but the import stays import kel and the CLI command stays kel.


โœจ 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 pykel               # from PyPI โ€” import kel, run `kel`, same as always
pip install "pykel[anthropic]"  # + Anthropic
pip install "pykel[openai]"     # + OpenAI
pip install "pykel[gemini]"     # + Google Gemini
pip install "pykel[mistral]"    # + Mistral
pip install "pykel[qdrant]"     # + Qdrant vector store
pip install "pykel[all]"        # everything

Working from a clone instead: pip install -e ".[dev]" (or -e ".[all]" for every extra).

โšก 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

pykel-1.1.0.tar.gz (163.3 kB view details)

Uploaded Source

Built Distribution

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

pykel-1.1.0-py3-none-any.whl (134.1 kB view details)

Uploaded Python 3

File details

Details for the file pykel-1.1.0.tar.gz.

File metadata

  • Download URL: pykel-1.1.0.tar.gz
  • Upload date:
  • Size: 163.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pykel-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b1a3a2971c396e60639e50ee6246ec582b3dc06d4094903c5ae5bd50413556f6
MD5 a8d755317f3fd8b8373e75c6f011cabc
BLAKE2b-256 0adf648cc37540eb317a94a186501c09e9ff8b7574c1cc25faf302816fb21f70

See more details on using hashes here.

File details

Details for the file pykel-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pykel-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 134.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pykel-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3914b23a9e5d943209025c445cd277f6d23b5f75183bb510225169085cd7cd54
MD5 b56befb839a05f54fb6abb2a03afdcee
BLAKE2b-256 eaad5732628940775f50898f5173baf0294b8a8ae7ab835107ace5efead381e0

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