Search

Search the documentation

Protobox

Brain

The wiki your agents keep current — versioned pages, citations, and a trust workflow

Brain

The primary author of this wiki is an agent that works while you do. When your assistant finishes a piece of work, it writes up what it built and why — as a page in your workspace's brain. Every write is an appended version with a named author; nothing is ever overwritten. You review what changed, and when a page matters, you verify it.

Pages live alongside your uploaded knowledge in Build → Knowledge. Uploaded sources are read-only reference; pages are living documents your agents and teammates write together.

The loop

Agent finishes work page_write ✎ Saved to brain (v2) Changes feed You diff / revert / verify kb_search cites pages
  1. It writes as it works. After a unit of work, a connected assistant calls page_write. The response is a receipt the assistant echoes back to you:

    ✎ Saved to brain: "How rate limiting works" (v1) — say "revert that" to undo
  2. You see what changed. The Changes tab lists every revision — page, state, who wrote it (human, agent + client + skill), version, and when. The nav badge counts what arrived since you last looked; the mark is stored server-side, so it holds across devices. Filter by author or state, search titles, page through history.

  3. Answers cite the brain. kb_search results carry a citation — How rate limiting works · v2 — and each serve counts toward the page's cited count.

  4. Wrong? Revert. Open the diff on any change and click Revert to vN. The revert is itself a new version restoring the old content — history is never rewritten.

Attribution you can trust

Who wrote a version is taken from the MCP session your client opened — the clientInfo name it initialized with — not from anything in the request. A version by Claude Code · docs-as-you-go means that client, running that skill, made that write.

Verification and drift

Verification is an opt-in workspace switch (Knowledge settings). Off — the default — pages simply serve their latest content, with no chips or banners anywhere.

On, every page has one of three states:

StateMeaning
VerifiedA person pinned this version — pin equals latest
Changed since verifiedThe page moved past the pin (drift) — the banner names who wrote it, the size of the change, and citations served since the pin
UnverifiedNobody has vouched for it yet

Only drift is loud. The page keeps serving its latest content internally while the banner waits for a decision: Diff to see what changed, Verify to move the pin.

Gated collections

For knowledge with an audience — a support KB, a public help center — set a collection's write policy to Hold for review. An agent write into it is held, not published:

⏸ Held for review — "Refund policy" is in a gated collection.
A teammate will approve or reject. Use kb_proposal_status to check it.

The proposal appears in Approvals with the page name, the size of the change (+N −N), and a diff. Approve publishes it as a normal attributed version — the agent's client and skill survive the gate. Reject archives it; the page is untouched.

Public packs

A collection can be published as a public pack (a read-only MCP endpoint plus a public page). With verification on, the pack serves verified pages only:

  • A page a person verified stays listed even while drifted — the pack never shrinks because an agent drafted an update.
  • Search and ask serve verified-current pages only. A drifted page's unverified draft never leaks outward; its retrieval resumes when someone re-verifies.

Skills — teaching the habit

The writing habit ships as five skills, served to every connected client automatically and installable locally for Claude Code:

SkillWhat it teaches
docs-as-you-goWrite up each unit of work after finishing it
brain-firstSearch the brain before answering from memory; cite pages
session-recallStart a session by reading what past sessions recorded
decision-logRecord decisions (and the why) the moment they're made
meeting-notesFile outcomes to project pages, decisions to the log

Every MCP client sees them as prompts (/docs-as-you-go in any prompt-aware client). Claude Code users get the auto-triggering layer with one command:

npx @protoboxai/cli skills install --all

That writes .claude/skills/<id>/SKILL.md files; re-running updates them in place.

Writing pages from your own code

Everything the assistant does is plain API. Two calls worth knowing:

# Append to a page by title (creates it if missing)
curl -X POST "$BASE/api/v1/tools/native:page_write/execute" \
  -H "x-api-key: $KEY" -H "content-type: application/json" \
  -d '{"arguments":{"title":"Deploy runbook","mode":"append","content":"## Rollback\n..."}}'

# Guard a replace against concurrent edits: 409 on a stale version
curl -X POST "$BASE/api/v1/tools/native:page_write/execute" \
  -H "x-api-key: $KEY" -H "content-type: application/json" \
  -d '{"arguments":{"pageId":"<id>","content":"...","expectedVersion":4}}'

A stale expectedVersion fails with VERSION_CONFLICT naming the current version — read the page again and re-apply, exactly like the dashboard editor does.

On this page