Get Started · Docs · Discord
Modus is an open-source, serverless framework for building agentic systems and AI apps in Go and AssemblyScript
It simplifies the integration of models, context, and data. We're continuing to add additional capabilities to better support the construction and calling of tools.
You write a function.
export function sayHello(name: string): string {
return `Hello, ${name}!`;
}
Then, Modus:
- extracts the metadata of your functions
- compiles your code with optimizations based on the host environment
- caches the compiled module in memory for fast retrieval
- prepares an invocation plan for each function
- extracts connections, models, and other configuration details from the app’s manifest
- generates an API schema and activates the endpoint
You query the endpoint
query SayHello {
sayHello(name: "World")
}
In a few milliseconds, Modus:
- loads your compiled code into a sandboxed execution environment with a dedicated memory space
- runs your code, aided by host functions that power the Modus APIs
- securely queries data and AI models as needed, without exposing credentials to your code
- responds via the API result and releases the execution environment
Now you have a production ready scalable endpoint for your AI-enabled app. AI-ready when you’re ready. Launch and iterate.
Install the Modus CLI
npm install -g @hypermode/modus-cli
Initialize your Modus app
modus new
Run your app locally with fast refresh
modus dev
We believe that agentic flows are still fundamentally apps. As such, we've designed Modus primarily as a general-purpose framework, that just happens to treat models, agents, and tools as first-class components.
Modus is optimized for apps that require sub-second response times. We’ve made trade-offs to prioritize speed and simplicity.
Since Modus is based on WebAssembly, you can write Modus apps in various programming languages. Each language offers the full capabilities of the Modus framework.
Currently, the supported languages you may choose from are:
- Go - A general-purpose programming language originally designed by Google.
- AssemblyScript - A TypeScript-like language designed for WebAssembly.
Additional programming languages will be supported in the future.
Modus is a free, open-source framework, you’re welcome to run your Modus apps on your own hardware or on any hosting platform that meets your needs.
However, over at Hypermode we have built additional tooling and infrastructure to make constructing and deploying your agents and AI apps easy. Hypermode includes models, observability, debugging, and function hosting. Just push your code to Github and Hypermode will automatically build and deploy it on global infrastructure.
Modus is developed by Hypermode as an open-source project, integral but independent from Hypermode.
We welcome external contributions. See the CONTRIBUTING.md file if you would like to get involved.
It's taken a lot of hard work to bring Modus to life, but we couldn't have done it alone. Modus is built upon many open source components and projects. We'd especially like to express our gratitude to the authors and teams of our core dependencies:
- Takeshi Yoneda, author of Wazero, and other contributors to the Wazero project - and to Tetrate for continuing its support of Wazero. Modus uses Wazero to execute WebAssembly modules.
- Jens Neuse, Stefan Avram, and the rest of the team at Wundergraph. Modus uses Wundergraph's GraphQL Go Tools library to process incoming GraphQL API requests.
- Max Graey, Daniel Wirtz, and other contributors to the AssemblyScript project. Modus chose AssemblyScript as one of its core languages because it is ideal for web developers getting started with Web Assembly.
- The Go language team, and also the maintainers of TinyGo. The Modus Runtime is written in Go, and the Modus Go SDK uses TinyGo.
Modus and its components are Copyright 2024 Hypermode Inc., and licensed under the terms of the Apache License, Version 2.0. See the LICENSE file for a complete copy of the license.
If you have any questions about Modus licensing, or need an alternate license or other arrangement, please contact us at [email protected].