Building a stateful multi-tool agent in Go
In the previous article, we built a minimal agent:
- One tool
- In-memory conversation
- A clean reasoning loop
Now we’re going to level it up.
This version introduces two major upgrades:
- Persistent memory across sessions
- Multiple tools with different capabilities
We are still using go-openai as our client library, compatible with OpenAI and ollama.
But now the agent feels much closer to something you’d actually deploy.
What’s new in this version?
Compared to the previous article, this main.go adds:






