Skip to main content

🪁 Kite

From idea to running AI agent in one command.

PyPI Python 3.8+ License: MIT Stars

kite generate demo

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 demo

kite init --type=agent --name=my_bot
cd my_bot && cp .env.example .env
python main.py

Production safety — built in, not bolted on

circuit breaker demo

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/beevr-labs/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 and open-sourced by BeevR — a senior, founder-led studio building production-grade, compliance-bound AI. If you are building agents that need to survive an audit, not just a demo, here is how we work.

Issues · Discussions

Metadata

Release files for kite-agent 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kite-agent 0.2.2
File Size Uploaded Provenance
kite_agent-0.2.2.tar.gz 160.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kite-agent 0.2.2
File Interpreter ABI Platform
kite_agent-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 312.6 kB

Release files / kite_agent-0.2.2.tar.gz

Download URL kite_agent-0.2.2.tar.gz
Size 160.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fcd426b8b297fd33ac1db720bc1b68c09e84a3fa2734e3bc225ac0ef020bfa5a
BLAKE2b-256 checksum
How to use checksums
843ae16dc8c369cb08f6361086d5435e1d4af49dfe0a42eeb8bc22fbeb8d8a6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / kite_agent-0.2.2-py3-none-any.whl

Download URL kite_agent-0.2.2-py3-none-any.whl
Size 152.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55b10a5448f3341cb61b06225cf6093514a4c4047749b857d0dd7ce27ce76d9d
BLAKE2b-256 checksum
How to use checksums
76eab89e1a969fdf06b8290a9e873aaa8054216542bc516dd295c78d920dcbd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for kite-agent 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page