Agent Infrastructure
Building a Multi-Tenant Agent Harness with VMA
How tasks and updates move
Votrix Managed Agents (VMA) is a multi-tenant agent harness. The API saves accepted input before handing the task to Cloud Tasks. An async worker runs the agent and its sandbox tools. The request returns once accepted, so your app can start watching results.
SSE reads saved events independently of the worker. Temporary text previews arrive through PostgreSQL notifications; saved events carry the history that a reconnect can replay.
OpenRouter integration
The runtime sends model calls through OpenRouter. Agents choose from VMA’s model catalog, so different model providers share the same agent execution path.
Each Account owns a dedicated OpenRouter inference key, stored encrypted. A Session keeps its assigned Account, and each turn uses that Account’s key. The platform’s management credential provisions and manages those keys; it is not used for inference.
Every model request carries the VMA Session ID as OpenRouter’s session_id. This groups calls from the same conversation in OpenRouter and connects provider usage to the Session that produced it. The runtime also handles model-specific routing, prompt-cache settings, and retries for transient failures.
Let the page reconnect
VMA sends progress over SSE (Server-Sent Events). Each saved Session event has a sequence number, so the frontend can resume reading from its last event after a disconnect.
Track whose work costs money
Usage comes from OpenRouter’s reported USD snapshots. VMA exposes Account totals and cumulative spending for a Session, so you can attribute model costs to the work that produced them.
VMA’s Accounts group usage and spending. You can use that information in your own plans and billing logic. An Account tracks costs; it does not give a user permission to access data. Your application still owns pricing and final bills.
The VMA API docs have the full resource model and examples.