Modus
Welcome to the Modus docs!
What is Modus?
Modus is an open source agent framework (including both a runtime and SDK) built on WebAssembly. It is designed for rapid iteration and production-ready performance for agents and AI APIs. With Modus, you have all the components you need to go from zero to a fully functioning agent.
Key features
Modus is built from the ground up for agent development.
Feature | Description |
---|---|
WebAssembly powered runtime | A small, portable, and highly efficient execution engine for deploying agents anywhere |
Flexible tool support | Consume Model Context Protocol (MCP) servers or build your own custom tools to power your agents |
Triggered agent actions | Define and trigger specific actions for your agents to perform |
Built-in agent memory | Support for both short-term and long-term agent memory, powered by knowledge graphs |
Agent operations | Built-in inference logging and traces for agent-level observability |
Serverless scale-to-zero | Each agent spins up on demand and scales to zero in idle state |
Fully open source | No vendor lock-in, but designed for low cold-start times and rapid scaling |
Modus is a multi-language framework. It currently includes support for Go and AssemblyScript, a WebAssembly compatible TypeScript-like language. Additional language support is in development.
When to use Modus
Rapid prototyping to scaling with confidence
Start with one-line agent definitions using AgentKit - no infrastructure setup, no complex wiring. You get streaming UI, context management, and logging out of the box. Once your agent logic is solid, deploy via the same framework. Because agents are WebAssembly based and serverless, they incur zero cost when idle and start fast under load.
Language-agnostic logic, safely
With WebAssembly’s secure isolation environment, define agent behavior in Go or AssemblyScript. Compile to WebAssembly and Modus runs it securely. Each agent runs as a lightweight actor: self-contained, message-driven, and supervised by the runtime.
Persistent context beyond sessions
For use-cases like multi-day workflows, personal assistants, tutoring, or domain-specific agents (for example ticketing systems), long-term context is crucial. Modus provides it without requiring a dedicated database layer. Modus’ built-in short-term memory handles conversational state and context within agents. Connect to long-term graph memory for externalized and persisted, but serverless-friendly memory. You gain full “recall” - across sessions and workflows- without maintaining stateful servers.
Observability at the functional level
When you need clarity on why the agent did something, no just what the model saw, Modus gives you full introspection. Agent-level tracing gives you a complete timeline of agent behavior. Inference logging allows you to visualize latency and data flow, audit decisions, or replay session history for debugging.
Serverless efficiency, no vendor lock-in
Agents activate only when needed. No uptime cost when idle. Use Modus anywhere - in the cloud or on-prem - without vendor lock-in or proprietary constraints. Optimize costs without sacrificing flexibility or control over infrastructure.
For more inspiration, check out the Modus recipes.