Reference and map

A lookup page. Where the other pages explain reasoning, this one answers “where does that live” and “what does that word mean here”.

Command surface

CommandPurpose
fisk run [query...]Runs the agent. The largest flag set: --config, --api-key, --base-url, --http-debug, --no-color, --verbose, --tool-output, --no-tui, --chat, --trace, --checkpoint, --name, --resume, --force, --state-dir
fisk session lsLists checkpointed sessions, newest first. Alias list
fisk session showShows one session, with --transcript for the full-screen viewer. Alias view
fisk session rmRemoves a checkpointed session. Alias delete
fisk infoExplains a config without contacting a model: tools, tags, confirm column, globals, prompt
fisk knowledge indexBuilds or updates the index, incrementally by content hash
fisk knowledge watchWatches the configured paths and re-indexes on change
fisk knowledge searchRetrieves from the index for tuning, printing citations and snippets
fisk knowledge matchLists every document containing the words, as a complete set. Aliases enumerate, which
fisk knowledge wordsLists the vocabulary of the index with document counts. Aliases vocab, terms
fisk knowledge showPrints one chunk verbatim, resolving a citation
fisk knowledge rmRemoves specific indexed sources by path
fisk knowledge resetWipes the entire index
fisk knowledge sourcesLists indexed files with chunk counts and last-indexed time
fisk knowledge doctorChecks the index, its full-text integrity, and when configured the embeddings server
fisk knowledge rebuildRebuilds the search indexes from the stored text, without re-embedding
fisk knowledge statsPrints the tier banner and index counts and sizes
fisk mcpServes the tools over MCP on streamable HTTP
fisk a2aServes the tools to other agents over NATS
fisk serveHosts the agent behind the surfaces its configuration enables, taking queued work: --config, --workers, --state-dir, --work-dir, --api-key, --base-url, --no-telemetry, --verbose
fisk discover <agent>Discovers a remote agent and prints its tools

The knowledge command carries rag and k as aliases.

Source map

Line counts exclude tests, at the snapshot commit.

PackageFilesLinesRolePage
main (repo root)153869The CLI: command registration, flags, signals, and both terminal renderersConfiguration
config11281The whole configuration surface, parsing, defaulting, and validationConfiguration
internal/agent52975Run setup, the loop, hooks, and the events contractThe agent loop
internal/toolkit8637Neutral tool contracts: Tool, Kind, Presentation, PrompterTools
internal/toolkit/fisk51384Introspection, filtering, argv construction, executionTools
internal/toolkit/builtin41299The human-in-the-loop, memory, and knowledge toolsTools
internal/toolkit/functool3446The generic function-tool backendTools
internal/llm6423The provider-neutral message model and registryProviders
internal/llm/anthropic3534The only provider, and the only SDK importerProviders
internal/rag164905The knowledge index: chunking, embedding, hybrid search, enumeration, vocabulary, watchingKnowledge
internal/memory6513The memory contract and shared rulesMemory
internal/memory/file3316One markdown file per memoryMemory
internal/memory/jetstream1487One KV entry per memory, with a read-before-update guardMemory
internal/runstate7986Records, the fold, the fingerprint, and the schemasSessions and replay
internal/runstate/file3472A JSON-lines journal per run, with an advisory lockSessions and replay
internal/runstate/jetstream1627One record per subject, with a tail fenceSessions and replay
internal/a2a131627The agent-to-agent protocol engine and its transport contractServing
internal/a2a/nats1242The one live transport bindingServing
internal/mcpserver1638The whole MCP serving modeServing
internal/tui42740The full-screen surface: live view, viewer, prompter, splashTerminal and events
internal/util81149Sanitization, markdown, the confirm gate, the tracer, run statsTerminal and events
internal/remotetools1315Import policy: discovery, filtering, deterministic namingServing
internal/conns189Connection establishment and ownershipServing
internal/agenttest8976Fakes proving each contract is implementable from outside the package

The root main package holds one file per command plus the two event renderers: main.go, run_command.go, run_events.go, run_tui_events.go, session_command.go, resume_replay.go, info_command.go, rag_command.go, rag_match.go, rag_words.go, rag_watch.go, mcp_command.go, a2a_command.go, discover_command.go, remote_tools.go.

Key types

