Skip to main content

Module agent

Module agent 

Source
Expand description

The agent: one impl Agent, and the command parser it runs on.

Deterministic by default. The board moves because the user typed add and not because a model decided to call a tool, which is what makes the transcripts in README.md and the tests under tests/ assertable to the character. --llm swaps only the phrasing of the reply — see crate::llm.

What one run emits, in order:

STEP_STARTED board
  REASONING_*                       what the agent made of the message
  TOOL_CALL_START/ARGS              once per mutation
    STATE_SNAPSHOT | STATE_DELTA    the board moving, with the call open
  TOOL_CALL_END/RESULT
  TEXT_MESSAGE_START/CONTENT*/END   the reply, a word per delta
  TOOL_CALL_* render_a2ui           the board as an A2UI surface
STEP_FINISHED board

research is the one command that delegates. Inside the step it opens two subagents in turn, and everything each one emits — its sentence, its add_task call, the state it publishes — goes out tagged with that invocation’s subagentRunId, bracketed by SUBAGENT_STARTED and SUBAGENT_FINISHED. The supervisor’s own reply follows, untagged.

Structs§

TaskBoard
The workshop assistant.

Enums§

Command
What the user asked for.

Constants§

CLEAR_INTERRUPT
The interrupt id the clear confirmation round trips on.