Skip to main content

Universal agentic OS: a normalized model gateway plus observability, budget, context/memory, retrieval, and runtime subsystems for building agents.

Project description

๐Ÿง  kel โ€” The Open-Source Agentic AI Framework for Python

kel is a universal, production-grade agentic AI framework for Python โ€” a normalized multi-provider model gateway plus observability, budget control, memory, retrieval (RAG), multi-agent orchestration, self-healing, and testing, built from the ground up to fix the production pain points that LLM orchestration frameworks commonly leave unsolved: opaque execution, no native cost control, no deterministic 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 license python PRs welcome

๐Ÿ“– DESIGN.md โ€” full architecture, scope, and the reasoning behind every tradeoff ๐Ÿ“˜ USAGE.md โ€” a working guide to every subsystem, with real code examples


โœจ 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 .github/workflows/security.yml.

๐Ÿค Contributing

Issues and PRs welcome. 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

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.0.tar.gz (143.6 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.0-py3-none-any.whl (124.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pykel-1.0.0.tar.gz
  • Upload date:
  • Size: 143.6 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.0.tar.gz
Algorithm Hash digest
SHA256 68814743e84a1416b98e4ee600df3d7b680f458d01663cd566fdd9c65eaa50ae
MD5 16c6a6300b50e324b7256932b1839e43
BLAKE2b-256 ec376ca78411f3e721384c73e16efe42ae177351026fe06c34c1cec815dce23c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pykel-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 124.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 779eea4f9cf12c1e638ae4b73c60f549e2eaf71b22b4f20724c92be87be48c06
MD5 170e53184916e049349932d541aa8410
BLAKE2b-256 ddc4b31810afa5f4dfb032e7c10abee6e6cd577626860faaf8dcaab5018f4b3d

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