Skip to content
tokenworm ★ GitHub

Home / Features

A small surface, on purpose

tokenworm ships a deliberately compact feature set: one native agent core, six tools, five providers, and a C ABI that turns it into an SDK for any language. Everything below is grounded in the README.

Native binary & performance

The systems-language bet, made concretely. All figures are README-reported (Linux x86_64).

960KB ReleaseSmall binary

A single Zig-compiled executable with zero runtime dependencies — no Node, no Python, no Docker required to run the CLI.

8ms cold start

The README reports an 8ms cold start and 2.4MB idle memory, so the agent is ready before a runtime would finish warming up.

Zero runtime dependencies

The agent loop, providers, tools, and sandbox all live in the native binary. Nothing to install alongside it.

Six built-in tools

Workspace-scoped — the agent cannot touch files outside the project directory.

read / write / edit

Read with offset and limit, create or overwrite files, and make surgical edits that require a unique match.

grep / glob

Substring search across files with an extension filter, and wildcard pattern file search.

bash (sandboxed)

Shell commands run through the OS-native sandbox layer — bubblewrap on Linux, sandbox-exec on macOS.

Five LLM providers

Switchable at runtime — no code change, no rebuild.

OpenCode Zen (default)

The default provider, curated free models for coding agents.

Anthropic, OpenAI, MiniMax

Three hosted providers behind the same agent loop and tool dispatch.

Ollama (local)

Run entirely locally with no API key when you need privacy or offline operation.

C ABI & language SDKs

The C ABI in src/lib/ffi.zig is the architectural centre.

libtokenworm.so / .dylib

A stable C boundary — tokenworm_init, tokenworm_run, tokenworm_cancel, and the session functions — callable from any language with FFI.

Python, TypeScript, Go SDKs

Idiomatic thin bindings over the same shared library: an async iterator, a for-await stream, and a cgo-linked runtime.

Shared core, one fix

A change in the Zig core propagates to every SDK — no per-language re-implementation.

Hooks, skills & MCP

Extend the agent without forking it.

18 lifecycle hooks

Intercept and shape the agent loop at defined points across a task.

SKILL.md skills

Package reusable instructions and workflows as skills the agent can load.

MCP integration

Model Context Protocol support over both stdio and SSE transports.

Sandboxing & sessions

Safe by default, portable by design.

OS-native sandboxing

bubblewrap on Linux and sandbox-exec (Seatbelt) on macOS, with allowlist, restricted, and noop fallbacks.

.tworm session format

A portable binary session — conversation history, provider metadata, timestamps, token counts, and workspace snapshots — with an O(1) offset table for random message access.

Portable across surfaces

Per the README, .tworm is 5x smaller and 20x faster to parse than JSONL; export from the CLI and resume in any SDK.

See it embedded

Read how the C ABI turns the binary into an any-language SDK, or jump straight to install.