Prerequisites
- Node.js - v22 or higher
- Text editor - we recommend VS Code
- Terminal - access Modus through a command-line interface (CLI)
Building your first Modus app
1
Install the Modus CLI
Install the Modus CLI to manage your Modus applications.
2
Create a new app
Create your first Modus app.Choose between Go and AssemblyScript. Both compile to WebAssembly for fast performance.
3
Run your app locally
Start your local development server:This starts your app and provides a URL to access the API.
4
Add external connections
To connect to external services, add this to your
modus.json:modus.json
5
Add an AI model
Add an AI model to your manifest:
6
Set up model access
Install and authenticate with the Hyp CLI to access Hypermode-hosted models:Authenticate with your Hypermode account:This connects your local development environment to Hypermode’s model infrastructure.
7
Create your first function
Create a function that fetches data from an external API and uses AI for analysis:
Go
Create
intelligence.go:intelligence.go
8
Test your function
Restart your development server:Modus automatically generates a GraphQL API from your functions.
Since your function is named You’ll receive a response like:Your function now:
GatherIntelligence(), it becomes a GraphQL query field called gatherIntelligence.Open the Modus API Explorer at http://localhost:8686/explorer to test your function.
The explorer is fully GraphQL-compatible, so you can issue this query:- Fetches data from external APIs
- Uses AI models for analysis
- Provides intelligent responses
- Handles errors gracefully
9
Monitor AI calls
When running locally, Modus records every AI model call for monitoring and debugging.
You can see this in the Modus explorer.You can monitor:
Local inference tracking is supported on Linux and macOS. Windows
support is incoming.
- Requests sent to AI models
- Response times and token usage
- Model performance metrics
- Error rates and debugging info