agency logo

agency

neurocult/agency

Library for exploring Large Language Models and generative AI in Go

GraphCanon updated today · GitHub synced today · 38 views this month

514 stars36 forksLast push 1y Go MIT

Decision brief

Agency is a Go-idiomatic library aimed at developers looking to work with Large Language Models and generative AI techniques.

Good fit when

  • If you're proficient in Go and want to implement LLMs within a familiar ecosystem, consider agency.
  • Use when your project demands idiomatic Go code for implementing AI agents and exploring language models.

Avoid when

  • Avoid agency if your primary programming expertise lies outside of the Go ecosystem.
  • Not recommended if you require real-time performance characteristics that surpass what typical LLM exploration libraries can provide.
Pricing:
freemium - Agency is available under MIT license and is free for use, modification, and distribution. Additional services or integrations might involve costs not outlined within the repository.

Observed Jul 15, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Dormant (589d since push)
As of today
Provenance
Not a fork · Organization account
As of today
Security (OSV)
No lockfile
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

go get github.com/neurocult/agency
pkg.go.dev

How it fits your stack(13)

Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.

Integrates

Related

Relationship graph

Optional deeper exploration of typed edges and category neighbours.

Similar tools

Same-category neighbours not already linked as typed edges.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

A Go-idiomatic library to explore LLMs and generative AI capabilities through effective and clean code design.

Capability facts

Languages
go

Source: github.language · Aug 21, 2026

Categories

Graph entities

Tags

README

💻 Quick Start

Install package:

go get github.com/neurocult/agency

Chat example:

package main

import (
	"bufio"
	"context"
	"fmt"
	"os"

	_ "github.com/joho/godotenv/autoload"

	"github.com/neurocult/agency"
	"github.com/neurocult/agency/providers/openai"
)

func main() {
	assistant := openai.
		New(openai.Params{Key: os.Getenv("OPENAI_API_KEY")}).
		TextToText(openai.TextToTextParams{Model: "gpt-4o-mini"}).
		SetPrompt("You are helpful assistant.")

	messages := []agency.Message{}
	reader := bufio.NewReader(os.Stdin)
	ctx := context.Background()

	for {
		fmt.Print("User: ")

		text, err := reader.ReadString('\n')
		if err != nil {
			panic(err)
		}

		input := agency.NewTextMessage(agency.UserRole, text)
		answer, err := assistant.SetMessages(messages).Execute(ctx, input)
		if err != nil {
			panic(err)
		}

		fmt.Println("Assistant:", string(answer.Content()))

		messages = append(messages, input, answer)
	}
}

That's it!

See examples to find out more complex usecases including RAGs and multimodal operations.

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.