Documentation
¶
Overview ¶
Package brain builds the model backend a host uses to answer `infer`. It's shared by `hermit wear` (the sealed run) and `hermit dev` (the ADK web UI), so a hermit runs on the same brain either way. A brain is just a func(prompt) (completion, error) — the type host.Policy.Brain expects.
Specs:
claude claude -p, latency-stripped (default; uses Claude Code auth) claude:<model> a specific claude model via the CLI api[:<model>] Anthropic API direct (fast, no subprocess) — ANTHROPIC_API_KEY gemini[:<model>] Google AI Studio direct (fast) — GEMINI_API_KEY ollama:<model> a LOCAL model (fully on-device) cmd:a,b,c any command: prompt on stdin, completion on stdout
GEMINI_API_KEY / ANTHROPIC_API_KEY are read from the environment or a .env file (found by walking up from the working directory), so `hermit dev --brain gemini` just works from the repo root.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.