Skip to main content

Resources

The Envoy AI Gateway uses several custom resources to manage AI traffic. Here's an overview of the key resources and how they relate to each other:

Resource Reference

ResourcePurposeAPI Reference
AIGatewayRouteDefines unified API and routing rules for AI trafficAIGatewayRoute
AIServiceBackendRepresents individual AI service backendsAIServiceBackend
BackendSecurityPolicyConfigures authentication for backend accessBackendSecurityPolicy

Core Resources

AIGatewayRoute

A resource that defines a unified AI API for a Gateway, allowing clients to interact with multiple AI backends using a single schema.

  • Specifies the input API schema for client requests
  • Contains routing rules to direct traffic to appropriate backends
  • Manages request/response transformations between different API schemas
  • Can track LLM request costs (like token usage)

AIServiceBackend

Represents a single AI service backend that handles traffic with a specific API schema.

  • Defines the output API schema the backend expects
  • References a Kubernetes Service or Envoy Gateway Backend
  • Can reference a BackendSecurityPolicy for authentication

BackendSecurityPolicy

Configures authentication and authorization rules for backend access.

  • API Key authentication
  • AWS credentials authentication

Resource Relationships

The AIGatewayRoute acts as the entry point, defining how client requests are processed and routed to one or more AIServiceBackends. Each AIServiceBackend can reference a BackendSecurityPolicy, which provides the necessary credentials for accessing the underlying AI service.