AIFeed

Praxis AI – an AI gateway. Composable by design

Original text(via HN AI)

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.


        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"]
      
  • Listener: accept on port 8080
  • ai_operation: classify the AI request
  • router: match the /v1 prefix
  • headers: set the Host header
  • load_balancer: forward to api.openai.com over TLS
  • Response: streamed back to the calling client

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.

  • OpenAI Responses
  • Chat Completions
  • Anthropic Messages
  • Azure OpenAI
  • Token rate limits
  • Guardrail providers
  • Token usage headers
  • Zero-copy streaming
  • StreamBuffer inspection
  • Written in Rust
  • unsafe_code = "deny"
  • Fails closed
  • OpenAI Responses
  • Chat Completions
  • Anthropic Messages
  • Azure OpenAI
  • Token rate limits
  • Guardrail providers
  • Token usage headers
  • Zero-copy streaming
  • StreamBuffer inspection
  • Written in Rust
  • unsafe_code = "deny"
  • Fails closed
  • Every client speaks its own API; every provider expects another. Codex uses OpenAI Responses, Claude Code uses Anthropic Messages, OpenCode uses Chat Completions, and agents use MCP and A2A. Backends include vLLM, OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Vertex AI, and MCP or A2A services.
  • One gateway in between, composable by design. Praxis sits between clients and backends.
  • Route by what a request contains. A filter chain classifies each request by API format and model, routes it, translates it when needed, applies guardrails, and load-balances it: Claude Code to vLLM, Codex natively to OpenAI, and OpenCode to Bedrock Converse with SigV4 signing.
  • Keep your client’s API. An Anthropic Messages request becomes a Chat Completions request for vLLM (the system prompt moves into the messages list), and the streamed chunks are translated back into Anthropic events.
  • Policy in the path. Clients send no provider key and the gateway signs upstream requests; an external guardrail provider blocks a prompt-injection attempt before inference; a token budget rejects requests over the limit with HTTP 429. Token limits are an opt-in build feature.
  • Built in Rust, composed in YAML. A configuration chains filters such as ai_operation, anthropic_messages_request, ai_guardrails, anthropic_messages_to_chat_completions, router, and load_balancer, and you can add your own Rust filter through the HttpFilter interface.
  • The AI gateway, composable by design. Open source under Apache-2.0, alpha, built in Rust.

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.

  • 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

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.

  • 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

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.

  • 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

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.

  • 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.

  • Agents, tools and stateExperimental Route agent traffic and run bounded tool exchanges.
  • ObservabilityAvailable See latency, tokens and errors on every request path.
  • MeteringAvailable Count what every request consumes, across provider formats.
  • TokenomicsProposed Budgets for inference, and control over how fast they are spent.
  • Rate limits and quotasAvailable Keep usage inside the limits you set before it reaches a model.
  • GuardrailsAvailable Screen content through the guardrail provider you choose.
  • Identity and authorizationAvailable Decide who and which agent may call which model or tool.
  • Model routingAvailable Send each request to the right model and backend.
  • Multi-region routingExperimental Route to eligible providers across Kubernetes clusters and regions.
  • Frontier and cloud providersAvailable Reach hosted and self-hosted models with their native authentication.
  • Model APIsAvailable Keep your clients' API shape; the gateway does the translating.
  • ExtensibilityAvailable Add your own filters in Rust and compile them in.
  • Proxy foundationAvailable A Rust proxy core that streams bytes and fails closed.

models and tools

Explore every building block →

  • 1Run the gatewayForward an OpenAI Responses request with Docker and curl.
  • 2Connect applicationsUnderstand the API boundary before choosing a backend.
  • 3Configure the gatewayChoose routing, state, tools and request controls.
  • 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.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