Skip to content

Make vinga the first agent: presets, Gemma 4 e4b, Getting Started - #637

Merged
rafacm merged 13 commits into
mainfrom
feature/612-m7-presets
Oct 9, 2026
Merged

rafacm merged 13 commits into
mainfrom
feature/612-m7-presets

Conversation

@rafacm

@rafacm rafacm commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

M7 of #612 (plan, implementation doc section). A new deployment's first agent is vinga, the built-in one: the presets stop creating assistant and a default agent, and Getting Started claims the first board for vinga. The local default model becomes Gemma 4 e4b (gemma4:e4b), as Rafael confirmed on #612 on 2026-10-09.

What changes

  • Presets: examples/presets/local-stack.yaml and cloud-stack.yaml carry only providers and agent_defaults; their headers say vinga is the first agent and that a claim naming no agent binds the board to it. The quoted bind line ends in vinga and the default-agent set assistant line is gone, so the generated recipes in docs/reference/cli.md follow.
  • Local model: gemma4:e4b replaces qwen3:8b and llama3.1:8b as the current default in the local preset, examples/llm-openai-compatible.yaml, Getting Started (pull, pin, stop, step 3), docs/run/security.md's recipe and docs/run/llm.md, with reasoning_effort: none (Gemma 4 e4b otherwise streams its thinking first; passed through to Ollama as the old qwen3:8b recipe did). The 8B measurements stay in llm.md as dated history.
  • Getting Started (README.md): step 3 configures the engines only; step 5's claim binds the board to vinga, with what to ask it and how a person's own agent joins; a vinga bullet in the feature list. Step 0 says the path was walked with llama3.1:8b and has not yet been walked with Gemma 4 e4b on macOS.
  • Follow-on pages: config.example.yaml, examples/README.md, and beyond the plan's footprint docs/run/configuration.md (bound a board to assistant straight after the import) and docs/run/with-a-coding-agent.md (its interview and example assumed assistant).
  • The preset boot case: test_a_preset_s_first_agent_is_vinga (integration, once per preset) imports the preset verbatim, builds the boot configuration and asserts the served agents are exactly ['vinga'] with no stored default, then checks a board in, claims its code naming no agent (wrote device ... bound to vinga), and asserts the device reaches ['vinga'].
  • Fragment: changelog.d/612-presets-first-contact.md with an Upgrade: line: nothing to run; an existing assistant, default agent and bindings stay (importing is additive); how to move an existing deployment to gemma4:e4b.

The first turn on small hardware (stated, not solved)

