Why small, specialized agents?
One agent, one responsibility. Small agents are cheaper to run, easier to measure, and duller to debug — which is exactly what you want.
Fewer tools, fewer mistakes.
A small toolset gives the model fewer ways to pick the wrong tool, so hallucinations have a smaller blast radius.
Cheaper and faster.
A narrow task needs less model capability — small local models often do the job, so you avoid paying for a frontier model.
Easy to test.
Success criteria are clear and regressions are easy to spot. A categorization agent's accuracy is a number, not a vibe.
Composable.
Each agent is a plain Go package — chain them, run them in parallel, or embed one in another agent's toolset.
Constrained on both ends.
The model is constrained at both ends — on what it can do and on what it can say. A small, specialized agent becomes very powerful.
Custom toolsets.
You decide exactly how the agent can interact with your system. More control means fewer unexpected side effects when the model hallucinates.
Tools in the tutorial → B.Structured output.
Instead of parsing free text, the agent returns a schema-validated structure — generated straight from your Go structs, nothing to keep in sync.
Text format in the tutorial → C.Provider freedom.
Use LM Studio locally, or OpenRouter and OpenAI for hosted models. Switch providers to balance cost and quality, or implement the public provider interface for another backend.
Build an agent →