Skip to main content

Production-Ready Agentic AI Framework with Enterprise Safety

Project description

๐Ÿช 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/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

kite_agent-0.2.0.tar.gz (159.2 kB view details)

Uploaded Source

Built Distribution

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

kite_agent-0.2.0-py3-none-any.whl (150.9 kB view details)

Uploaded Python 3

File details

Details for the file kite_agent-0.2.0.tar.gz.

File metadata

  • Download URL: kite_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 159.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for kite_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 78286aec224ea1beba0156e418b938f9d2a83823c30da782f2094a188601e8a8
MD5 e71d6a1f20c6b06e3089f91fdc64a6b1
BLAKE2b-256 5ce2089f7493b9df1e358232d54fc354a32ebc5c4011490a2918424d6d557827

See more details on using hashes here.

File details

Details for the file kite_agent-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: kite_agent-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 150.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for kite_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f23e8a68e7f3ae1b4c91c18b1084ad800a0fb33e61a2c6762e239b73c3bdd18
MD5 8af9b717c6728b70b5f7f418a5eaba74
BLAKE2b-256 dadba0d15a522c87bde99f29b8c02a8104b5d6a448c0034e770b9c22d339e214

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