Agency logo

Agency

Free

🕵️‍♂️ Library designed for developers eager to explore the potential of Large Language Models (LLMs) and other generative AI through a clean, effective, and Go-idiomatic approach ![GitHub Repo stars](https://img.shields.io/github/stars/neurocult/agency?style=social)

FreeFree tier
Inputs: text, image, audioOutputs: text, image, audio
Type
Open Source
Company
neurocult

About Agency

Agency is a Go library designed for developers to build applications with Large Language Models (LLMs) and other generative AI. It provides a clean, idiomatic, and lightweight approach to integrating AI capabilities, emphasizing separation of business logic from concrete implementations. The library supports composable operations, process pipelines with observable interceptors, and includes OpenAI API bindings for text, image, and speech interactions. Agency aims to simplify the creation of autonomous agents, from simple chat interfaces to complex multi-agent systems, while remaining true to Go's performance and static typing strengths. It is open-source and hosted on GitHub under the neurocult organization.

Key Features

Pure Go implementation: lightweight, statically typed, no Python/JS dependencies
Clean architecture: separates business logic from concrete AI implementations
Custom operations via simple interface
Compose operations into processes with interceptors for observability
OpenAI API bindings: text-to-text (completion), text-to-image, text-to-speech, speech-to-text
Supports RAG and multimodal operations
Designed for building autonomous agents and agent swarms

Pros & Cons

Pros
  • Idiomatic Go design fits naturally with Go projects
  • Lightweight and fast with no Python runtime overhead
  • Strong static typing and compile-time safety
  • Easy to extend with custom operations
  • Interceptors allow detailed observation of each step in a process
  • Small, robust core with focused scope
Cons
  • Currently only provides OpenAI API bindings (other providers not yet supported)
  • Relatively early-stage project with a smaller community (512 stars)
  • Limited documentation beyond the README and examples
  • May have a learning curve for developers new to agent-based design patterns

Best For

Building chat interfaces with LLMsCreating autonomous agents and agent swarmsComplex data analysis pipelinesRAG (Retrieval-Augmented Generation) applicationsMultimodal AI interactions (text, image, speech)Rapid prototyping of generative AI workflows in Go

FAQ

Why use Agency over LangChainGo?
Agency is designed as an idiomatic Go alternative to LangChainGo, which is a port of Python's LangChain. Agency focuses on clean, simple Go code and avoids unnecessary complexities, making it a better fit for Go's strengths in static typing and performance.
What AI providers does Agency support?
Agency currently provides bindings for OpenAI, which can be used with any OpenAI-compatible API. Support for other providers may be added in the future.
Is Agency suitable for building autonomous agents?
Yes, Agency's core design is to empower users to build autonomous agents. It provides tools for composing operations, observing processes, and coordinating multiple agents.
How do I install Agency?
Install the package using 'go get github.com/neurocult/agency' and import it in your Go project.