Back Home

開源開發工具

Google and Speakeasy Open-Source an OpenAPI Generator, Bringing Agent CLIs and Documentation MCP into a Single Compilation Pipeline

After Google adopted Speakeasy to rebuild its GenAI SDK pipeline, the two companies released the core software for generating multilingual SDKs, CLIs, MCP servers, and Terraform providers from OpenAPI. The tool reduces the maintenance cost of evolving AI API interfaces, but adopters still need to carefully evaluate the AGPL, output licensing, default telemetry, and some private tests.

Gciriani · CC BY-SA 4.0 · Image source
zh-Hant

On September 17, Google and Speakeasy released an OpenAPI generator implemented in Go. It has already been used for Google GenAI’s Interactions, Agents, and Webhooks API clients. The generation process first parses and validates the specification, builds an SDK-oriented abstract syntax tree, loads language-specific templates and TypeScript helpers, and then formats the output and optionally compiles it. Unlike asking a model to simply “write an SDK from the documentation,” this deterministic pipeline aims to keep streaming, error types, retries, and pagination consistent across languages.

The public repository lists 12 primary output targets: C#, Go, Java, PHP, Python, Ruby, TypeScript, and Unity SDKs, along with a TypeScript MCP server, CLI, Postman collection, and Terraform provider. Google says the current pipeline covers six targets, three of which have published SDKs, with maintenance requiring roughly one engineer. Customization work can be accelerated with Antigravity agents, but formal specification transformations remain the responsibility of the reproducible generator.

Two of the new outputs are particularly useful for agent development. The CLI generator lets coding agents call APIs directly from the terminal without assembling ad hoc HTTP requests. The documentation MCP generator converts OpenAPI and Markdown into a queryable server, reducing the likelihood that agents will hallucinate outdated method names or parameters. This also means that API specifications, SDKs, command-line tools, and agent tool descriptions can all be updated from the same source, making drift easier to detect in CI.

Licensing and reproducibility still have boundaries. The generator itself is licensed under AGPL-3.0. Public mode requires users to explicitly select AGPL licensing for generated output, while a commercial license uses an expiring token to permit custom artifact licensing. The repository also discloses that default telemetry may include server URLs, specification titles, workspace identifiers, and validation errors, and can be disabled through an environment variable. The full snapshot companion remains private and returns only aggregate results for public pull requests. Before adoption, teams should test streaming compatibility, disable or audit telemetry, and have legal counsel confirm the licensing obligations for generated files and modifications to the generator.

Sources

  1. Why client SDK generation belongs in the open
  2. Speakeasy OpenAPI Generation