Unified AI gateway for self-hosted infrastructure. Presents a single OpenAI-compatible API that routes to local inference or remote models based on model name, with conversation history, a database-driven bot framework, MCP tool integration, and a Ratatui TUI client.
- Rust 80.2%
- TypeScript 7.7%
- Svelte 6.8%
- Shell 3.6%
- Python 1%
- Other 0.7%
Session 16 work brought to public: - Bucket A bug fixes: mid-stream cancel for single-turn agent runs, emitted_at on /v1/agent/runs replay, RunEmitter cancel flag wired to AgentRunManager. - Bucket B-1 tool result cache (Valkey-backed, decorator over ToolDispatcher, per-server + per-tool TTL policy, degrades on Valkey outage). Spec at docs/specs/2026-04-24-tool-result-cache-design.md; plan at docs/plans/2026-04-24-tool-result-cache.md. - TODO.md: tool cache + VRAM arbiter reclaim follow-ups. - A/B harness fix: read .emitted_at instead of .payload.timestamp. |
||
|---|---|---|
| .idea | ||
| docs | ||
| frontend | ||
| mcp-common | ||
| mcp-consul | ||
| mcp-local | ||
| mcp-loki | ||
| mcp-media | ||
| mcp-nomad | ||
| mcp-prometheus | ||
| mcp-web-search | ||
| oracle | ||
| oracle-tui | ||
| tests | ||
| .gitignore | ||
| BOT-FRAMEWORK.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| deploy-config.sh | ||
| deploy.sh | ||
| oracle.toml | ||
| README.md | ||
| TODO.md | ||
Oracle
AI gateway for the Arvandor platform. Unified OpenAI-compatible API routing to local inference (Ollama on RTX 4090) and remote models (Claude API).
Quick Start
# Build
cargo build --release -p oracle
# Run locally (needs DATABASE_URL and OATHKEEPER_SECRET)
cp .env.example .env # edit with your values
cargo run -p oracle
Architecture
Oracle is a lightweight Rust/Axum proxy that:
- Presents an OpenAI-compatible API (
/v1/chat/completions,/v1/models) - Routes requests to Ollama or Claude based on model name
- Authenticates via Ory Oathkeeper (browser) or API keys (CLI/agents)
- Persists conversation history in PostgreSQL
- Orchestrates tool-calling via MCP servers (Phase 3)
See CLAUDE.md for full documentation.