M6's local rerun measured that on a Raspberry Pi 5 (CPU only) Gemma 4 e4b takes 107.6 s to the first byte of a conversation's first request (about 1,990 tokens) while the prompt is not yet cached, and 2.4 to 3.4 s once it is. With the defaults, the first-token watchdog (llm_first_token_timeout_s, 10 s) resends once and then ends the turn with the fallback phrase about 20 s in; the 30 s transport read timeout in providers/kit.py is a separate bound that caps any larger watchdog. Seven consecutive cold conversations, each with its retry, all ended in FirstTokenTimeout. Getting Started (a warning in step 0) and docs/run/llm.md (a paragraph of its own) now say so with the numbers, and name the options that exist today (a smaller model, a GPU, a vendor's model). Nothing an operator can run today warms the prompt; whether the server should warm the model or give the first round more time is a follow-up decision, and is not invented here.

Deviations (recorded in the implementation doc)

  • "Boots" means building the boot configuration (load_boot_config()), not starting the app, which with the local preset would download speech models and dial Ollama; the existing preset test and the deployment-profile test use the word the same way.
  • The presets quote a bind line naming vinga rather than a claim, because the recipe lane runs every quoted line and a claim needs a live code.
  • examples/llm-openai-compatible.yaml sets reasoning_effort: none uncommented, so the open-doors fragment test names it.
  • Two Run pages beyond the footprint moved: configuration.md and security.md.

Verification

  • uv run ruff check .: all checks passed (also after the rebase onto M6).
  • The preset boot case run red first against the old presets (2 failed, both ['assistant', 'vinga'] == ['vinga']), green after (5 passed).
  • Mutations of the local preset, all killed: a stored default_agent: vinga, agent_defaults without vad, a preset storing its own default agent.
  • The suites touching presets and examples (docgen, examples, round trip, config): 229 passed, then 73 passed after the fragment change; the recipe lane 1 passed.
  • Drift checks current (after the rebase: domain and server references and the OpenAPI document regenerate byte-identical); doc links 0 failures; Run/Use pages 0 findings; fragments 0 failures.
  • tests/census after the rebase onto M6: 69 passed; the command-spellings manifest regenerated by its own command.
  • Inventory, untruncated: the old model names went from 85 to 77 lines over tracked files outside history; every remaining line is dated measurement, a test fixture, a field-description example, or the local lane's preferred model (left for M5, which runs that lane). The preset's assistant went from 124 to 103 lines; every remaining one is the conversation role, an operator's own agent in a generic command, or a measured utterance.
  • External review round (gpt-6.1-sol, high): 3 P2 and 1 P3, all adopted and fixed; resolutions in the PR comments.
  • Full unit and integration lanes locally: deliberately not run, because M5's model gate was running on the same machine; CI runs both on this head.
  • Getting Started walked with Gemma 4 e4b on any machine: not done.
  • Image, smoke lane, a board or browser onboarded against this build: CI's for the image; no board attached.

Attribution: plan and PR text by anthropic/claude-opus-5-5, thinking high; commits by anthropic/claude-opus-5-5, thinking medium; review round 1 by openai/gpt-6.1-sol, thinking high.

🤖 Generated with Claude Code

rafacm added 8 commits October 9, 2026 21:57
Both presets now carry providers and agent_defaults only, so the first
agent a deployment importing one has is vinga, the built-in agent
(#612, Q9). Their headers say so, and say that a board's code, claimed
with no agent named, binds it to vinga; the MAC binding they quote now
names vinga, so the generated recipes on docs/reference/cli.md drop
the default-agent line and bind to vinga. The local preset names
Gemma 4 e4b, the local model the gate chose, with reasoning_effort
none so it does not stream its thinking before every reply.

test_a_preset_s_first_agent_is_vinga imports each preset into a blank
store, composes it the way the server's boot does, and asserts the
served agents are exactly vinga, no default agent is stored, and a
board offered a code and claimed with no agent is bound to vinga. It
was run red first against the presets as they stood: both cases failed
with ['assistant', 'vinga'] == ['vinga'] (.logs/preset-red.log). The
import case stops reading the agents section a preset no longer has.

Attribution: anthropic/claude-opus-5-5, thinking medium
The openai_compatible fragment, the one Getting Started's swap list and
the local preset point at for the LLM stage, named qwen3:8b. It now
names gemma4:e4b, the default local model Rafael confirmed on #612,
and carries reasoning_effort: none live, since Gemma 4 e4b over
Ollama's OpenAI endpoint otherwise streams its thinking before every
reply (measured in M6). The key is a passthrough, so the test that
holds the fragment's undeclared keys to a named set names it, as that
test asks of a new one. The data-boundary recipe on security.md names
the same model.

Attribution: anthropic/claude-opus-5-5, thinking medium
The pages that describe importing a preset still had it arrive with an
agent: config.example.yaml set the default agent to the preset's
assistant, Configuring a deployment bound a board to it after
importing the cloud preset, and the coding-agent guide's interview
said Getting Started creates one. Each now says the preset names
providers and agent_defaults only, that vinga, the built-in agent, is
the first agent the deployment has, and that a board claimed by its
code with no agent named is bound to it. examples/README.md says the
same, and that importing a preset leaves agents already stored where
they are. The coding-agent guide's export-edit-set example names an
agent of the operator's own rather than one nothing creates any more.

Attribution: anthropic/claude-opus-5-5, thinking medium
Step 3's document configured an assistant agent and made it the
default, so a claimed board started on it. Per #612's Q9 it now
configures the engines only, the step is named for that, and step 5's
claim, naming no agent, binds the board to vinga, the built-in agent,
with a paragraph on what to ask it and how an agent of the person's own
joins it. The feature list gains vinga.

The local model moves from llama3.1:8b to gemma4:e4b in the pull, the
pin, the stop and step 3's entry, with reasoning_effort: none so it
does not stream its thinking first. The step says the path was walked
with llama3.1:8b and not yet with Gemma 4 e4b on macOS.

A warning after the pin states what M6 measured on a Raspberry Pi 5:
Gemma 4 e4b reads an unseen prompt at about 13 tokens per second, so a
turn of about 1,900 tokens took 107.6 s to its first byte against the
fixed 30 s bound, the first turn after loading ends in the fallback
phrase, and pinning does not help because the prompt, not the weights,
is what is slow to read. It names what does answer on that hardware
today and links the numbers on the model guide.

Attribution: anthropic/claude-opus-5-5, thinking medium
The model guide's local section compared the two 8B models the preset
and Getting Started used to name. It now opens with Gemma 4 e4b, the
model the gate chose and Rafael confirmed on #612, and why (the most
accurate measured on vinga's own questions, a median 9 s per question
against 117 s and 27 s for the 8B models on a Raspberry Pi 5), says
it needs reasoning_effort: none, and keeps the 8B measurements as what
they were, dated. The Ollama recipe pulls, pins and writes gemma4:e4b.

A paragraph of its own states the cold-start limit M6 measured on the
Pi: about 13 tokens per second on an unseen prompt, 107.6 s to the
first byte of a 1,990-token first request against the fixed 30 s
bound, so the first turn after loading ends in the fallback phrase
and pinning does not help; warm, the same request took 2.4 to 3.4 s.
It names what answers that turn today. The gate's lookup numbers are
M5's to add, so these edits stay in their own paragraphs.

Attribution: anthropic/claude-opus-5-5, thinking medium
The implementation doc gains M7's section: what landed against each
part of the plan's checklist item, the preset boot case run red first
and its mutations, the deviations (the boot is the boot's composition;
the quoted MAC binding names vinga; the fragment carries
reasoning_effort live; two Run pages beyond the footprint), the
untruncated inventories of the old model names and the preset's
assistant with their counts, and the cold-first-turn finding. The plan
ticks M7, PR to be named.

The fragment states both behavior changes, and its Upgrade line says
an existing deployment is untouched and how to move one to the new
local model.

Attribution: anthropic/claude-opus-5-5, thinking medium
M7's documents stopped quoting `default-agent set assistant` (in the
presets, the generated recipes and config.example.yaml) and started
quoting `default-agent set` bare in the presets' prose and the
coding-agent guide's export-edit-set example under the name sam. The
manifest is regenerated by its own command, not edited.

