Go packages for building agents: a streaming loop, tool dispatch, guardrails, compaction, and provider adapters.
go get github.com/zarldev/zarlmono/zkit
Import what you need. Compose the rest.
What is zkit? #
Section titled “What is zkit?”
zkit is a set of small Go packages for building agents. Take the pieces you need and ignore the rest. Each package has a narrow interface and no framework ceremony.
The runner is the streaming, tool-calling agent loop. Around it are tools, guardrails, compaction, providers, verified completion, and the foundation packages underneath.
Core packages
Runner
Streaming loop with tool calls, steering, compaction hooks, and per-call timeouts.
Tools
Registry, two-method Tool interface, reflection schemas, JSON repair, MCP.
Guardrails
Middleware around tool dispatch: schema repair, shell policy, repetition detection, verifier feedback.
Compaction
History-shrinking strategies behind one interface, with budget-driven triggers.
Providers
OpenAI, Anthropic, Gemini, DeepSeek, llama.cpp, Ollama, and OAuth backends behind one contract.
Verified completion
Re-drive attempts against real-world state — tests passing, files present — not the transcript.
Built with zkit
These products share the same repo and the same packages.
zarlcode
A terminal coding agent: runner, guardrails, sandboxed shell, sub-agents, SQLite sessions.
zarlai
A local multimodal assistant: speech, vision, home automation, autonomous tasks.
swebench-eval
A SWE-bench driver built from the same packages as the TUI.
Where to go next #
Section titled “Where to go next”
— install zkit and run your first agent.Getting started— see how the packages layer.** Architecture**— understand the loop.** Runner**