Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member
Home/OSS Directory/Kong Gateway

Kong Gateway

Model routing and gateways

Cloud-native API gateway whose AI plugins add multi-provider LLM routing, prompt guarding and decoration, token-based rate limiting and semantic caching in front of model APIs. Named in the taxonomy.

api gatewayai pluginsrate limiting

Kong Gateway: Cloud-Native API and AI Traffic Management

Kong Gateway is a cloud-native, platform-agnostic API gateway designed to handle both traditional API traffic and modern AI workloads, including large language models (LLMs) and multi-agent conversational platforms (MCPs). Originally launched in 2014, Kong Gateway has evolved to support advanced AI-specific features while maintaining its core capabilities in routing, load balancing, authentication, and observability. Its architecture is built for scalability, extensibility, and seamless integration with cloud-native environments, including Kubernetes.

The gateway operates as a central layer for orchestrating traffic across microservices, APIs, and AI systems. It supports multi-provider LLM routing, enabling organizations to distribute requests across providers such as OpenAI, Anthropic, Google Cloud’s Gemini, AWS Bedrock, Azure AI, Databricks, Mistral, and Hugging Face. This flexibility is complemented by AI-specific traffic governance, security, and analytics, making it suitable for environments where AI workloads demand dynamic and fine-grained control.

Its native Kubernetes Ingress Controller further extends its utility in containerized environments, where it can manage traffic for both traditional APIs and AI-driven services.

The gateway’s extensibility is a key feature, achieved through a plugin system that supports Lua, Go, and JavaScript. Plugins enable functionalities such as token-based rate limiting, request/response transformations, logging, monitoring, and AI-specific features like semantic caching and prompt guarding. These plugins are developed and shared via the Kong Plugin Hub, fostering a collaborative ecosystem where community and enterprise contributions enhance the platform’s capabilities.

Kong Gateway is licensed under the Apache 2.0 license, ensuring permissive use and modification rights for organizations. Its open-source nature is complemented by Kong Konnect, a commercial offering that provides additional features such as real-time analytics, a service catalog, developer portals, and managed control plane services. This dual-model approach allows organizations to leverage the flexibility of open-source while accessing enterprise-grade support and scalability when needed.

How Kong Gateway Works

Its architecture is divided into two primary components: the data plane (proxy layer) and the control plane (admin API and database). The data plane handles incoming requests, applying routing, authentication, rate limiting, and other policies before forwarding them to the appropriate backend service. The control plane manages configurations, plugins, and service definitions, allowing dynamic adjustments without downtime.

For AI-specific workloads, Kong Gateway introduces specialized features such as multi-provider LLM routing, which dynamically selects the most appropriate LLM provider based on predefined criteria like cost, latency, or model capabilities. Prompt guarding ensures that user inputs adhere to security and compliance policies before being processed, while semantic caching reduces redundant LLM calls by storing and reusing responses for identical or similar prompts. Token-based rate limiting further optimizes cost management by enforcing limits on API token consumption per user or service.

This approach allows organizations to define AI-specific policies, such as semantic routing rules or prompt validation logic, without requiring custom code. Additionally, Kong Gateway supports observability features tailored for AI traffic, including real-time analytics, logging, and monitoring of LLM interactions, which are critical for debugging and optimizing AI-driven workflows.

Deployment options for Kong Gateway include Docker containers, Kubernetes-native setups, and traditional server installations. The Docker image is distroless, ensuring minimal attack surface and optimized performance. Kubernetes deployments leverage the official Kong Ingress Controller, enabling users to manage API and AI traffic using native Kubernetes resources like Ingress, HTTPRoute, and Service.

Configuration management is streamlined through tools like kongctl, a command-line interface for declarative configuration, and decK, a declarative configuration tool that allows users to define Kong Gateway settings as code. These tools integrate with CI/CD pipelines, enabling automated deployments and version-controlled configurations. For organizations using Kong Konnect, additional features such as centralized governance, audit logging, and developer portals enhance the platform’s enterprise capabilities.

Use Cases for Kong Gateway in AI and API Management

Kong Gateway is widely adopted for managing API traffic in microservices architectures, where its routing, authentication, and load-balancing capabilities simplify the integration of disparate services. In AI-specific contexts, it serves as a critical layer for governing LLM and MCP traffic, addressing challenges such as cost optimization, security, and performance. For example, enterprises use Kong Gateway to route LLM requests across multiple providers based on real-time factors like token costs or model availability, ensuring efficient resource utilization.

One prominent use case is AI cost management, where Kong Gateway’s token-based rate limiting and semantic caching reduce unnecessary LLM invocations. Prompt guarding further mitigates risks by filtering malicious or non-compliant inputs before they reach LLM endpoints, aligning with regulatory requirements and internal security policies.

This is particularly valuable in scenarios where AI agents automate workflows or interact with sensitive data.

In cloud-native environments, Kong Gateway’s Kubernetes Ingress Controller enables seamless management of AI and API traffic within clusters. Organizations deploying AI models as microservices can use Kong to handle ingress traffic, apply security policies, and monitor performance. This approach is scalable and aligns with Kubernetes best practices, reducing operational overhead while enhancing flexibility.

For enterprises adopting multi-cloud or hybrid architectures, Kong Gateway’s platform-agnostic design ensures consistent traffic management across environments. Its support for multiple LLM providers allows organizations to avoid vendor lock-in, selecting the best-performing or most cost-effective model for each use case.

Key Features and Capabilities

  • Multi-Provider LLM Routing: Kong Gateway routes LLM requests across providers like OpenAI, Anthropic, Google Cloud’s Gemini, AWS Bedrock, Azure AI, Databricks, Mistral, and Hugging Face. Routing decisions can be based on factors such as cost, latency, or model capabilities, ensuring optimal performance and cost efficiency.
  • Prompt Guarding and Security: The gateway includes plugins for validating and sanitizing prompts before they reach LLM endpoints.
  • Semantic Caching: By caching LLM responses based on semantic similarity rather than exact matches, Kong Gateway reduces redundant API calls. This capability is particularly useful for applications with repetitive or predictable queries, significantly lowering token consumption and associated costs.
  • Token-Based Rate Limiting: Kong Gateway enforces rate limits at the token level, allowing organizations to control LLM usage costs by capping the number of tokens consumed per user, service, or time window.
  • AI Observability and Analytics: The gateway provides real-time analytics and monitoring for AI traffic, including metrics on LLM latency, token usage, and error rates.
  • Plugin Ecosystem: Kong Gateway’s plugin system extends its functionality through community and enterprise-developed plugins. Plugins support features such as request/response transformations, logging, monitoring, and custom AI-specific logic. The Plugin Hub serves as a central repository for sharing and discovering plugins, fostering collaboration within the developer community.
  • Kubernetes-Native Integration: The official Kong Ingress Controller allows users to manage API and AI traffic using Kubernetes-native resources. This integration simplifies deployments in containerized environments, enabling organizations to leverage Kubernetes’ scalability and orchestration capabilities for AI workloads.
  • Declarative Configuration: Kong Gateway supports declarative configuration through tools like decK and kongctl, allowing users to define settings as code.
  • Enterprise-Grade Features via Kong Konnect: While the open-source version of Kong Gateway is feature-rich, Kong Konnect offers additional enterprise capabilities, including real-time analytics, a service catalog, developer portals, and managed control plane services. These features are designed to meet the demands of large-scale AI and API deployments.
  • Features like audit logging, OAuth 2.0 integration, and SSO further enhance security across AI and API workflows.

Advanced AI and API Governance with Kong Gateway

Kong Gateway addresses the governance challenges inherent in AI and API ecosystems, where unchecked traffic can lead to cost overruns, security vulnerabilities, and compliance risks. Its AI-specific features, such as semantic routing and prompt guarding, provide fine-grained control over LLM interactions, ensuring that traffic adheres to organizational policies. For example, semantic routing can prioritize requests based on business logic, such as routing high-priority queries to premium models while directing lower-priority requests to cost-effective alternatives.

The gateway’s token-based rate limiting and caching mechanisms are particularly effective in managing AI costs, which can escalate rapidly in high-volume environments. Additionally, Kong Gateway’s observability features provide visibility into AI traffic patterns, enabling proactive management of resource usage and performance bottlenecks.

For organizations deploying AI agents, Kong Gateway serves as a governance layer that enforces policies across agent interactions with APIs, databases, and other services.

These tools provide enterprises with the infrastructure needed to manage AI and API traffic at scale, while maintaining transparency and accountability. For example, audit logs can track AI model usage, identify anomalies, and support compliance reporting, while developer portals enable self-service access to APIs and AI services, streamlining integration workflows.

The platform’s support for multi-cloud and hybrid architectures ensures that governance policies remain consistent across diverse environments.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.