Attribution: anthropic/claude-opus-5-5, thinking medium
The milestone was ticked "PR TBD" before the pull request existed; #637 is its number, so the checklist links it.

Attribution: anthropic/claude-opus-5-5, thinking high
@rafacm

rafacm commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

External review round

Automated external review of this PR's diff (origin/main...4c892e9). Reviewed 2026-10-09 by openai/gpt-6.1-sol, thinking high via codex CLI 0.162.0, read-only sandbox, runtime 4m59s, at commit 4c892e9. Posted verbatim by the review run itself; resolutions follow as replies.


  1. P2: The security recipe re-enables Gemma’s thinking.
    Evidence: docs/run/security.md:283–289 replaces the local entry with gemma4:e4b but omits reasoning_effort: none. config/store.py:736–745 replaces the entity rather than merging fields, so following this recipe removes the preset’s setting. The new model guide records 39–137-second tool turns with thinking enabled.
    Fix: add reasoning_effort: none to this recipe.

  2. P2: The cold-turn warning misstates the timeout operators encounter.
    Evidence: README.md:90 and docs/run/llm.md:101–104 say the server gives up after 30 seconds. Getting Started uses the default 10-second first-event watchdog (config/models.py:1502–1505), which retries once (runtime/provider_watch.py:241–275), producing FirstTokenTimeout after roughly 20 seconds without stream activity. The 30-second transport timeout is a separate per-operation bound (providers/kit.py:44–48).
    Fix: distinguish the default watchdog and retry from the fixed transport read timeout; correct the corresponding implementation-doc explanation.

  3. P2: Getting Started advertises command help absent from the shipped knowledge.
    Evidence: README.md:317 promises an answer about making an agent, grounded in shipped documentation. knowledge/persona.py:35–44 injects only the persona and concept summary; that summary contains no agent-creation command. tools/source.py:252–280 offers no documentation lookup, and M5 remains unchecked in the governing plan. The model must decline or invent the command.
    Fix: defer this example until lookup ships, or supply the authoritative command through the built-in’s knowledge and verify that path.

  4. P3: “Fastest” contradicts the recorded model measurements.
    Evidence: README.md:66 calls e4b the fastest local model measured. The governing plan’s Gate table records e4b search at a 9-second median and e2b search at 6 seconds.
    Fix: say e4b was most accurate and substantially faster than the two previous 8B models.

