# Goa and Goa-AI

Goa is a Go framework that gives coding agents less code to write and one contract to reason from. Generate HTTP, gRPC, and JSON-RPC servers, typed clients, validation, and API specifications. Build AI agents, MCP servers, and tool registries with Goa-AI.

GitHub: [Goa](https://github.com/goadesign/goa) · [Goa-AI](https://github.com/goadesign/goa-ai)

Source: https://goa.design/

## A smaller job for your coding agent.

### Generate once. Skip the token spend.

Every generated transport, client, and schema is code the LLM doesn’t need to compose. Spend that work on domain logic, useful tests, and better tools.

### Give context a source of truth.

Types, constraints, descriptions, and methods live in the design. Consistent generated structure gives the agent a map of the codebase and a clear place to make changes.

### Turn drift into compiler errors.

Change the contract and regenerate every representation together. Go flags incompatible callers and implementations, giving your agent concrete feedback for the next edit.

## Goa

Define your service once. Generate its APIs, clients, validation, and specifications together. Implement the business logic behind a typed Go interface.

HTTP, gRPC, JSON-RPC. Servers, typed clients, and CLI clients from the same service design.

Go types, validation, encoding, error mappings, OpenAPI, and Protocol Buffers.

[Build a service](https://goa.design/docs/1-goa/quickstart/)

## Goa-AI

Design the tools and outcomes. Generate the contracts. Use the runtime to coordinate model calls, tool execution, human input, and durable workflows.

Generated schemas, codecs, service bindings, and completion helpers. Agents as tools, linked child runs, typed evaluation suites, and scenario hooks.

Typed events, confirmations, cancellation, and policies. Local execution to start; Temporal for durability.

[Build an AI agent](https://goa.design/docs/2-goa-ai/quickstart/)

## Create MCP servers from your services.

Expose service methods as MCP tools. Publish resources and prompt templates. Goa-AI generates the protocol handling and adapters, so MCP becomes another interface to your application. Agents can also consume external MCP tools.

[Build an MCP server](https://goa.design/docs/2-goa-ai/mcp-integration/)

## Host a registry for your tools.

Run the included registry server as a shared catalog and invocation gateway. Publish toolsets, discover their schemas, and route calls to healthy providers. Agents and tool providers can deploy and scale independently. Backed by Redis and Pulse.

[Host a tool registry](https://goa.design/docs/2-goa-ai/registry/)

## Teach your agent the Goa way.

Install the Goa service designer skill in your project. It guides your coding agent through design, generation, implementation, and verification—including which files to edit and which to regenerate.

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

Run in your project. Requires Node.js and npm.

[Installation and workflow](https://goa.design/docs/ai-development/#install-the-skill)

## Why use Goa if a coding agent can write the code?

A coding agent authors code by inference; Goa derives contract code from your design. Each generated server, client, codec, and schema is code the model does not need to write separately. The design concentrates context, the generated structure stays consistent, and the compiler identifies incompatible implementations after changes. Your agent still writes business logic and tests.

## What is the difference between Goa and Goa-AI?

Goa designs and generates Go service APIs: HTTP, gRPC, JSON-RPC, clients, validation, and specifications. Goa-AI extends the same DSL and generator with typed tools, AI agents, structured completions, evaluations, and MCP servers. It also provides an agent runtime and a hosted tool registry server. You can start with either framework; Goa-AI does not require a separately deployed Goa service.

## Can I use Goa-AI just to build an MCP server?

Yes. Add MCP declarations to a Goa service to generate a server exposing tools, resources, and prompt templates. Implement the service methods behind the generated adapters. You do not need to run a Goa-AI agent to serve MCP.

## How does generation reduce LLM work?

Goa generates the transport and contract code without an LLM composing those files. That removes a category of output-token work. Total savings depend on the task, model, context, and iterations; compare complete changes, including tests and review, to measure the effect in your project.

