Skip to main content
ROUTER is Aria Compute’s OpenAI-compatible inference gateway. One of three parallel decisioners picks the route: semantic (YAML v0.3), a lightweight builtin agent, or afm-d (System One Choice via AFM runtime). The request then forwards to shared providers under hard constraints. This page covers the self-hosted CLI / FFI. HTTP API details: ROUTER introduction.

Install

Fetch the latest release for your platform from the downloads page.

Setup, validate, serve

After setup, the default config is under ~/.ariacompute/router.yml. Pass --config to use an example file from the router repository.
If using afm-d: run aria-engine first to provide System One, then use an afm-d recipe or ariacompute/afm-d-auto
  • Data plane (--bind): POST /v1/chat/completions, GET /v1/models
  • Management plane (--mgmt-bind): health, validate, providers, topology, dashboard
Keep --mgmt-bind off ports used by aria-engine (commonly 8080 / 8010 / 8011).

YAML config

One request uses exactly one entrypoint:
  • ariacompute/semantic-auto
  • ariacompute/agent-auto
  • ariacompute/afm-d-auto
For afm-d, point System One at a running aria-engine with AFM_ENGINE_URL (the engine defaults list the encoder and decoder ports). Templates: aria-router setup --template afm-d. Response headers report the decision, for example:

Quick request

Language bindings

ROUTER ships SDKs for Rust, Python, Go, TypeScript, React Native, Flutter, Swift, and Kotlin, all wrapping one C ABI, plus a CLI and the FFI shared library.

Extended SDK surface

On top of init / connect / setup / complete / models / last_route / close, all eight SDKs also expose (method names use snake_case / camelCase / PascalCase per language):
  • setup_status (setupStatus / SetupStatus): read back the in-memory base_url / token.
  • setup_clear: reset both fields to empty (in-memory only; never writes router.yml).
  • complete_stream (completeStream / CompleteStream): delivers the completion as one full-body callback (not per-SSE-chunk), then returns the parsed result.
  • last_route()["headers"] (lastRoute()["headers"]): the last decision’s whitelisted x-aria-router-* headers (including x-aria-router-redecision); auth and cookie headers are never exposed.
  • destroy (close alias): tear down the handle.
last_route fails loudly: an uninitialized handle or a failed request raises/returns an error instead of {}.
Python

When to use aria-router vs aria-engine

  • Routing gateway (OpenAI chat + policy): aria-router
  • Typed System One decisions only: call aria-engine (or Ollaya) directly