MALV Documentation
MALV is a better way to build AI products.
It's an architectural approach where you describe your system declaratively instead of writing complex orchestration code. You define what your AI can do, and the architecture handles discovery, permissions, and coordination.
The Problem
Building AI products today is messy. You end up tangled in prompt engineering, state management, function routing, and authentication logic. Most of your code becomes glue between the AI and your actual features.
The MALV Approach
What if you just described what your system can do?
A MALV-based system is built around four simple concepts:
| Concept | What It Does |
|---|---|
| Tools | Functions the AI can call to take actions |
| Tokens | User permissions and session state |
| Storage | Where your data lives |
| Objects | Visual components the AI can create |
You define these in JSON files. Your apps become isolated microservices that expose tools. An orchestrator discovers what's available and coordinates everything automatically.
A Quick Example
Say you're building a notes feature. You'd define a tool like this:
{
"name": "create_note",
"description": "Creates a new note for the user",
"input_schema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"content": { "type": "string" }
}
}
}
That's it. The AI now knows it can create notes. When a user says "make a note about my meeting tomorrow", the orchestrator calls your tool with the right parameters.
No prompt engineering. No complex routing logic. Just declare what's possible.
How It Works
When a user sends a message:
- The orchestrator looks at available tools and the user's permissions
- It plans which tools to call and in what order
- Tools execute and return results
- The user gets a response
Each app runs as an isolated microservice. The orchestrator coordinates between them, handling tool discovery, permission checking, and response generation.
[IMAGE: A simple flow diagram showing User -> Orchestrator -> Tools -> Response]
Get Started
The fastest way to start building:
npm i -g @malv/cli
malv create
malv dev
This gives you a working project with everything wired up. From there, you can add your own tools and start building.
Documentation
Getting Started
New to this? Start here:
- Installation - Set up your development environment
- Create Your First App - Build something in 10 minutes
- How It Works - Understand the architecture
Core Concepts
The building blocks of every MALV-based system:
- Tools - Define what AI can do
- Tokens - Manage permissions and state
- Storage - Persist and retrieve data
- Objects - Create visual components
- Events - React to external triggers
CLI Reference
Commands you'll use daily:
Development:
- malv dev - Run your project locally
- malv create - Scaffold new projects
- malv build - Build apps for publishing
- malv generate - Generate types from schemas
- malv validate - Type-check all apps
- malv logs - View logs from running apps
Configuration:
- malv env - Configure environment variables
- malv ai - Set up AI API key
- malv overview - Inspect your apps
Registry:
- malv publish - Publish apps to registry
- malv install - Install apps from registry
- malv uninstall - Remove installed apps
- malv upgrade - Upgrade to latest versions
- malv update - Update the CLI itself
Authentication:
- malv login - Authenticate with registry
- malv org - Manage organizations
Reference
- Configuration - malv.json schema
- Project Structure - Directory layout
Learn by Doing
Want a hands-on introduction? Try the interactive tutorial where you build a Notes app step by step, right in your browser.