Verdict: mergeable after the listed fixes.

rafacm added 5 commits October 9, 2026 22:06
The data-boundary recipe on security.md writes the `local` LLM entry
with gemma4:e4b and left out reasoning_effort: none. `provider set`
replaces an entry's model-shaped half whole rather than merging fields
(ConfigStore.set_provider, "create or replace"), so following the
recipe on a deployment built from the local preset would drop the
preset's setting and turn the model's thinking back on, 39 to 137 s
for a one-tool question on a Pi 5. The recipe now carries the key.

The other recipes that write a Gemma 4 e4b `local` entry already carry
it: the local preset, the openai_compatible example, Getting Started's
step 3 document and llm.md's Ollama recipe. The rest of the 29 lines
naming `provider set llm local` or gemma4:e4b
(.logs/r1-local-recipes.log) are the grammar's examples with no body,
the generated references and census lines, or pull, pin and stop
commands. (PR #637 review round, finding 1.)

Attribution: anthropic/claude-opus-5-5, thinking medium
The cold-turn warning in Getting Started and its paragraph on llm.md
said the server gives a reply up after 30 s. With the defaults it is
the first-token watchdog that ends the turn: llm_first_token_timeout_s
is 10 s (config/models.py), provider_watch.py cancels the request and
sends it once more, and the second stall raises FirstTokenTimeout and
the fallback phrase is spoken, about 20 s in. The 30 s in
providers/kit.py is a per-operation transport read timeout, which is
what caps a raised watchdog. Both pages now say exactly that, and
that with the watchdog at 30 s M6's run gave up after two 30 s stalls.

Every number was re-checked against M6's logs. "About 13 tokens per
second" sat beside a 1,990-token request that took 107.6 s, which is
18; the rate is gone and the two measured times stay. "Trying again
did not get through" is now stated as far as the logs show it: seven
cold conversations in a row with thinking off, five at 10 s and two at
30 s, each with its retry, all FirstTokenTimeout. The cause M6 read in
Ollama's log is not among its kept logs, so the pages name none. The
implementation doc's explanation and the fragment are corrected to
match. (PR #637 review round, finding 2.)

Attribution: anthropic/claude-opus-5-5, thinking medium
Getting Started told the reader to ask vinga how to make an agent of
their own, and said it answers naming the command; the feature list
and both presets' headers said it tells you which command does the
rest. Until M5's lookup ships, and on the local stack it may not,
vinga's prompt holds its persona, the concept summary ("The model in
one paragraph") and the board's opening and Controls section, and
none of those names a command for creating an agent. The examples are
now questions those answer: the board's volume buttons and turning
its screen off (the LCD-1.54 guide's Controls table), and the
difference between an agent and a device (the summary). The page says
that for anything beyond those it is told to say so rather than guess,
which is the persona's own instruction. (PR #637 review round,
finding 3.)

Attribution: anthropic/claude-opus-5-5, thinking medium
Getting Started's step 0 said Gemma 4 e4b answered most accurately and
fastest of the local models measured. The gate's table has Gemma 4 e2b
at a lower median (6 s per question against e4b's 9 s), so it now
says most accurate, and substantially faster than the two 8B models
it replaced (medians of 117 s and 27 s). llm.md already states the
medians rather than a ranking. (PR #637 review round, finding 4.)

Attribution: anthropic/claude-opus-5-5, thinking medium
M7's section gains the round's four findings, each condensed with the
commit that resolved it, in the form M6's round took: the security
recipe's missing reasoning_effort, the cold-turn warning's timeout and
re-checked numbers, the ungrounded agent-creation example, and the
"fastest" claim.

Attribution: anthropic/claude-opus-5-5, thinking medium
@rafacm

rafacm commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

Resolutions for the external review round

All four findings adopted; fixes by the milestone's implementer (anthropic/claude-opus-5-5, thinking medium), recorded in the implementation doc's M7 "PR review round" subsection (92ce6c9).

  1. P2, the security recipe re-enables Gemma's thinking: fixed in 7baf32b. Confirmed: ConfigStore.set_provider replaces the stored entry rather than merging fields. docs/run/security.md's recipe now carries reasoning_effort: none. An untruncated grep for every recipe writing a local Gemma entry (29 lines) found no other omission: the preset, the openai_compatible example, Getting Started step 3 and llm.md's recipe already carried it.
  2. P2, the cold-turn warning named the wrong timeout: fixed in 7c670d8. Getting Started and docs/run/llm.md now say what an operator meets with the defaults: the first-token watchdog (llm_first_token_timeout_s, 10 s) resends the request once, and a second stall ends the turn with FirstTokenTimeout and the fallback phrase about 20 s after the reply began; the 30 s per-operation transport read timeout in providers/kit.py is separate and only matters once the watchdog is raised. Numbers re-checked against M6's logs: the "about 13 tokens per second" rate did not match its own example and was removed in favour of the two measured times (107.6 s for a 1,990-token request, 179.8 s for a 2,363-token probe); "trying again did not get through" is now stated only as far as the logs show it (seven consecutive cold conversations, five at a 10 s and two at a 30 s watchdog, each with its retry, all ended in FirstTokenTimeout), with no cause claimed. The implementation doc and the fragment are corrected to match.
  3. P2, Getting Started promised an answer vinga cannot ground: fixed in 3e0d5a9. vinga's prompt today holds its persona, the concept summary and the board guide's opening and Controls section, none of which names a command for creating an agent. Step 5 now suggests questions those answer (the LCD-1.54's volume buttons and turning the screen off; the difference between an agent and a device) and says that beyond them vinga is told to say so rather than guess. "Which command does the rest" is removed from the README feature bullet and both preset headers (their quoted lines are unchanged, so the generated recipes did not move). Three older descriptions of the persona's design in docs/concepts.md, docs/glossary.md and docs/run/configuration.md are left for M5, which decides whether the lookup ships on each stack and therefore what is true.
  4. P3, "fastest": fixed in f7366de. Step 0 now says Gemma 4 e4b was the most accurate model measured and substantially faster than the two 8B models it replaces (medians 9 s against 117 s and 27 s); e2b's 6 s median was lower.

Checks after the fixes: ruff clean; docgen, examples and round-trip tests 73 passed; the preset import, first-contact and recipe cases 5 passed; drift checks all current; doc links 0 failures; Run/Use pages 0 findings; fragments 0 failures; tests/census last, 69 passed. The full lanes rerun in CI on the new head.

@rafacm
rafacm merged commit 8b5b784 into main Oct 9, 2026
9 of 10 checks passed
rafacm added a commit that referenced this pull request Oct 9, 2026
The milestone was ticked "PR TBD" before the pull request existed; #637 is its number, so the checklist links it.

Attribution: anthropic/claude-opus-5-5, thinking high
rafacm added a commit that referenced this pull request Oct 9, 2026
The data-boundary recipe on security.md writes the `local` LLM entry
with gemma4:e4b and left out reasoning_effort: none. `provider set`
replaces an entry's model-shaped half whole rather than merging fields
(ConfigStore.set_provider, "create or replace"), so following the
recipe on a deployment built from the local preset would drop the
preset's setting and turn the model's thinking back on, 39 to 137 s
for a one-tool question on a Pi 5. The recipe now carries the key.

The other recipes that write a Gemma 4 e4b `local` entry already carry
it: the local preset, the openai_compatible example, Getting Started's
step 3 document and llm.md's Ollama recipe. The rest of the 29 lines
naming `provider set llm local` or gemma4:e4b
(.logs/r1-local-recipes.log) are the grammar's examples with no body,
the generated references and census lines, or pull, pin and stop
commands. (PR #637 review round, finding 1.)

Attribution: anthropic/claude-opus-5-5, thinking medium
rafacm added a commit that referenced this pull request Oct 9, 2026
The cold-turn warning in Getting Started and its paragraph on llm.md
said the server gives a reply up after 30 s. With the defaults it is
the first-token watchdog that ends the turn: llm_first_token_timeout_s
is 10 s (config/models.py), provider_watch.py cancels the request and
sends it once more, and the second stall raises FirstTokenTimeout and
the fallback phrase is spoken, about 20 s in. The 30 s in
providers/kit.py is a per-operation transport read timeout, which is
what caps a raised watchdog. Both pages now say exactly that, and
that with the watchdog at 30 s M6's run gave up after two 30 s stalls.

Every number was re-checked against M6's logs. "About 13 tokens per
second" sat beside a 1,990-token request that took 107.6 s, which is
18; the rate is gone and the two measured times stay. "Trying again
did not get through" is now stated as far as the logs show it: seven
cold conversations in a row with thinking off, five at 10 s and two at
30 s, each with its retry, all FirstTokenTimeout. The cause M6 read in
Ollama's log is not among its kept logs, so the pages name none. The
implementation doc's explanation and the fragment are corrected to
match. (PR #637 review round, finding 2.)

Attribution: anthropic/claude-opus-5-5, thinking medium
rafacm added a commit that referenced this pull request Oct 9, 2026
Getting Started told the reader to ask vinga how to make an agent of
their own, and said it answers naming the command; the feature list
and both presets' headers said it tells you which command does the
rest. Until M5's lookup ships, and on the local stack it may not,
vinga's prompt holds its persona, the concept summary ("The model in
one paragraph") and the board's opening and Controls section, and
none of those names a command for creating an agent. The examples are
now questions those answer: the board's volume buttons and turning
its screen off (the LCD-1.54 guide's Controls table), and the
difference between an agent and a device (the summary). The page says
that for anything beyond those it is told to say so rather than guess,
which is the persona's own instruction. (PR #637 review round,
finding 3.)

Attribution: anthropic/claude-opus-5-5, thinking medium
rafacm added a commit that referenced this pull request Oct 9, 2026
Getting Started's step 0 said Gemma 4 e4b answered most accurately and
fastest of the local models measured. The gate's table has Gemma 4 e2b
at a lower median (6 s per question against e4b's 9 s), so it now
says most accurate, and substantially faster than the two 8B models
it replaced (medians of 117 s and 27 s). llm.md already states the
medians rather than a ranking. (PR #637 review round, finding 4.)

Attribution: anthropic/claude-opus-5-5, thinking medium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant