go-agent  by Protocol-Lattice

Go framework for building production-ready AI agents

Created 9 months ago
253 stars

Top 99.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Protocol-Lattice/go-agent provides a Go framework for building production-ready AI agents. It offers idiomatic Go components for LLM integration, graph-aware memory, UTCP tool orchestration, and multi-agent coordination, enabling developers to create sophisticated AI applications efficiently.

How It Works

The framework features a core agent.Agent with pluggable LLM providers (Gemini, OpenAI, Anthropic, Ollama) and memory solutions (short-term, vector-backed long-term). It utilizes an Agent Development Kit (ADK) for dependency injection and supports graph workflows for deterministic control flow. Key advantages include idiomatic Go design, UTCP integration, and robust features like middleware and guardrails.

Quick Start & Requirements

Install via go get github.com/Protocol-Lattice/go-agent. The project targets Go 1.25.10. A basic example runs with a dummy LLM and in-memory storage without API keys. Real LLM providers require specific environment variables for API keys (e.g., OPENAI_API_KEY). Various persistent memory backends are supported, including PostgreSQL with pgvector, Qdrant, MongoDB, and Neo4j.

Highlighted Details

  • Graph Workflows: Enables defining deterministic control flow using nodes and edges, supporting function, router, agent, and tool nodes for complex orchestration.
  • Durable Workflow Runs: Checkpoints node transitions for multi-step processes, allowing resumption after restarts or failures via workflow.RunStore.
  • Model Middleware: Integrates production-grade policies such as timeouts, retries, rate limiting, and token budgeting for robust LLM interactions.
  • Guardrails: Provides input validation/transformation (e.g., PII masking, prompt injection detection) and output safety policies (e.g., blocklists).
  • Agent-as-Tool: Allows agents to be wrapped as tools, facilitating hierarchical agent structures and UTCP integration.
  • File Context: Supports passing file data (text, images, video) directly to LLM generation calls.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), or project health signals were found in the provided README content.

Licensing & Compatibility

The license is indicated as "See LICENSE". Specific compatibility notes for commercial use or closed-source linking are not detailed in the provided text.

Limitations & Caveats

The framework is described as "Built for production," but features like CodeMode require careful use in trusted environments. Execution is at-least-once, necessitating idempotent side-effecting nodes. Token budgets are estimates, and retry middleware has specific limitations regarding stream restarts.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
14 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.