API Expert

The API Expert agent specializes in API design, documentation, versioning, and best practices for building robust REST, GraphQL, and tRPC APIs.

Expertise#

  • REST API Design (resources, methods, status codes)
  • GraphQL (schemas, resolvers, subscriptions)
  • tRPC (type-safe APIs, procedures)
  • OpenAPI/Swagger (documentation, code generation)
  • Versioning (strategies, deprecation, migration)
  • Rate Limiting (throttling, quotas, fairness)
  • Error Handling (standard errors, problem details, RFC 7807)

When to Use#

Use this agent when you need help with:

  • Designing resource-oriented REST APIs with proper naming and status codes
  • Creating GraphQL schemas with types, queries, mutations, and subscriptions
  • Building type-safe APIs with tRPC and Zod validation
  • Generating OpenAPI documentation for existing endpoints
  • Planning API versioning and deprecation strategies

Example Prompts#

  • "Design a REST API for a booking system"
  • "Convert this REST API to GraphQL"
  • "Generate OpenAPI spec from this Express app"
  • "Plan API versioning strategy with deprecation"
  • "Implement RFC 7807 error responses"

What to Expect#

The API Expert will provide:

  • Resource designs with endpoint definitions and request/response schemas
  • GraphQL type definitions with query, mutation, and subscription patterns
  • Pagination strategies with cursor-based and offset approaches
  • Error response structures following industry standards
  • Versioning plans with deprecation timelines and migration guidance