Production-Ready Agentic AI Framework with Enterprise Safety
Project description
๐ช Kite
From idea to running AI agent in one command.
pip install kite-agent
kite generate "customer support agent that tracks orders"
A running, multi-agent Python script. No boilerplate. No config files.
Why Kite?
LangChain gives you 500+ abstractions. AutoGen needs 100 lines of config.
Kite gives you one command โ and a different philosophy.
| LangChain | AutoGen | Kite | |
|---|---|---|---|
| Time to first agent | ~30 min | ~20 min | < 1 min |
| LLM as untrusted component | โ | โ | โ |
| Built-in circuit breaker | โ | โ | โ |
| Kill switch | โ | โ | โ |
| Prompt A/B testing | โ | โ | โ |
| CLI code generation | โ | โ | โ |
| Startup time | ~2s | ~1s | ~50ms |
The core idea: LLMs don't execute. They propose.
Most frameworks let the LLM call tools directly. Kite doesn't.
User request
โ
โผ
LLM (untrusted) โโ proposes โโโถ Kernel (you control)
โ
โโโโโโโโโโโโโดโโโโโโโโโโโ
โ tool whitelisted? โ
โ budget exceeded? โ
โ policy violated? โ
โโโโโโโโโโโโโฌโโโโโโโโโโโ
approved?
YES โ โ NO
Execute Reject + log
# โ Other frameworks: LLM decides what runs
agent.run("delete all test users") # LLM calls delete_user() directly
# โ
Kite: LLM proposes, Kernel validates
shell = ShellTool(allowed_commands=["ls", "git", "df"])
# agent.run("rm -rf /") โ blocked at kernel, never executes
Read the full architecture โ
30-second quickstart
pip install kite-agent
export GROQ_API_KEY=your_key # free at console.groq.com
kite generate "research assistant that searches and summarizes" --out agent.py
python agent.py
Or scaffold a full project:
kite init --type=agent --name=my_bot
cd my_bot && cp .env.example .env
python main.py
Production safety โ built in, not bolted on
from kite import Kite
ai = Kite()
# Circuit breaker โ auto-stops cascading failures
ai.circuit_breaker.config.failure_threshold = 3
ai.circuit_breaker.config.timeout_seconds = 60
# Idempotency โ no duplicate charges, no double-sends
result = ai.idempotency.execute(
operation_id="order_123_refund", # same id = cached result
func=process_refund,
args=(order_id,)
)
# Kill switch โ emergency stop, per-agent or global
ai.kill_switch.activate("Budget limit reached")
agent.kill_switch.activate("This agent only")
5 reasoning patterns
agent = ai.create_agent(name="Bot", agent_type="react", ...) # thinkโactโobserve loop
agent = ai.create_agent(name="Bot", agent_type="rewoo", ...) # plan upfront, run parallel (~2ร faster)
agent = ai.create_agent(name="Bot", agent_type="tot", ...) # explore multiple paths
agent = ai.create_agent(name="Bot", agent_type="plan_execute", ...) # decompose, replan on failure
agent = ai.create_agent(name="Bot", agent_type="reflective", ...) # generate โ critique โ improve
Advanced RAG โ production retrieval, not toy examples
# Load any document type
ai.load_document("docs/policy.pdf") # PDF, DOCX, CSV, HTML, TXT
ai.load_document("data/") # entire directory
# HyDE โ generate hypothetical answer first, then search (โ accuracy)
results = ai.advanced_rag.search("return policy", method="hyde")
# Hybrid search โ BM25 keyword + vector semantic combined
results = ai.advanced_rag.hybrid_search("cancellation steps", alpha=0.5)
# MMR โ remove redundant results, maximize diversity
results = ai.advanced_rag.mmr("pricing tiers", results, lambda_param=0.7)
# Reranking โ Cohere or Cross-encoder for final precision
results = ai.advanced_rag.rerank_cohere("refund eligibility", results)
# Knowledge graph โ multi-hop relationship queries
ai.graph_rag.add_relationship("Order", "belongs_to", "Customer")
answer = ai.graph_rag.query("Which orders belong to premium customers?")
Prompt A/B testing
Test prompts and models on real traffic. No other Python agent framework ships this.
from kite.ab_testing import ABTestManager
ab = ABTestManager()
ab.create_experiment(
name="support_tone",
variants=[
{"name": "formal", "weight": 0.5, "config": {"system_prompt": "You are professional..."}},
{"name": "casual", "weight": 0.5, "config": {"system_prompt": "Hey! Happy to help..."}},
]
)
variant = ab.get_variant("support_tone", user_id="user_123") # consistent per user
ab.record_conversion("support_tone", variant.name)
results = ab.get_results("support_tone")
# โ {"winner": "casual", "confidence": 0.94, "conversions": {...}}
Multi-agent conversation
researcher = ai.create_agent("Researcher", "You gather facts...", agent_type="react")
critic = ai.create_agent("Critic", "You challenge assumptions...")
writer = ai.create_agent("Writer", "You synthesize into prose...")
conversation = ai.create_conversation(
agents=[researcher, critic, writer],
max_turns=9,
termination_condition="consensus"
)
result = await conversation.run("Best pricing strategy for B2B SaaS?")
Smart model routing โ cut costs 60โ80%
# .env
FAST_LLM_MODEL=groq/llama-3.1-8b-instant # routing, simple tasks
SMART_LLM_MODEL=openai/gpt-4o # complex reasoning
from kite.optimization.resource_router import ResourceAwareRouter
router = ResourceAwareRouter(ai.config)
router_a = ai.create_agent("Router", model=router.fast_model, ...)
analyst = ai.create_agent("Analyst", model=router.smart_model, ...)
Human-in-the-loop workflows
pipeline = ai.pipeline.create("approval_flow")
pipeline.add_step("draft", draft_email)
pipeline.add_checkpoint("draft") # โ pauses for human review
pipeline.add_step("send", send_email)
state = await pipeline.execute_async({"to": "customer@example.com"})
final = await pipeline.resume_async(state.task_id, approved=True)
Observability
ai.enable_tracing("run_trace.json") # every event โ JSON file
ai.enable_state_tracking("session.json") # state changes across session
ai.event_bus.subscribe("agent:*", my_callback) # subscribe to any event
ai.add_event_relay("http://localhost:8000/events") # forward to dashboard
print(ai.get_metrics()) # circuit breaker, cache hits, token usage
Works with any LLM
LLM_PROVIDER=groq LLM_MODEL=llama-3.3-70b-versatile # fastest, free tier
LLM_PROVIDER=openai LLM_MODEL=gpt-4o # most capable
LLM_PROVIDER=anthropic LLM_MODEL=claude-3-5-sonnet-... # best reasoning
LLM_PROVIDER=ollama LLM_MODEL=qwen2.5:1.5b # local, free
Switch by changing 2 env vars. Zero code changes.
MCP integrations
from kite.tools.mcp.slack_mcp_server import SlackMCPServer
from kite.tools.mcp.gmail_mcp_server import GmailMCPServer
from kite.tools.mcp.gdrive_mcp_server import GDriveMCPServer
from kite.tools.mcp.postgres_mcp_server import PostgresMCPServer
from kite.tools.mcp.stripe_mcp_server import StripeMCPServer # idempotency keys built-in
CLI reference
| Command | What it does |
|---|---|
kite generate "idea" --out app.py |
Generate multi-agent app from natural language |
kite compile skill.md --out app.py |
Compile a Markdown skill spec into Python |
kite init --type=agent --name=bot |
Scaffold a new agent project |
kite init --type=workflow --name=w |
Scaffold a multi-agent pipeline |
kite init --type=tool --name=t |
Scaffold a standalone tool module |
Examples
| Example | What it builds | Difficulty |
|---|---|---|
| Case 1 | E-commerce support bot | ๐ข Beginner |
| Case 2 | Data analyst with SQL + charts | ๐ก Intermediate |
| Case 3 | Deep research + web scraping | ๐ก Intermediate |
| Case 4 | Multi-agent collaboration + HITL | ๐ด Advanced |
| Case 5 | DevOps automation with safe shell | ๐ก Intermediate |
| Case 6 | ReAct vs ReWOO vs ToT benchmark | ๐ด Advanced |
Architecture
kite/
โโโ agents/ # ReAct, ReWOO, ToT, Plan-Execute, Reflective
โโโ memory/ # Vector RAG, Advanced RAG (HyDE/hybrid/MMR), Graph RAG, Session, Semantic Cache
โโโ safety/ # Circuit breaker, Kill switch, Idempotency, Guardrails
โโโ routing/ # LLM router, Semantic router, Aggregator, Resource-aware
โโโ tools/ # Web search, Calculator, Shell (whitelisted), MCP servers
โโโ pipeline/ # Deterministic workflows with HITL checkpoints
โโโ ab_testing/ # Prompt & model A/B experiments
โโโ monitoring/ # Metrics, tracing, event bus, FastAPI dashboard
โโโ utils/ # Batch processor, Cluster (Redis), Document loader
Lazy-loaded. Kite() starts in ~50ms.
Roadmap
-
kite generateโ natural language โ runnable agent -
kite initโ project scaffolding - 5 reasoning patterns (ReAct, ReWOO, ToT, Plan-Execute, Reflective)
- Circuit breaker + kill switch + idempotency
- Advanced RAG (HyDE, hybrid BM25+vector, MMR, Cohere rerank)
- Prompt A/B testing with statistical confidence
- MCP: Slack, Stripe, Gmail, Google Drive, PostgreSQL
- Multi-agent conversation manager
- Streaming responses
-
kite deployโ one command to production - Web dashboard (monitoring API ready, UI in progress)
Contributing
git clone https://github.com/thienzz/Kite
cd Kite && pip install -e ".[dev]"
pytest tests/
See CONTRIBUTING.md for guidelines.
License
MIT โ use however you want. Commercial use welcome.
โญ Star this repo if Kite saves you time.
Built by @thienzz ยท Issues ยท Discussions
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 kite_agent-0.2.1.tar.gz.
File metadata
- Download URL: kite_agent-0.2.1.tar.gz
- Upload date:
- Size: 158.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b213aff00c2c466b619b8e786b55181e3940c5f4f30e1c59b954219b9fc91049
|
|
| MD5 |
6af6b1d829acc2befee2a7b524af3ad7
|
|
| BLAKE2b-256 |
b9f8250c8d7242c2a8e6ab7052467886c54c753a427c5db919a5b4fedb16011d
|
File details
Details for the file kite_agent-0.2.1-py3-none-any.whl.
File metadata
- Download URL: kite_agent-0.2.1-py3-none-any.whl
- Upload date:
- Size: 151.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
772d983fdeaa459133444880a6449ef717a14d323286e2db4532e979af304032
|
|
| MD5 |
7a02ee3cbdd7451d06eee21f57f76a78
|
|
| BLAKE2b-256 |
26e1964be650d5e00f4fbec7effd94df2f74caf47f6bdd52592922dd6987ff24
|