TypePackageWhat it is
agent.Optionsinternal/agentEverything a caller supplies for one run, including every injection point
agent.Eventsinternal/agentThe typed display sink; the package decides what happened, the caller how it looks
agent.Hooksinternal/agentEight optional callbacks on the run goroutine
toolkit.Toolinternal/toolkitThe four-method interface every tool kind satisfies
toolkit.Kindinternal/toolkitThe accounting axis: who provides the tool
toolkit.Presentationinternal/toolkitThe visibility axis: how a call is shown
toolkit.Prompterinternal/toolkitThe only sanctioned path to an operator
toolkit.CommandResultinternal/toolkitThe JSON shape a command-ish tool returns, local or remote
llm.Providerinternal/llmThe one place a concrete SDK is spoken on the request path
llm.Messageinternal/llmThe neutral message model, and also the on-disk format
runstate.Storeinternal/runstateDescribe, create, open, load, list, delete for run journals
runstate.RunStateinternal/runstateThe folded, resumable state
runstate.Fingerprintinternal/runstateThe configuration a journal was written against
memory.Storeinternal/memoryDescribe, list, read, write, delete over durable model-written notes
rag.Storeinternal/ragOne handle over the single SQLite index file
a2a.Transportinternal/a2aRound-trip, serve, describe, close; moves bytes and never decodes
a2a.Headerinternal/a2aFraming embedded flat into every message
config.ConfigconfigThe whole YAML surface, read through nil-safe accessors

Constants worth knowing

ValueMeaning
10Tool count at which deferral and tool search engage
200000 / 50 / 120sDefault token budget, iteration budget, and per-call timeout
8192 / 16384Default max output tokens, and the value used when thinking is on
2 / 30sDefault concurrency and per-call timeout for both serving modes
64 KiB / 32 KiBHead and tail kept from a tool’s output before truncation
16 MiBIntrospection output cap, rejected rather than truncated
768 KiBA2A message size cap, sitting under the NATS 1 MiB default
64 KiB / 1024Memory content cap and entry count cap
69600Memory entry cap including frontmatter, the nats kv add figure
1200 / 1500Knowledge chunk target and maximum in bytes
50 / 20 / 6000Search fanout per tier, result ceiling, and default injected-token budget
8080 / 127.0.0.1Default MCP port and address
choria.fisk-aiThe A2A NATS subject prefix

Glossary

agent
One configuration driving one model over one tool set. Named by its identity.
identity
The agent's name. Also the NATS queue group and the namespace for on-disk state.
tool
Anything the model may call: a wrapped leaf command, a built-in, an imported remote tool, or a caller-injected custom tool.
kind
Who provides a tool. Used for accounting and log tokens, never for display suppression.
presentation
How a tool call is displayed. Used for suppression, never for accounting.
confirm gate
The operator approval checkpoint on a command the model chose. Default deny.
HITL
Human in the loop: the built-in tools with which the model asks the operator a question.
deferral
Withholding full tool definitions so the model finds them through tool search instead.
checkpoint
A run that writes a durable journal and can therefore be suspended and resumed.
session
One journal, identified by a run id. A context reset rotates to a new one.
journal
The append-only record stream for one session.
fold
The pure function turning a record stream back into a resumable state.
fingerprint
The hashed configuration a journal was written against, checked before a resume.
memory
Short markdown notes the model writes for its future self.
memory index
The key-and-description listing injected into the system prompt at startup.
knowledge
The operator-owned document index the model searches. RAG is the technique; knowledge is the feature.
tier
Whether knowledge search is lexical only or hybrid, always reported on its own line.
citation
A knowledge reference of the form path#ordinal. Ordinals shift after a reindex.
A2A
Agent to agent: the NATS protocol for serving tools to, and importing tools from, another Fisk AI agent.
agent card
The discovery reply describing an agent's name, version, and exposed tools.
remote tool
Another agent's tool imported into this one, presented to the model as if it were local.
elicitation
The MCP mechanism used to request approval from a client when there is no local operator.

Reserved and unused, at a glance

Collected from the subsystem pages so a reader can see the shape of the unfinished edges in one place.

ItemStatus
remote_agents config key and its typeDeclared, read by nothing. remote_tools is the working feature
The A2A streaming task flowFully defined, schema-validated, round-trip tested; no transport path sends or receives it
Header.MustUnderstand, Header.Parent, Recipient.InstanceDeclared and schema-valid, never set or read
The runstate JSON schema validatorCompiled and tested, wired into no read or write path
llm.Caps.MaxOutputTokensDeclared, never read; nothing clamps the per-call cap
Three exported anthropic codec functionsNo non-test callers; migration residue
agent.SlogEventsNo in-tree consumer; exists for a job runner that does not exist yet
Most of agent.OptionsEmbedder-only; the CLI sets fewer than half its fields
functool confirm and validation specsNo production users; for embedder-supplied tools
IndexOptions.ExtensionsA real extension point no caller sets
documents.title in the knowledge schemaWritten on every upsert, read on no path
A second transport, provider, or MCP clientThe registries are complete; no second implementation exists, and there is no MCP client at all
Next

For operator-facing documentation rather than design, see the Agents, MCP Servers, Knowledge, and Reference sections.