Skip to content
tokenworm ★ GitHub

Home / Glossary

The vocabulary of a native agent SDK

Short, plain-language definitions for the concepts behind tokenworm — from the C ABI at its centre to the .tworm sessions it produces.

Native binary
A program compiled directly to machine code that runs without an interpreter or virtual machine. tokenworm ships as a ~960KB native binary with zero runtime dependencies.
Systems language
A language like Zig, Rust, or C that compiles to native code with manual control over memory and low-level resources. tokenworm is written in Zig 0.16.
C ABI
The C Application Binary Interface — a stable, language-neutral calling convention. tokenworm exposes its core through a C ABI (src/lib/ffi.zig) so any language with FFI can drive the agent.
FFI
Foreign Function Interface — the mechanism a language uses to call functions written in another language. The Python, TypeScript, and Go SDKs use FFI to call libtokenworm.
Agent loop
The canonical while-loop an agent runs: call the model, dispatch any tools it requested, update the conversation, and repeat until the task is done. tokenworm runs this in agent_runner.zig.
Tool use
The pattern where a model requests actions (read a file, run a command) that the runtime executes and feeds back. tokenworm ships six built-in tools: read, write, edit, bash, grep, glob.
LLM provider
A backend that serves a large language model. tokenworm supports five — OpenCode Zen, Anthropic, OpenAI, Ollama, and MiniMax — switchable at runtime.
MCP
Model Context Protocol — a standard for connecting agents to external tools and context servers. tokenworm supports MCP over both stdio and SSE transports.
SKILL.md
A file format for packaging reusable agent instructions and workflows as a loadable skill. tokenworm supports SKILL.md skills.
Lifecycle hook
A defined point in the agent loop where you can intercept and shape behaviour. tokenworm exposes 18 lifecycle hooks.
Sandboxing
Restricting what a process can access. tokenworm runs the bash tool in an OS-native sandbox: bubblewrap on Linux and sandbox-exec (Seatbelt) on macOS.
.tworm session
tokenworm’s portable binary session format, storing conversation history, provider metadata, timestamps, token counts, and workspace snapshots. Per the README it is 5x smaller and 20x faster to parse than JSONL.
Cold start
The time from launching a program to it being ready to do work. The README reports an 8ms cold start for tokenworm.