Let agents reason. Let Goa generate.

Goa is a Go framework that gives coding agents less code to write and one contract to reason from. Compile one Go design into HTTP, gRPC, and JSON-RPC servers, typed clients, validation, and OpenAPI 3 specs, or use Goa-AI to build product AI agents, MCP servers, and tool registries.

GitHub Goa Goa-AI

Open source · MIT licensed · Go 1.27+

Choose a design example
design/catalog.goDesign excerpt
var LookupPayload = Type("LookupPayload", func() {
    Field(1, "sku", String, func() { Pattern("^[A-Z0-9-]+$") })
    Required("sku")
})
var _ = Service("catalog", func() {
    Error("not_found", ErrorResult)
    JSONRPC(func() { POST("/rpc") })
    Method("lookup", func() {
        Payload(LookupPayload)
        Result(Product)
        Error("not_found")
        HTTP(func() { GET("/products/{sku}") })
        GRPC(func() {})
        JSONRPC(func() {})
    })
})
goa gen example.com/catalog/design
// Implement Lookup -> GET /products/BOOK-1 -> 200 OK Lookup(ctx context.Context, p *LookupPayload) (*Product, error)

Generated in gen/ (0 LLM tokens)

  • HTTP + gRPC + JSON-RPC
  • Typed clients
  • Service interfaces
  • Validation + codecs
  • OpenAPI + Protocol Buffers
  • Command-line clients
design/catalog.goDesign excerpt
Agent("assistant", "Answer product questions", func() {
    RunPolicy(func() {
        DefaultCaps(MaxToolCalls(6))
    })
    Use("catalog", func() {
        Tool("lookup", "Find a product by SKU", func() {
            Args(LookupPayload)
            Return(Product)
            BindTo("lookup")
        })
    })
})
goa gen example.com/catalog/design
// Local in-memory (0 API keys in tests) or Temporal assistant.RegisterAssistantAgent(ctx, rt, cfg)

Generated in gen/ (0 LLM tokens)

  • Tool JSON schemas
  • Typed payload codecs
  • Service bindings
  • Typed tool descriptors
  • Runtime registrations
  • AGENTS_QUICKSTART.md
design/support.goDesign excerpt
Agent("support", "Answer refund questions", func() {
    SystemPrompt(func() {
        Description("Refund policy")
        Args(func() {
            Attribute("account_name", String)
            Attribute("refund_limit", Int)
            Required("account_name", "refund_limit")
        })
        Template("You help {{ .AccountName }} customers. " +
            "Approve refunds up to ${{ .RefundLimit }}.")
    })
})
goa gen example.com/support/design
// Preview on goa-ai@fb00df9 (post-v0.90.0); rendered with typed Go structs support.RenderSystemPrompt(ctx, in.Agent, support.SystemPromptArgs{...})

Generated in gen/ (0 LLM tokens)

  • Template checks at goa gen
  • Typed render functions
  • Prompt registrations
  • Scoped runtime overrides
Inspect the full 54-line catalog example (57 generated files) → Read the prompt management guide →

Start in two steps

Go 1.27+ · Zero API keys for codegen & local tests · Setup & workflow

Step 1 · Add the optional coding-agent skill or install the Go CLI:

npx skills add goadesign/goa --skill goa-service-designer

Skill installer uses Node.js/npm (Claude Code, Codex, Cursor, Windsurf, Copilot) · go run runs Goa directly from go.mod without Node.js.

Step 2 · Ask your coding agent:

Use goa-service-designer to initialize example.com/catalog, design a catalog service with HTTP and gRPC endpoints in design/catalog.go, run go run goa.design/goa/v3/cmd/goa@latest gen example.com/catalog/design, implement Lookup, and test it.

Service path reaches a live HTTP + gRPC server; AI path runs locally in memory with zero API keys before adding live models or Temporal.

Trusted by Engineering Teams Worldwide

In production since 2016 · Goa v3 · Generated Go routing, decoding & validation on standard net/http and google.golang.org/grpc

Why contract generation beats freehand plumbing

