{"openapi":"3.1.0","info":{"title":"AI Agent public discovery API","description":"Machine-readable discovery and health endpoints for AI Agent (https://aiagent.app). This is not a tenant product API — there is no public REST or GraphQL surface for managing agents, workflows, or workspace data. Humans use the web app; automated agents should start at /llms.txt and /auth.md.","version":"v2.8.0"},"servers":[{"url":"https://aiagent.app"}],"paths":{"/openapi.json":{"get":{"operationId":"getOpenApiSpec","summary":"OpenAPI discovery document","description":"Returns this OpenAPI 3.1 specification describing public machine-readable endpoints.","tags":["Discovery"],"responses":{"200":{"description":"OpenAPI 3.1 document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}}}}},"/api/health":{"get":{"operationId":"getHealth","summary":"Liveness and build version probe","description":"Unauthenticated health check returning process status and deployed APP_VERSION. Used by load balancers and operators.","tags":["Health"],"security":[],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthOk"}}}},"503":{"description":"Service is degraded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthDegraded"}}}}}}},"/api":{"get":{"operationId":"probeApiRoot","summary":"API root discovery probe (unauthenticated)","description":"Returns 401 with a WWW-Authenticate Bearer hint pointing at OAuth protected-resource metadata. There is no working agent token API here — use /llms.txt and /auth.md for discovery.","tags":["Discovery"],"security":[{"bearerHint":[]}],"responses":{"401":{"description":"Unauthenticated — discovery hint only","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer resource_metadata=\"https://aiagent.app/.well-known/oauth-protected-resource\""}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/llms.txt":{"get":{"operationId":"getLlmsTxt","summary":"Concise LLM/agent context","description":"Plain-text index of AI Agent pages and resources for LLM and agent crawlers.","tags":["Discovery"],"responses":{"200":{"description":"llms.txt plain text","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/auth.md":{"get":{"operationId":"getAuthMd","summary":"Agent authentication guide","description":"Markdown document describing how agents should authenticate and what public resources exist.","tags":["Discovery"],"responses":{"200":{"description":"auth.md markdown","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/pricing.md":{"get":{"operationId":"getPricingMd","summary":"Pricing summary for agents","description":"Markdown pricing overview for machine-readable consumption.","tags":["Discovery"],"responses":{"200":{"description":"pricing.md markdown","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"operationId":"getSitemap","summary":"XML sitemap","description":"Dynamic sitemap listing public marketing and content URLs with lastmod dates.","tags":["Discovery"],"responses":{"200":{"description":"Sitemap XML","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/.well-known/api-catalog":{"get":{"operationId":"getApiCatalog","summary":"RFC 9727 API catalog linkset","description":"Linkset JSON catalog pointing to service documentation and llms.txt.","tags":["Discovery"],"responses":{"200":{"description":"API catalog linkset","content":{"application/linkset+json":{"schema":{"$ref":"#/components/schemas/ApiCatalog"}}}}}}},"/mcp":{"get":{"operationId":"getMcpDiscoveryHint","summary":"Public MCP discovery hint","description":"Read-only public MCP for product discovery","tags":["Discovery"],"responses":{"200":{"description":"JSON hint unless Accept includes text/event-stream (SSE)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}},"text/event-stream":{"schema":{"type":"string"}}}}}},"post":{"operationId":"postMcpJsonRpc","summary":"Public MCP Streamable HTTP","description":"Read-only public MCP for product discovery","tags":["Discovery"],"responses":{"200":{"description":"Streamable HTTP JSON-RPC transport","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}}},"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Better Auth session cookie used by the web app for authenticated dashboard routes. Not a public API key for agents."},"bearerHint":{"type":"http","scheme":"bearer","description":"Discovery hint only on GET /api — not a working agent bearer token API. See /.well-known/oauth-protected-resource."}},"schemas":{"OpenApiDocument":{"type":"object","description":"OpenAPI 3.1 document","additionalProperties":true},"ProblemDetails":{"type":"object","required":["type","title","status","detail","code"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string"}}},"HealthOk":{"type":"object","required":["status","version"],"properties":{"status":{"type":"string","enum":["ok"]},"version":{"type":"string"},"transport":{"type":"string"},"connect":{"type":"object","additionalProperties":true}}},"HealthDegraded":{"type":"object","required":["status","version"],"properties":{"status":{"type":"string","enum":["degraded"]},"version":{"type":"string"}}},"ApiCatalog":{"type":"object","properties":{"linkset":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}