|
| 1 | +# kode |
| 2 | + |
| 3 | +The fastest, minimal, zero-dependency Go autonomous agent runtime. |
| 4 | + |
| 5 | +`kode` runs the ReAct (Reasoning + Acting) loop — "think, therefore act" — as a single binary. No frameworks, no SDKs, no Python venvs. Just one loop and your tools. |
| 6 | + |
| 7 | +```bash |
| 8 | +kode run "How many lines in go.mod?" |
| 9 | +# → 3 lines |
| 10 | + |
| 11 | +kode run "Fix the OOM bug in default-hooks.js" |
| 12 | +# → [reads file, edits code, runs tests, reports result] |
| 13 | +``` |
| 14 | + |
| 15 | +## Design |
| 16 | + |
| 17 | +| Principle | Implementation | |
| 18 | +|-----------|---------------| |
| 19 | +| **Zero deps** | `net/http`, `encoding/json`, `context`. That's it. | |
| 20 | +| **LLM-agnostic** | Any OpenAI-compatible endpoint (Deepseek, OpenAI, etc.) | |
| 21 | +| **Tool-first** | Tools are the only extension point. No chains, no prompts. | |
| 22 | +| **Sandbox-ready** | `kode run --sandbox` → isolated Docker container, destroyed on exit | |
| 23 | +| **Single binary** | `go build` → one file. Drop it anywhere. | |
| 24 | + |
| 25 | +## Quick Start |
| 26 | + |
| 27 | +```bash |
| 28 | +# Set your API key |
| 29 | +export DEEPSEEK_API_KEY=sk-... |
| 30 | + |
| 31 | +# Run a task |
| 32 | +kode run "List the files in this directory" |
| 33 | + |
| 34 | +# Use a different model |
| 35 | +kode run --model gpt-4o "Write a Go test for the loop engine" |
| 36 | +``` |
| 37 | + |
| 38 | +## Security |
| 39 | + |
| 40 | +With `--sandbox`, each session runs in a fresh Docker container: |
| 41 | +- **No host filesystem access** beyond the working directory |
| 42 | +- **No network** (unless `--allow-network`) |
| 43 | +- **No capabilities** (`--cap-drop ALL`) |
| 44 | +- **Destroyed on exit** (`docker run --rm`) |
| 45 | + |
| 46 | +## Architecture |
| 47 | + |
| 48 | +``` |
| 49 | +kode run "task" |
| 50 | + │ |
| 51 | + ├─→ llm.Call() # THINK: send messages to LLM |
| 52 | + │ └─→ tool_calls? # Model requests action |
| 53 | + │ ├─→ tool.Call() # ACT: execute tool |
| 54 | + │ └─→ loop back # Observe result, think again |
| 55 | + │ |
| 56 | + └─→ final answer # No more tool calls = done |
| 57 | +``` |
| 58 | + |
| 59 | +## License |
| 60 | + |
| 61 | +MIT |
0 commit comments