Cache your knowledge. Channel the Akashic.
Compile your documents into an embedded GraphRAG brain. Ship AI agents as Docker images.
Kash is a Go CLI that turns your raw documents (PDFs, Markdown, text files) into a self-contained AI agent packaged in a lightweight Docker container (base size ~50MB, final size depends on the amount of knowledge data added).
No Python runtime. No external vector databases. No infrastructure headaches.
Your Documents → kash build → Docker Image → Ship Anywhere 🚀
# 1. Install Kash
go install github.com/akashicode/kash/cmd/kash@latest
# 2. Scaffold a new agent
kash init my-expertImportant: The
~/.kash/directory andconfig.yamlare auto-generated the first time you runkash init. There's no need to manually create the files, but you must edit~/.kash/config.yamlto fill in your API keys (e.g., OpenAI, Voyage) with proper values before proceeding.
# 3. Add your knowledge
cp ~/docs/*.pdf my-expert/data/
cp ~/notes/*.md my-expert/data/
# 4. Compile the knowledge base
cd my-expert
kash build --dir .
# 5. Serve locally (no Docker needed!)
kash serve -d .Your agent is now live at http://localhost:8000.
Kash runs a Hybrid RAG Pipeline:
- Vector Memory:
philippgille/chromem-go - Graph Memory:
cayleygraph/cayley - LLM Client:
sashabaranov/go-openai
During build time, Kash parses documents, embeds chunks into a vector database, and extracts triples into a knowledge graph. At runtime, it performs hybrid search, optionally reranks, and feeds context to the LLM.
kash init <name>: Scaffolds a new agent project.kash build: Compiles documents into vector + graph databases (fromdata/dir).kash serve: Starts the runtime HTTP server.kash version: Displays the Kash version.
Kash concurrently serves three interfaces on the same port:
- REST API (
POST /v1/chat/completions): Drop-in replacement for the OpenAI API. Intercepts requests, runs hybrid RAG, injects context, proxies to your LLM. - MCP Server (
GET /mcp): Model Context Protocol. Exposes your knowledge base as tools to IDEs like Cursor or Windsurf. - A2A Protocol (
POST /rpc/agent): JSON-RPC for multi-agent frameworks (e.g., AutoGen, CrewAI). (WIP - Still under testing)
Note: You can secure all endpoints by setting the
AGENT_API_KEYenvironment variable.
Set your environment variables (LLM_BASE_URL, LLM_API_KEY, EMBED_BASE_URL, EMBED_API_KEY, etc.), then run kash build and kash serve.
Fill in your .env with API keys.
kash build
docker compose up --builddocker build -t my-agent:latest .
docker run -p 8000:8000 --env-file .env my-agent:latestAuto-generated upon kash init. Fill this in before running kash build.
build_providers:
llm:
base_url: "https://api.openai.com/v1"
api_key: "sk-..."
model: "gpt-4o"
embedder:
base_url: "https://api.voyageai.com/v1"
api_key: "pa-..."
model: "voyage-3"Used by kash serve and Docker containers. Provide variables like LLM_BASE_URL, LLM_API_KEY, EMBED_BASE_URL, EMBED_API_KEY, and optionally reranker variables.
Note: When running locally,
kash servewill automatically fall back to the values set in~/.kash/config.yamlif environment variables are not specified. However, when running via Docker, you must explicitly provide these values as environment variables (e.g., using a.envfile).
Generated in your project directory. Contains the persona, embedding dimensions, and MCP tools configuration.
git clone https://github.com/akashicode/kash.git
cd kash
make build
# Or build for all platforms: make build-allMIT License.