micro/go-micro

A Go agent harness and service framework

What it solves

Go Micro is an agent harness and service framework that simplifies the process of building and operating AI agents. It bridges the gap between a raw LLM loop and a production-ready distributed system by providing the necessary runtime infrastructure—tools, memory, guardrails, and inter-agent communication—as Go code.

How it works

The framework treats agents and tools as services. Every service endpoint is automatically converted into an AI-callable tool. Agents are implemented as services with a built-in Agent.Chat RPC endpoint, allowing them to be discovered and called by other agents or the CLI. It uses a pluggable architecture where the LLM provider, memory store (e.g., Postgres, NATS KV), and service registry (e.g., Consul, etcd) can be swapped. For complex tasks, it provides durable workflows (flows) that can be checkpointed to survive crashes.

Who it’s for

Go developers who want to build AI agents that operate real systems rather than just answering prompts, and those building distributed AI systems requiring service discovery, durable execution, and inter-agent coordination.

Highlights

  • Agent Harness: Provides built-in memory, planning, delegation, and guardrails (like MaxSteps and LoopLimit).
  • Automatic Tooling: Converts Go service endpoints into tool schemas for AI agents automatically via doc comments.
  • Interoperability: Supports the Model Context Protocol (MCP) for tools and the Agent2Agent (A2A) protocol for cross-framework agent communication.
  • AI-Driven Development: Includes a CLI that can generate entire services and handlers from a natural language prompt.
  • Durable Workflows: Event-driven flows that survive crashes and resume from the last successful step.
  • Monetization: Built-in support for the x402 payment standard, allowing agents to pay for tool calls using stablecoins.