Research / Infrastructure
Anorion: The Open-Source Agent Gateway That Treats Agents as First-Class Citizens
2026-03-15
Anorion: The Open-Source Agent Gateway That Treats Agents as First-Class Citizens How we built an API-first orchestration layer where every button is an API call, agents are first-class consumers, and the control plane is infrastructure — not a dashboard --- Every AI agent framework in production today has the same fundamental flaw: the control plane was designed for humans. LangChain gives you chains but no runtime. AutoGen gives you multi-agent chat but no deployment story. CrewAI gives you roles but scales like a science project. OpenClaw gives you a mature single-process gateway but zero horizontal scaling. Hermes gives you a brilliant Python agent loop but locks you into a synchronous world where agents are second-class API citizens. At Venym Labs, we ran headfirst into this wall. Our trading agents need to spawn sub-agents, our research agents need to query each other's sessions, and our operations team needs to monitor everything without SSH-ing into a server. No existing framework gave us all three. So we built Anorion. Anorion is an open-source, JavaScript-native agent gateway with an API-first control plane. It runs on Bun, speaks Hono, streams via WebSocket, and federates across multiple gateways for horizontal scaling. The web UI is just one client — agents consume the exact same API endpoints, with the exact same authentication, in parallel, at machine speed. This is the architecture we needed. It didn't exist. So we built it. The Landscape: Why Everything Falls Short Before diving into architecture, here's the honest assessment of what exists: | Framework | Language | Control Plane | Agent-as-Consumer | Horizontal Scale | Real-Time Streaming | |-----------|----------|--------------|-------------------|-----------------|-------------------| | OpenClaw | TypeScript | WebSocket (human) | ❌ No | ❌ Single process | ✅ WS protocol | | Hermes | Python | CLI + ACP | ⚠️ Limited | ❌ Single process | ⚠️ Tool callbacks | | LangChain | Python | None | ❌ No | ❌ No runtime | ❌ No | | AutoGen | Python | None | ❌ No | ❌ No | ❌ No | | CrewAI | Python | None | ❌ No | ❌ No | ❌ No | | Anorion | TypeScript | REST + WS API | ✅ First-class | ✅ Federation | ✅ Throughout | OpenClaw came closest — it's mature, supports 15+ channels, and has a rich plugin system. But it's a monolithic single process with no horizontal scaling path. If the gateway crashes, every agent, every channel, every cron job dies. Hermes has a brilliant agent runtime with parallel tool execution and shared iteration budgets, but it's Python-only, synchronous at its core, and its "API" is a CLI wrapper. What we needed didn't exist: a JS-native gateway where agents are API consumers, not just API servers. Architecture: Lazy Agents on a Fast Runtime The core architectural decision in Anorion is lazy instantiation. Agents are configs on disk. They don't consume memory, CPU, or tokens until a message actually arrives. This means you can define 500 agents in YAML — only the ones actively processing messages exist in memory. The Tech Stack | Layer | Choice | Why | |-------|--------|-----| | Runtime | Bun | 3-5x faster startup, built-in SQLite/TypeScript/fetch | | HTTP | Hono | Ultra-fast, works on Bun/Node/Deno, built-in WebSocket | | LLM | Vercel AI SDK | Unified interface for all providers with streaming + tool calling | | Database | Drizzle ORM + SQLite | Type-safe, zero-dependency single-instance, swap to Postgres later | | Queue | BullMQ + Redis | Async task processing with retries and dead-letter queues | | Logging | pino | Fastest structured logger for Node/Bun | Why Bun Was the Right Call We evaluated Node 22 and Deno seriously. Bun won for three reasons: 1. Cold start speed — Spawning a sub-agent means creating a new agent instance. On Bun, that's 50ms. On Node with ts-node, it's 500ms+. When agents spawn children in parallel, this compounds. 2. Built-in SQLite — bun:sqlite gives us a zero-dependency database for single-instance deployments. No Postgres setup, no Docker Compose, no connection pooling. Just write files. 3. Native TypeScript — No compilation step, no tsconfig gymnastics, no build pipeline for the gateway itself. The agent runtime, tools, and gateway all run TypeScript directly. Agent Configuration Every agent is a YAML file. Here's a real example from our codebase: Notice what's missing: no server configuration, no database URLs, no deployment manifests. The agent config is just the agent. Infrastructure concerns live in anorion.yaml separately. Per-Agent Tool Binding: Security Through Isolation This is one of the most important design decisions in Anorion. Tools are registered globally in a central registry, but each agent only sees the tools explicitly bound to it. The trading agent sees hyperliquid and coingecko. The research agent sees web-search and web-fetch. Neither can see the other's tools. This is more than access control — it's context window optimization. If an agent has 30 registered tools, the model's function-calling