Alpha Gateway v0.12.1 docs are live

An AI gateway.
Composable by design.

Connect your applications and agents. Choose your backends. Configure how requests are routed and handled, with a Rust framework you can extend.

praxis-ai.yaml Open tutorial →
listeners:
  - name: ai
    address: "0.0.0.0:8080"
    filter_chains: [openai]

filter_chains:
  - name: openai
    filters:
      - filter: ai_operation
      - filter: router
        routes:
          - path_prefix: "/v1"
            cluster: openai_backend
      - filter: headers
        request_set: # Host: api.openai.com
      - filter: load_balancer
        clusters:
          - name: openai_backend
            endpoints: ["api.openai.com:443"]
Requests flowing through the gateway filter chainThree clients send OpenAI requests to the gateway listener on port 8080. Each request passes ai_operation, which classifies it, then router, which matches the /v1 prefix, then load_balancer, which forwards it to api.openai.com. The response streams back to the client as a series of token chunks.praxislistener ai · :8080chain openaicluster openai_backend← streamed responsecodexweb appagentapi.openai.com200 OKai_operationresponsesrouter/v1 ✓load_balancer→ :443 TLSpath_prefix "/v1" → openai_backend
  1. Listener: accept on port 8080
  2. ai_operation: classify the AI request
  3. router: match the /v1 prefix
  4. headers: set the Host header
  5. load_balancer: forward to api.openai.com over TLS
  6. Response: streamed back to the calling client
Config from the AI gateway quickstart, with the headers and TLS settings abridged. The animation is illustrative; the diagram omits the headers step.

Highlights: OpenAI Responses, Chat Completions, Anthropic Messages, AWS Bedrock, Vertex AI, Azure OpenAI, vLLM, MCP, A2A, Token rate limits, Guardrail providers, Token usage headers, Zero-copy streaming, StreamBuffer inspection, Written in Rust, Rustls TLS, unsafe_code = "deny", Fails closed.

Why Praxis

A governed entry point
to your models and tools.

Translate provider APIs, stream large payloads, and stop unwanted requests before they reach a model, on a Rust core you can extend.

The gateway classifies a client request, translates it when needed, and routes it in turn to vLLM, AWS Bedrock, Vertex AI and Azure OpenAI; the streamed answer flows back to the client.vLLMAWS BedrockVertex AIAzure OpenAIPraxisclassifytranslaterouteMessages → Chat CompletionsChat Completions → ConverseChat Completions → GeminiChat Completions → AzureAnthropic MessagesChat Completionssummarize theincident reportThe outage began whena stale route sent alltraffic to one pool ▍streamed back token by token · token usage exposed in response headers

One gateway for your model traffic Alpha

The gateway classifies OpenAI Responses, Chat Completions and Anthropic Messages traffic, routes by API format, model or MCP tool name, and translates between provider APIs, streaming included.

Gateway capabilities
  • Anthropic Messages clients on Chat Completions-compatible backends such as vLLM
  • Chat Completions adapted to Azure OpenAI, Bedrock Converse and Vertex AI Gemini, within their documented limits
  • MCP and A2A classification and routing
  • Token usage extracted across supported provider formats
Requests pass through token_ceiling, token_rate_limit and ai_guardrails filters. An oversized request is rejected, a client over its token budget gets 429, a request the guardrail provider blocks stops there, and the rest reach the model provider over TLS.token_ceilingtoken_rate_limitai_guardrailsrejected429blockedagentsproviderTLS verifiedcontrols run before the model provider sees the request

Governed before it reaches a model

Token ceilings, token rate limits and external guardrail providers sit in the request path. Underneath, the foundation treats security as a primary design constraint: secure defaults, upstream TLS verification, and it fails closed on ambiguous configuration.

Security hardening guide
  • unsafe_code = "deny" across the workspace
  • Rustls: no OpenSSL, no C FFI in the TLS path
  • Root execution rejected; admin endpoints stay on loopback
  • Token ceilings, token rate limits and guardrail providers
StreamBuffer: a filter inspects each chunk of a large body as it arrives while Praxis holds the chunks back from the upstream, then releases the whole buffer once the filter approves.1 · inspect2 · hold upstream3 · releaseStreamBufferfilter readsclientupstreamoptional max_bytes answers 413 when a body is too large

Big bodies, inspected without stalling

Each filter declares how it reads a body. Stream passes chunks straight through. StreamBuffer hands chunks to a filter as they arrive while holding them back from the upstream, then releases the buffer once the content checks out.

Payload processing
  • Peek-then-stream for body routing, JSON-RPC parsing and payload scanning
  • AI request classification builds on the same StreamBuffer model
  • Global hard ceilings on request and response size
  • gzip, brotli and zstd response compression
Request body chunks stream from the client through the Praxis filter chain to the upstream without waiting for the whole body.foundation · stream modeai_operationrouteryour_filterbalancerclientupstreameach chunk moves on as it arrives · no whole-body wait

A Rust core you can build on

The gateway runs on a proxy foundation written in Rust. Bodies stream by default: each chunk goes to the next hop as soon as it arrives. Implement the HttpFilter trait in your own crate and compile it in next to the built-in filters.

Extend the gateway in Rust
  • Zero-copy streaming by default
  • Round-robin, least-connections, consistent-hash, P2C, weighted
  • Active and passive health checks, circuit breaker
  • Custom filters compiled into your own build

Animations are illustrative; they show behavior, not measured performance.

From first request to your own deployment

Make the gateway yours

Start with a working request, then add the capabilities your application needs.

  1. 1Run the gatewayForward an OpenAI Responses request with Docker and curl.
  2. 2Connect applicationsUnderstand the API boundary before choosing a backend.
  3. 3Configure the gatewayChoose routing, state, tools and request controls.
  4. 4Operate your deploymentPlan credentials, storage, telemetry and resource limits.

Building custom behavior? Extend the gateway in Rust · Need only a reverse proxy? Run the standalone proxy

Build in the open

Get help in the relevant project, report an issue, or propose an ecosystem change.