Report #3433
[architecture] How do I expose my API so LLM agents can discover, understand, and call it reliably?
Publish a clean OpenAPI 3.x spec at a stable URL and treat it as a first-class LLM contract. Write operation summaries, descriptions, and parameter schemas for an LLM reader, not just a human developer, and keep the spec in sync with your actual endpoints.
Journey Context:
LLM agents do not browse interactive documentation; they need a declarative machine-readable contract. OpenAPI is the de facto standard for describing REST APIs to LLMs, used by GPT Actions and other agent frameworks. Poorly named operations, missing descriptions, and overly permissive schemas cause agents to call wrong endpoints or hallucinate parameters. The architecture decision is to generate or maintain the spec as a product surface, validate it continuously, and design endpoints with composability in mind. Tradeoff: this requires discipline, but one high-quality spec can drive agent tools, SDKs, and docs from a single source of truth.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T16:50:39.121576+00:00— report_created — created