[ docs ] // Agents & tools

The agent

arcflare agent is a coding agent built for a model on your own GPU. Everything about it follows from two facts: generation runs at tens of tokens a second, and llama.cpp only reuses its prompt cache for the longest unchanged prefix.

No terminal?

The same agent runs in ArcFlare Desktop: open the agent view, pick a folder, and approve its commands with a click.

Starting it#

arcflare agent
  ✓ 1 skill greet
  ✓ mcp arcflare 29 tools
  ✓ mcp blender 67 tools
  prefix 1064 tok · window 256K · 96 mcp tools indexed (schemas on demand)

❯ widget.js has a bug in add(). Fix it and verify with node.

  ⚙ read_file widget.js
  ⚙ edit_file widget.js
  ⚙ bash node -e "console.log(require('./widget.js').add(2,3))"
  └ 5

  Fixed. The bug was `a - b` instead of `a + b`.
OptionDoes
[model]Which model; the last one used if left out
-p "…"One-shot: run this prompt and exit
--yolo / --askAuto mode on or off for this run
--rcStart with remote control on
--machine / --no-machineConnect the machine server, or leave it out

In a session: /rc remote control · /update · /stats speed and tokens · /tools · /skills · /bye.

Built around the prompt cache#

The prompt is append-only. The system message and the tool array stay fixed for the whole session. MCP tools and skill bodies arrive as tool results, never spliced into the prefix. Editing the prefix throws the cache away, and at ~250 tok/s prefill a 20k-token session costs about 80 seconds to re-read.

When the window fills, compaction trims the oldest tool results first, then drops whole early turns. It never touches the system prompt or recent turns. A dropped tool call takes its results with it, because a result with nothing it answers is context the model can't interpret.

Tools#

Built in: read_file, write_file, edit_file, list_dir, glob, grep, bash, plus skill_load, tool_search and mcp_call. Edits fail loudly on an ambiguous or missing match rather than guessing. Shell commands go through an approval prompt and a refusal list for unrecoverable ones.

MCP servers#

Servers come from .arcflare/mcp.json or .mcp.json in the working directory, then ~/.arcflare/mcp.json or ~/.claude.json, and connect over stdio or HTTP. Tools are namespaced server__tool.

The model sees a one-line index, calls tool_search to pull the schemas it needs, and runs one with mcp_call. For 120 tools that is 1,072 tokens instead of 7,573. And because the tool array never changes, the cache survives every turn.

Old scorerNow
Right tool ranked first6 of 1210 of 12
Right tool in the top five11 of 1212 of 12
Tokens per search1,188597

A missed search costs two turns, which on a local model means seconds. So search ranks whole words in a tool's name above the same word in its description, and results are written as compact signatures, not raw JSON Schema.

what a search result looks like
## blender__screenshot_render
Run a real render and return the image. engine: 'EEVEE' (seconds) or 'CYCLES'
(much slower, photoreal).
(engine?: string="EEVEE", samples?: integer=64, resolution?: integer[], camera?: string)

A repo's servers need your say-so

Connecting to a stdio server means starting a program, so a .mcp.json in a cloned repo is a list of commands that would run on your machine. It does nothing until you read it and run arcflare mcp trust. ArcFlare records the exact content you approved, so if the repo changes a command it asks again. Your own config in your home directory is never gated.

Hosted servers that use OAuth: arcflare mcp login [server] signs in, and arcflare mcp logout forgets the token.

Skills#

A skill is a folder with a SKILL.md and YAML frontmatter. Discovery reads only the first 4 KB of each, so the index costs ~15 tokens per skill. The body (often 1,000+ tokens) loads only when the model asks for it. Skills are read from:

  • ~/.arcflare/skills — yours, everywhere
  • .arcflare/skills — this project
  • .claude/skills — existing Claude Code skills work as-is

Project notes, sessions and undo#

Put an AGENTS.md in your project (or ARCFLARE.md; a CLAUDE.mdis read if neither exists) with the build and test commands and anything the agent should know. It's read at the start of every session, from the folder and the git root. /init asks the model to write a first one for you.

CommandDoes
Ctrl+CStop the current answer or command and return to the prompt. Twice at the prompt quits
/undoPut back the files the last turn changed (it lists them and asks first)
/undo 3Undo the last three turns together
arcflare agent --continuePick up the latest session in this folder
arcflare agent --resumeChoose an earlier session to continue
/sessions · /resume · /clearList, switch, or start fresh (the old one is kept)
/contextHow much of the window the notes, tools and conversation use

Undo covers files changed by the agent's own write and edit tools. Changes made by shell commands aren't tracked, and /undo says so.