54 lines of DSL → 57 generated files
In the catalog reference example, a 54-line design/catalog.go compiles over 5,000 lines of Go transports, OpenAPI, Protobuf, and tool JSON schemas into gen/ (committed to Git, zero LLM output tokens).
One contract to load into context
Payload types, regex/range rules, descriptions, and transport routes live in design/*.go. Your coding agent reads the contract and gen/ interface instead of scanning four hand-maintained layers.
Compiler errors catch drift immediately
Change a field or method in design/ and rerun goa gen. Go flags every handler, client, and tool executor whose signature no longer matches.
Read the 54-line catalog walkthrough →

Goa for services. Goa-AI for agents and MCP.

Goa

One contract. Every transport.

Declare payloads, validations, and errors once in Go. Generate standard net/http, gRPC, and JSON-RPC servers, typed clients, and OpenAPI 3 / Protobuf specs — routing, decoding, and validation are generated Go code, not a reflection-driven framework.

HTTP · gRPC · JSON-RPC
Servers, typed Go clients, and CLI clients compiled from the same service design.
Streaming built into the design
WebSocket, Server-Sent Events, gRPC streaming.
Validation at the transport edge
Required fields, patterns, ranges, error status codes, OpenAPI 3.2, and Protocol Buffers.
Explore GoaGitHub

Goa-AI

Typed agents, MCP servers, and durable runs.

Extend the same Go DSL to tool-using AI agents and MCP servers. Test locally in memory with zero API keys, then connect OpenAI, Anthropic, AWS Bedrock, or Google Vertex AI and run durably on Temporal.

Service validation & hidden context
Reuse Goa service methods as tools (BindTo), hide server-supplied tenant IDs from the model (Inject), and cap paged outputs (BoundedResult).
Multi-agent trees & deterministic evals
Compose child agents as tools with bounded budgets and test tool trajectories deterministically without live LLM calls.
Approval gates, streaming & standalone MCP
Pause sensitive tools for human approval (Confirmation), stream typed events to UIs, or expose MCP without an agent loop.
Explore Goa-AIGitHub

Create MCP servers from your services.

Your Goa designdesign/catalog.go
Service("catalog", func() {
    MCP("catalog", "1.0.0")
    JSONRPC(func() { POST("/mcp") })

    Method("lookup", func() {
        Payload(LookupPayload) // Pattern("^[A-Z0-9-]+$")
        Result(Product)
        Tool("lookup",
            "Find a product by SKU")
    })
})
goa gen
Generated MCP interfaceOne typed contract
HTTP server
Streamable HTTP MCP handlers wired directly to your Goa endpoints.
Typed clients
Invoke MCP tools and read resources through generated Go methods.
Tool schemas
Input and output JSON Schemas derived from the same LookupPayload rules.
Validation and codecs
Reject malformed model arguments with retry hints before your handler runs.
LookupPayload’s regex rule compiles into both HTTP/gRPC request decoders and MCP tools/list inputSchema.
One contract to review
Review types, validation, and security in design/catalog.go. Implement Lookup once in Go and regenerate gen/ when requirements change.
Clear work for coding agents
Your coding agent edits design/ and internal/ while gen/ stays off-limits, turning schema drift into immediate Go compiler errors.
Build an MCP server

Supports OAuth resource servers, interactive input exchanges, durable Tasks, MCP Apps, and Skills.

Host a registry for your tools.

Run Goa-AI’s clustered registry server as a shared catalog and invocation gateway. Services publish toolsets, agents search and load schemas on demand instead of bloating every prompt, and calls route to healthy providers over Redis and Pulse (Goa’s Redis streaming and replicated-map library).

Host a tool registry
catalogsearchbilling
Your tool registryDiscover schemas · Route calls · Track health

Your agents and applications

How Goa & Goa-AI compare

Protobuf & OpenAPI toolchains (buf/Connect, oapi-codegen)
buf + ConnectRPC generates HTTP/gRPC from .proto while oapi-codegen targets OpenAPI YAML. Goa expresses rich HTTP routing, gRPC, JSON-RPC, OpenAPI 3.2, and MCP/agent toolsets in one Go package — generating net/http and grpc routing and validation directly in Go.
Hand-wired Go MCP SDKs (go-sdk, mcp-go)
Struct-tag MCP handlers duplicate parameter rules already written for your HTTP/gRPC API. Adding MCP(...) and Tool(...) to a Goa service reuses the same validated payload types and service implementation.
Python/TS agent SDKs (LangGraph, OpenAI Agents SDK)
Graph SDKs wire orchestration in dynamically typed application code. Goa-AI compiles typed Go tool codecs, server-injected context, cursor pagination, approval gates, and Temporal workflow activities into one static Go binary.

Questions before you start

Can I adopt Goa incrementally in an existing Go repo, and do I commit gen/?
Yes to both. goa gen generates standard net/http handlers and google.golang.org/grpc servers (not a reflection-driven router), so you can mount a Goa service alongside existing Go routes, attach standard middleware, and commit gen/ so every contract diff is auditable in code review.
How do non-Go clients call a Goa service, and when do I add Goa-AI?
TypeScript, Python, and mobile clients consume the generated OpenAPI 3.2 and .proto specs directly. Start with Goa for HTTP/gRPC/JSON-RPC APIs; add Goa-AI when exposing MCP tools or running product agents (testable locally with zero API keys before connecting live models or Temporal).
Can I use Goa-AI just to expose an MCP server?
Yes. Add MCP(...) and Tool(...) declarations to a Goa service to generate tools/list JSON Schemas, validation retry hints, and Streamable HTTP handlers without running an agent loop.
When is Goa not a fit, and how should we evaluate it?
Skip Goa for throwaway scripts or tiny prototypes where a separate design/ package adds ceremony. On multi-endpoint services or coding-agent teams, compare one real feature end to end (tokens, review diffs, and defects) starting from the catalog walkthrough.

Companion libraries and multi-agent tools

Goa and Goa-AI pair with open-source Go libraries for observability, Redis event streams, C4 diagrams, and multi-agent development.

Explore all ecosystem guides →
Chorus
Local MCP message bus (#channels, @agent DMs, pinned plans, and chorus ui) so Claude Code, Codex, and Gemini coordinate as peers at 0 idle tokens.
Highbay
Contract-driven control plane that pairs one builder coding agent with a separate test-writer agent in separate working copies before browser merge.
Pulse · Clue · Model
Redis streams, worker pools, and replicated maps (Pulse), OpenTelemetry tracing and error-flushed logging (Clue), and C4 architecture diagrams as code (Model).

Sponsors