Provider-agnostic inference gateway built on Rust and Tokio. Abstracts 6+ LLM providers behind a single OpenAI-compatible API. Deterministic agent orchestration via StateGraph. Native Model Context Protocol integration.
Canal implements the OpenAI chat completions API. Redirect your existing client library to Canal's endpoint — multi-provider routing, response caching, and execution tracing are handled transparently. No application code changes required.
from openai import OpenAI # Redirect to Canal gateway client = OpenAI( base_url="http://localhost:3000/v1", api_key="your-canal-key" ) response = client.chat.completions.create( model="anthropic/claude-sonnet-4-20250514", messages=[{"role": "user", "content": "Analyze this codebase"}], stream=True ) for chunk in response: print(chunk.choices[0].delta.content, end="")
Unified interface across Anthropic, OpenAI, Google, Alibaba Qwen, OpenRouter, and local Ollama instances. Automatic failover with configurable fallback chains. Cost-aware model selection based on task classification.
Deterministic multi-agent execution via directed acyclic graphs. Three coordination topologies: Swarm (parallel dispatch with handoff), Plan-Execute (decompose-then-execute), Expert (specialist routing with judge aggregation).
Agent capabilities defined as versioned, sandboxed skill units. Independent permission boundaries per skill. Stack and compose across agents. Registry-managed with runtime injection.
Three-layer prompt constraint model: hard constraints (output format, security boundaries), soft constraints (role anchoring, reasoning mode), user preferences (custom instructions). Runtime-editable without redeployment.
The inference layer behind every application on River.