splinter(1)de  en  pt-BR

splinter

An agent harness in C99. It sits between you and a model, runs the tools the model asks for, and decides which of them may run. You can read all of it.

Chat in a curses terminal, one-shot from a pipe, or over Telegram. Any endpoint that speaks the OpenAI chat API, any program that prints an answer, or another agent over A2A. Tools declare what they may do; the harness enforces it and tells the model what it refused.

# illustrative transcript, not a log
you     set the version in Makefile to 0.2.0
tool    read {"path":"Makefile"}                          read
tool    edit {"path":"Makefile","old":"0.1.0","new":"0.2.0"}   mutate
ask     edit Makefile ? [y/N] n
seen    error: denied by operator    ← this is what the model reads
model   I was not allowed to edit it. Say so if I should try again.

About 29,500 lines of C (as of 2026-11-11), 16 plugins, 35 test programs. BSD-3-Clause.

Three checks before a tool runs

Budget
Before every request the conversation is measured against the configured byte budget. If it does not fit, plugins such as lcm may compact it first. If it still does not fit, nothing is sent and the turn fails, instead of letting an endpoint truncate silently.
Registry
A tool name that does not exist becomes an observation for the model, not a crash and not a guess.
Authorization class
Each tool declares read, mutate or destructive. The tool says so, not the model and not the prompt. Mutating and destructive calls need your consent unless you started with --autonomous. A plugin can sit in front as a gate: allow, refuse with a reason, or have no opinion. The kid-mode plugin is one.

A refusal is never silent. It comes back to the model as the tool's observation, so the model can react to it.

Tools

41 are built in or shipped as plugins. An MCP server can add more at runtime.

readmutatedestructive
toolwhat it does
read, search, listNumbered lines with offset and limit, refuses binaries. Literal search, at most 100 hits. Directory listing.
write, editWrite a file, with the diff in the observation. Edit replaces exactly one occurrence; an ambiguous match is an error.
runA shell command. The exit status is an observation.
websearchWeb search.
webfetchFetch a URL.
folder_historyWhat last happened in this directory, so the model does not guess.
skill_search, skill_loadFind installed skills, read one in full. Nothing is preloaded.
memory_searchYour memories on a mem0 server, kept apart per user.
memory_addRemember one fact.
delegate, delegate_parallel, delegate_submit, delegate_retryHand work to another model: one task, several at once, as a background job, or retry a failure.
delegate_list, delegate_jobs, delegate_result, delegate_dueList delegates, see jobs, collect a result, see what is due.
task_start, task_killRun a shell command in the background (four at a time) or stop it.
task_list, task_resultBackground jobs and their output.
plan_task_add, plan_task_updateA persistent to-do list for the session.
plan_task_listRead that list.
tmux_startStart a command in a detached tmux session and make it the target.
tmux_send, tmux_askType into it (text or keys such as C-c), wait for new output and return only the new lines.
tmux_status, tmux_capture, tmux_readLook at the pane and read what is new.
a2a_send, a2a_cancel_taskMessage another agent (optionally with a file) or cancel its task.
a2a_get_task, a2a_subscribeRead another agent's task and its events.
echo, clockSmall utilities.

Models

A transport turns the harness's plain line protocol into whatever the other side speaks. The loop never sees a vendor API, which is why make check runs against a scripted mock with no network and no key.

openai
Any OpenAI-compatible endpoint, streaming over SSE. HTTP goes through curl(1).
cli
Any program as the model, for example claude -p.
a2a
Another agent over A2A.
ring
An exit ring. On a 429 or a limit, the next configured exit takes over.

Delegation

The model can hand work to another model. splinter picks one: a requested tag scores 5, a tag found in the task text 3, a word from the delegate's description 1. The observation opens with the choice and the reason, so a wrong pick is visible.

