The problem
An agent coordinates model output, tool execution, and session state. Errors at those boundaries can outlive the request that caused them.
The work
The local pi-go project rewrites the upstream pi agent in Go. This site examines its agent loop and extracts a smaller, independently tested teaching implementation. It does not claim authorship of the upstream design.
Design tradeoff
Behavioral compatibility is more useful than an attractive new abstraction when porting an existing protocol. The lab deliberately reduces the protocol surface so its lifecycle is inspectable.
Validation
The accompanying agent-loop lab tests tool results, malformed arguments, model errors, cancellation, and bounded termination using a deterministic model substitute.
Limits
The teaching lab is not the complete pi-go application. Provider compatibility and production behavior require their own validation.
Inspect the evidence
Small teaching implementations; these files do not establish production or GPU performance.