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 -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

pykel-1.0.1.tar.gz (144.1 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.0.1-py3-none-any.whl (124.3 kB view details)

Uploaded Python 3

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

Hashes for pykel-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0351dbba5119aa52e05e3364274ce53e4086efcc0b16893710fb7fb557c3fb2a
MD5 f46e574ed2637f29247926b845fcba6e
BLAKE2b-256 49ab4a5f3c70d9e98042e9bf2d2fc3dc027d776e4c3209fbd99a1c272c0d0ec8

See more details on using hashes here.

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

Hashes for pykel-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd188c72d57166c5daaea01467be860c498fa2c706e1edb044ddc3c6c6178273
MD5 3b531db72e44f428c2d3f6c372ac72f4
BLAKE2b-256 47519c6660e40d4e5491b7e9a45a1ba997824205022cad3fb0162e2d4c2430ee

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