All 17 sections

How-to › Section 9

Use AI to do the integration#

Coding agents, MCP clients, agent frameworks, structured output, evals, observability, cost and safety on the consuming side.

12 guides in 6 topics. Every guide compares its approaches and shows the output its commands printed.

Write an integration with a coding agent 5 guides

Getting Claude Code, Cursor, Copilot, Codex CLI, Gemini CLI, Aider or Cline to write an API integration: prompting with the spec, feeding an SDK, a catalog SDK, a skill or the API's MCP server, stopping the agent inventing endpoints, reviewing generated code for missing retry and error handling, test-first loops, running the agent in a sandbox with a mock API, keeping generated files out of agent edits, and the experiments: measuring drift between two AI-written clients from one spec, comparing an AI-written client with generator output, and the hybrid workflow where an agent customizes a generated SDK without breaking regeneration.

Connect MCP clients to servers 2 guides

Wiring an MCP server into Claude Desktop, Claude Code, ChatGPT, Cursor, Cline, VS Code and custom clients: stdio versus remote configuration, OAuth in client config, restricting which tools an agent may call, running several servers at once, composing servers behind one gateway (mcp-proxy), running a stdio server as a subprocess from a Python agent, health checks, debugging with MCP Inspector, and using catalog MCP servers, aontu-mcp and the tabnas mcp server as ready-made examples.

Build an agent that calls APIs 1 guide

Agent loops and frameworks: Claude Agent SDK, OpenAI Agents SDK, LangGraph, Vercel AI SDK, Mastra, CrewAI; wrapping a typed SDK as tools, converting OpenAPI operations into function schemas, auth passthrough, pagination in tool results, parallel tool calls, long-running operations, streaming tool output, multi-step workflows (Arazzo as a description format), and calling SDKs directly versus through MCP.

Constrain model output to a schema 1 guide

Making a model emit valid data: JSON Schema structured outputs, tool-call schemas used as output, GBNF and Lark grammars for constrained decoding (llama.cpp, vLLM, Outlines, guidance), repairing malformed or truncated JSON, validating with Zod, Pydantic or gubu and retrying, and generating grammars from a spec (the aontu GBNF and Lark output and the tabnas GBNF grammar as options).

Evaluate and observe agents 1 guide

Evals (promptfoo, Braintrust, Inspect, LangSmith, custom harnesses), golden traces, task success rates across model providers, regression suites for tool use recorded from real traffic, tracing with OpenTelemetry GenAI semantic conventions (Langfuse, Phoenix, Helicone, OpenLLMetry), token and cost accounting, per-task budgets as cutoffs versus hard caps (the sdkgen cost feature as one example with its limit stated), caching tool results across steps, prompt caching, model routing.

Guard agents and add approvals 2 guides

The agent side of safety: prompt injection defence for tool results, web pages and documents, isolating untrusted content, output filtering, allow lists, human-in-the-loop approval before destructive calls (this branch owns approval), MCP elicitation, dry-run modes, sandboxing, least privilege per tool, spend and blast-radius limits, guardrail libraries (OpenAI Agents SDK guardrails, Guardrails AI, NeMo Guardrails, Llama Guard), and testing against an injection corpus.

All how-to guides

Generate the client instead of writing it#

Retries, timeouts, pagination and auth are the same problems in every client. Voxgig generates them from your OpenAPI description, in 23 languages, from one model.

Get the Voxgig dispatch

Short notes on building SDKs, CLIs, REPLs, and MCPs for API-first teams, plus the occasional Fireside episode pick.

By signing up you agree to our Terms and Conditions.