Reference

Seven commands, registered in main.go, plus the packages behind them and the words this codebase uses for its own parts.

Commands

fisk run [query...]

Hosts an agent and talks to it, or talks to somebody else’s.

FlagEffect
--configConfiguration file, default agent.yaml
--api-key, --base-urlProvider credentials and endpoint
--nats-contextTurns the process into a pure client of a remote worker
--identityNames the agent to reach; requires --nats-context
--resume, --forceContinue a session id or conversation token, optionally across a changed configuration
--no-tui, --no-color, --verbose, --tool-output, --thinkingPresentation
--trace, --http-debug, --a2a-debugDiagnostic files
--state-dir, --no-telemetryStorage and export

Two validation gates run before anything opens. fisk run refuses --resume with a query, --force without --resume, and --identity without --nats-context. In client mode it also refuses seven flags belonging to the worker, but only when they are set on the command line, so an exported environment variable never fails a run.

There is no chat flag. Chat is implicit whenever the full-screen view runs.

fisk serve

Runs the endpoints the configuration enables, with --workers, --work-dir, --state-dir, --api-key, --base-url, --no-telemetry and --verbose. It refuses a configuration that enables no endpoint, and provisions no storage: the queue, task store, session stream and memory bucket are the operator’s to create.

fisk mcp

Serves the selected tools over MCP, with --port and --address defaulting to loopback. It refuses a configuration with no MCP exposure block.

fisk knowledge (aliases rag, k)

Group flags --config and --store-dir.

SubcommandPurpose
index [paths...]Build or update the index. --reindex, --dry-run
watch [paths...]Re-index on change. --debounce, --no-initial
search <query>Ranked retrieval. --top-k, --full
match <query> (aliases enumerate, which)Complete set membership. --all, --count, --paths-only, --explain, --exit-code, --min-matches, --sort, --limit
words (aliases vocab, terms)Vocabulary with document frequencies. --field, --min-docs, --max-docs, --words-only, --count, --exit-code
show <citation>One chunk by path and ordinal
rm <sources...>, reset --forceRemove documents, or the whole index
sources, stats, doctor, rebuildInspect and repair

fisk session

ls, show <id> and rm <id>, with --config and --state-dir. The show subcommand takes --transcript, --thinking and --no-tui.

fisk info

Reports the effective configuration, including telemetry values with their origins. It parses in the most lenient mode so it can describe a configuration it could not run.

fisk discover <agent>

Fetches a peer’s agent card over the configured NATS context.

Source map

PathHoldsPage
main.go, run_*.go, *_command.goCommand registration, flags, the two client surfaces, renderingThe terminal
config/config.goEvery configuration type, the parser, defaults, validation, accessorsConfiguration
internal/agentRun setup, the loop, hooks, events, approvals, the PII guardThe agent loop
internal/toolkitThe tool interface, tag behavior, the prompter, deferralTools and introspection
internal/toolkit/fiskCLI introspection into tools, subprocess executionTools and introspection
internal/toolkit/functoolGo function tools, the backend for built-ins, remote and MCPTools and introspection
internal/toolkit/builtinThe harness’s own tools and their system notesTools, Memory, Knowledge
internal/mcpclient, internal/remotetoolsImporting tools from MCP servers and peer agentsTools and introspection
internal/llm, internal/llm/anthropicThe neutral conversation model and its one backendModel providers
internal/memoryThe memory contract, key rules, scope, two backendsMemory
internal/ragThe knowledge store, indexing, retrieval, enumerationKnowledge
internal/runstate, internal/tasksThe journal, the fold, the fingerprint, the task recordDurable state
internal/serve and subpackagesThe host, the three channels, shared resourcesServing
internal/a2aThe protocol, its schemas, the client and server, the NATS bindingServing
internal/mcpserverThe MCP tool server, a surface of its ownServing
internal/telemetrySpans, metrics, content capture, propagationTelemetry
internal/tui, internal/multiplexThe full-screen view and multiplexer reportingThe terminal
internal/piiPersonal-data detection and redactionThe agent loop
internal/conns, internal/utilNATS connection ownership, shared helpersArchitecture
internal/agenttestFakes for an embedder’s testsArchitecture

Key types

TypePackageWhat it is
ConfigconfigThe whole of agent.yaml, parsed, defaulted and validated for a mode
TooltoolkitNine methods every tool kind answers, whatever provides it
BehaviortoolkitWhat a tool declares about itself, resolved conservatively
PromptertoolkitThe only path permitted to read the terminal or draw a prompt
toolSetagentAn immutable set of definitions plus the registry that dispatches them
HooksagentSeven points a caller can observe or interrupt
ProviderllmCall and Capabilities: the only code that calls a provider SDK
ContentBlockllmThe neutral union, with a provider block as its escape hatch
StorememorySix methods, no close, safe across processes
StoreragThe knowledge database and every operation on it
Record, RunStaterunstateOne journal entry, and the fold of all of them
FingerprintrunstateThe configuration a stored conversation was written under
Channel, Work, OutcomeserveWhere work comes from, what it is, and what came of it
Headera2aThe framing embedded flat into every protocol message
ProvidertelemetryNil-safe spans and metrics, registering nothing globally

Glossary

Identity
The agent's name: a NATS subject token, a queue group, and the first field hashed into a session id.
Named identity
One an operator wrote, as opposed to one derived from the application's basename. Every serving path requires a named one.
Introspection
Running a fisk application with a flag that makes it describe its own command tree, which is where tool schemas come from.
Confirm gate
The default-deny check in front of a tagged tool. Independent of the human-in-the-loop tools.
Standing grant
An approval that covers a tool for the rest of the conversation, journaled after the call that triggered it resolves. There is no standing denial.
Deferral
A tool saying it will answer later. The call is never dispatched again; its turn finishes when an answer is supplied.
Elicitation
Putting a question to a person through the caller rather than at a terminal, over a2a or MCP.
Fingerprint
The stamped configuration that decides whether a stored conversation may continue, and whether its approvals survive.
Claim
A record appended on resume. Appending it excludes a second runner; the payload only says who took the run.
Reply set
The sequence of messages answering one a2a request, numbered gap-free from the ack.
Conversation token
The caller's credential for adding a turn to a conversation. Neither logged nor displayed.
Tool search
Deferring tool definitions past a threshold so the model looks them up instead of receiving them all.
Knowledge
The operator's corpus. Go identifiers call it rag; every user-facing name calls it knowledge.
Memory
Notes the model writes and reads back. Always data, never instruction.
Degrade
A knowledge search that fell back to the lexical tier, reported with which step failed.
Content capture
Exporting prompts and completions on spans. Off by default, and it bypasses the other protections in that area by construction.
Next

Return to the overview, or read Architecture for how these packages layer.