🚀 Open Source · MIT Licensed

Compile Knowledge.
Ship AI Agents.

Kash turns your documents into self-contained AI agents with embedded GraphRAG — packaged into ultra-lightweight Docker containers.

No Python. No vector DB. No infrastructure. Just Go.

⚡ Get Started Learn More ↓
# Scaffold a new agent
$ kash init my-expert

# Add your knowledge
$ cp ~/docs/*.pdf my-expert/data/

# Compile into GraphRAG databases
$ kash build --dir my-expert
✓ Chunked 42 documents (1,892 passages)
✓ Generated 1,892 embeddings
✓ Extracted 3,451 knowledge graph triples

# Ship it!
$ docker build -t my-expert . && docker run -p 8000:8000 my-expert
🚀 Agent live at http://localhost:8000
// How It Works

The Compiler Approach

Think of Kash like a static site generator — but for AI brains. Data ingestion happens at build time. Runtime only serves queries.

01
📄

Initialize

kash init scaffolds your agent project with a Dockerfile, config, and data directory.

02
📚

Add Documents

Drop PDFs, Markdown, and text files into data/. That's your knowledge base.

03

Compile

kash build chunks text, generates embeddings, and extracts knowledge graph triples.

04
🐳

Ship

docker build packages everything into a tiny container sized to your data. Push and run anywhere.

// Why Kash?

Rethink Your RAG Stack

Traditional RAG stacks are bloated. Kash collapses the entire pipeline into a single binary.

❌ Traditional RAG

  • Python app + FastAPI + Gunicorn
  • Pinecone / Weaviate / Qdrant
  • Redis or PostgreSQL for metadata
  • Runtime document ingestion
  • Complex multi-service deployment
  • $$$ infrastructure costs

✅ Kash

  • Single Go binary (~25MB)
  • Embedded vector store (chromem-go)
  • Embedded graph DB (cayley)
  • Build-time compilation
  • docker run and done
  • Runs on a Raspberry Pi
// Features

Everything You Need

A complete agent framework with zero external dependencies at runtime.

🧠

Hybrid GraphRAG

Every query runs through both vector similarity search and knowledge graph traversal, merged and optionally reranked.

🐳

Docker-First Distribution

Ship agents as lightweight Docker images. Image size scales with your data — the Go runtime itself is tiny. Multi-arch support included.

🔌

Three Runtime Interfaces

REST API (OpenAI-compatible), MCP Server (for IDEs), and A2A Protocol (for multi-agent orchestration) — all on one port.

🔑

Provider Agnostic (BYOM)

Works with any OpenAI-compatible API. Use OpenAI, Anthropic via proxy, Ollama, LiteLLM — your choice.

📊

Knowledge Graph Extraction

Automatic extraction of entity-relationship triples via LLM during build. Deep reasoning, not just keyword matching.

🔒

API Key Authentication

Optional Bearer token auth across all interfaces. Set one env var to secure everything. Open access for local dev.

// Interfaces

Three Ways to Connect

One port, three protocols. Plug your agent into any ecosystem.

# Drop-in OpenAI replacement — works with LibreChat, Open WebUI, etc.

curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Explain the key concepts"}]
  }'
// Add to Cursor / Windsurf / Claude Desktop settings

{
  "mcpServers": {
    "my-agent": {
      "url": "http://localhost:8000/mcp"
    }
  }
}
# JSON-RPC for multi-agent frameworks (AutoGen, CrewAI)

curl http://localhost:8000/rpc/agent \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "agent.query",
    "params": {"query": "What are the key architectural decisions?"}
  }'
// Use Cases

Build Anything

From personal study tools to enterprise knowledge agents.

📖

Expert Knowledge Agent

Feed company docs, runbooks, or research papers. Every dev gets a domain expert on tap.

🎓

Study & Exam Prep

Compile textbooks into a Socratic tutor that quizzes you and explains concepts accurately.

🛠️

Product Support Bot

Turn API docs, changelogs, and FAQs into a support agent that plugs into any chat UI.

🤝

Multi-Agent Teams

Spin up specialized agents (legal, finance, eng) and wire them together via A2A protocol.

// Built With

100% Go-Native Stack

No external database servers. No Python runtime. Pure Go from CLI to serving.

CLI
spf13/cobra
Command framework
Vectors
chromem-go
Embedded vector store
Graph
cayley
Knowledge graph DB
LLM
go-openai
OpenAI-compatible client
MCP
mcp-go
IDE tool protocol
Container
Docker
Lightweight images

Ready to Compile
Your First Agent?

Get started in under 5 minutes. Ship an AI agent today.

⚡ View on GitHub 📖 Read the Docs
go install github.com/akashicode/kash/cmd/kash@latest