# ~/.splinter/splinter.conf.d/20-delegates.conf
delegate = coder | C99, POSIX, review | tags=code,c99 | endpoint=... | model=...
delegate = quick | short answers      | tags=chat,cheap | endpoint=... | model=...

$ splinter --choose "check this C code for memory errors"
coder   7   task mentions 'code'

delegate_parallel sends up to eight tasks at once. The report names who answered, how long it took and the exit status for each, so a slow or failing delegate shows in the header.

[parallel: 2 task(s), 12018 ms wall]
## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B
## task 2 | model fast | score 5 |    16 ms | exit 0 | 74 B

A delegate may name a host=. The whole call then goes over ssh, so claude, opencode or another splinter runs where the model or the network is, with that machine's own keys.

delegate = remote | on another box | tags=remote | host=build.example.org | endpoint=... | model=...

Plugins

A plugin is a .so loaded with dlopen. It can register tools, slash commands, sidebar widgets, transports and gates. A widget's tick runs on its own thread; only the UI thread draws. The ABI is in docs/PLUGINS.md. Plugins run in the process with your rights.

  • lcm, cps: compact the conversation
  • focus: reminds the model of /goal every N turns
  • reminder: puts the ground rules back every 10 turns
  • ring: next exit on 429 or limit
  • mcp, a2a, cli: reach other tools and agents
  • provider: add a provider while running
  • tasks: background shell jobs
  • planner: the session's to-do list
  • tmux: drive a program that wants a terminal
  • scheduler: timed work
  • status: context, tokens per second, cost if you set prices
  • kids: kid mode
  • clock: a sidebar clock and a tool

Other agents, both ways

MCP

As a client, splinter takes an MCP server's tools with the server's own schemas. As a server it offers its own tools to others:

$ splinter --mcp-server-listen 127.0.0.1 --mcp-listen-port 8098

It answers initialize, tools/list and tools/call. It serves read tools. Mutating and destructive ones only run with --autonomous, so a foreign agent does not get a shell just by asking.

A2A

$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099

Telegram

splinter --daemon long-polls getUpdates, runs one turn per message and answers with the same slash commands as the terminal. The token is read from a 0600 file or the environment, never from an argument. Only user ids listed in telegram_allow get an answer.

Kid mode

With the kids plugin, every change needs a parent's approval by Telegram, a whitelist lets harmless calls through, the model is reminded of an age-appropriate tone on each request, and a daily minute budget ends the day when it is spent.

Config, logs, ways in

# ~/.splinter/splinter.conf   (plus splinter.conf.d/*.conf, in name order)
endpoint   = http://127.0.0.1:8080/v1/chat/completions
model      = my-model
locale     = en
theme      = Delphinium
telegram_allow = 123456789
plugin     = plugins/lcm/lcm.so

It is plain key = value. An unknown key stops startup with the file and line, because a typo that does nothing is a config that lies. Command line beats file beats default.

~/.splinter/logs/<session>/session.log   readable, in order
~/.splinter/logs/<session>/wire.jsonl    every request and reply, raw

Words, reasoning, every tool call with its arguments, every observation, errors and token counts. Nothing is cut, because a log that keeps only the good parts cannot explain a bad turn.

$ cat /etc/passwd | splinter "explain this file"
$ cd ~/src/project && splinter -c      # last session that happened here
$ splinter --interview             # once: language, style, off-limits paths

Standard input becomes framed, size-capped context. Skills live in ~/.splinter/skills/ and are found on demand. When several splinters run in one directory, /swarm sends a line to the least busy one. The interface has 42 CDE colour palettes and is translated to German, English and Brazilian Portuguese; a missing translation fails make check.

Build

$ make            # libsplinter.so, the binary, the plugins
$ make check      # 35 test programs, shell tests, i18n check; no network, no model
$ splinter

POSIX make and a C99 compiler, -Wall -Wextra -Werror. NetBSD curses is in the tree. At run time splinter calls curl(1) for HTTP. Manual: man ./docs/splinter.1.

What it is not