gollem
A Go framework for building agentic LLM applications, with a common interface across model providers, MCP tool support, and automatic session and memory management.
gollem is a Go library for calling large language models and building agent applications around them. It provides a common interface for generating and streaming text and for generating embeddings across Gemini, Anthropic Claude, and OpenAI, including Claude access through Google Vertex AI.
For building agents, it manages sessions automatically across calls, keeps portable conversational memory with automatic history compaction for stateless or distributed applications, and includes a middleware system for monitoring and controlling agent behavior. Tools can come from an MCP server or be defined directly in Go. It also supports multimodal input such as images and PDFs, and can constrain a model's output to a JSON schema, including a generic helper that combines schema generation, the model call, and parsing with automatic retry.