The problem
Onboarding a new service into a public API platform isn't a single change: it's at least six artifacts coordinated across several repositories — the OpenAPI specification, the endpoint implementation, pricing and rate-limit configuration, gateway permissions and rules, public documentation and the Playground entry. Each artifact has its own format, its own conventions and its own repo. Doing this by hand, service by service, works but is slow and prone to inconsistencies: a parameter that lands in the spec but not the server, a pricing rule that never reaches the gateway, a docs page that gets forgotten.
The solution
A system of specialized AI agents, one per artifact, orchestrated around a single service definition as the source of truth. Each agent deeply knows its repo's conventions — the spec format, the controller structure, the gateway configuration schema, the docs page template — and produces the corresponding change ready for human review. The orchestrator splits the work across agents, passes the service definition as shared context, and consolidates the results into a coherent set of changes across repos.
The system is deliberately human-in-the-loop (HITL): every change the agents propose goes through human review and approval before merging, because pricing, permissions and gateway rules touch real billing. For low-risk artifacts — documentation, examples — the model can relax towards human-on-the-loop (HOTL): the agent applies the change and a person supervises with the ability to intervene, rather than approving every step.
What it generates
From a service definition, the system generates:
- OpenAPI specification — the endpoint's request/response contract, with its parameters and validations.
- Endpoint implementation — the controller and use case in the server, following the pattern of existing endpoints.
- Pricing and rate limits — per-generation or usage-based cost configuration and per-tier limits.
- Gateway permissions and rules — the route, its associated permission and the gateway-level cost rules.
- Public documentation — the endpoint reference page and its changelog entry.
- Playground entry — the interactive form generated from the same spec to try the service from the browser.
Impact
The result is a repeatable, consistent onboarding process: the same pattern that used to be applied by hand, service by service, to model families such as Kling or WAN is now generalized to any service the platform wants to expose. The orchestrator reduces the manual cross-repo work to reviewing and approving what each agent proposes, rather than writing it from scratch.
Lessons
Agents perform well to the extent that the conventions they follow are strict and the source of truth is single: when each artifact's format is well defined and the service definition leaves no ambiguity, the agent produces a correct change almost every time; when the convention is loose, the agent inherits that ambiguity. It's the same principle that governs this portfolio — specs and typed data as the single source, never content duplicated by hand.