One Step Is an Effect Sandwich
A step is one model request, its streamed response, and the execution of its tool calls. That is the atom of the loop, the record, and every experiment. The graph is a seam. The shipped orchestrator is still while True: step, stop when the turn ends with no calls.
Assemble builds the request the record will later replay: resolved identity layers, cloud harness files when enabled, cloud memory when enabled, tool schemas, parameters, a calibrated token estimate, and the exact dialect-encoded body stored by digest. Auth headers never enter that body. Local requests carry an explicit context length, forbid truncate, and refuse to send when the preflight estimate is already at the window. The request line is flushed before the socket sees it.
Normalize Is Where Vendors Stop Mattering
Stream is the leg's job. Normalize is the dialect's job. Native Ollama can deliver a whole tool-call object in one chunk, including a stop reason that still says 'stop' when calls were emitted — so the derived reason is wire reason and observed blocks together. OpenAI-shaped chat concatenates argument fragments and parses only at block end. Anthropic-shaped streams speak content-block deltas. A tool_call_end with complete=True is emitted only when that dialect knows the block closed. Open blocks fail as truncated. Unparseable or schema-invalid arguments become an invalid-call plus an error result. The engine never guesses the JSON the model owed.