Agent bugfix
Load a Pi coding agent into a sandbox, hand it a failing test, and stream every tool call as it debugs and fixes it.
alineo runs Pi coding agents inside sandboxes. You hand the agent a task and
stream back everything it does — text, and every tool call — while it reads files, edits code,
and runs commands inside its own container.
This workflow plants a buggy fib.py with a failing test, hands it to a python-data agent,
and streams the session until the agent stops. Then it runs the test suite independently to
check the agent's work.
This workflow loads a Pi agent, which needs a model API key on the backend. The hosted endpoint has one configured; a local server needs GEMINI_API_KEY in its environment.
What just happened
Alineo.load(pythonDataSpec)booted an agent — a sandbox with Pi installed and configured.agent.prompt(task)returned an event stream. Eachtool_start/tool_endis the agent running a real command or file edit inside its sandbox;textis the model's narration.- The verify step ran
pytestourselves — never take the agent's "all green" on faith. agent.close()ended the Pi session and deleted the sandbox.
The AI Agent Bugfix cookbook adds an independent verifier agent and a structured verdict. For streaming mechanics, see Streaming.