Browse by type

MAIAR is designed around the thesis that AI agents, in their current iteration, primarily consist of three major steps:
Instead of rigid workflows or monolithic agent logic, Maiar abstracts these steps into a modular, plugin-based system. Developers define triggers and actions as standalone plugins, while the core runtime dynamically handles decision-making. This enables a highly extensible, composable, and model driven framework where new functionality can be added seamlessly.
Welcome to MAIAR. This guide will help you set up and run your own AI agent using the MAIAR framework.
Before you begin, make sure you have the following installed:
Node.js (v22.13.x) - We recommend using nvm to manage Node.js versions:
nvm install 22.13.1
nvm use 22.13.1
A package manager (npm, yarn, or pnpm)
pnpm create maiar
[!NOTE]
The CLI defaults to the OpenAI model provider. To use it, you'll need to:
- Create an OpenAI account at platform.openai.com
- Generate an API key in your account settings.
- Add funds to your account to use the API
- Add your API key when the CLI prompts you for it
pnpm build
pnpm start
curl -X POST http://localhost:3000/chat -H "Content-Type: application/json" -d '{"user": "Bob", "message": "Hello, how are you?"}'
You should recieve a response from the agent.
The basic configuration above includes:
You can customize the configuration by:
You can extend your agent's capabilities by installing additional plugins:
pnpm add @maiar-ai/plugin-discord
Then add them to your runtime configuration:
import { PluginDiscord } from "@maiar-ai/plugin-discord";
// ... other imports
const agent = await Runtime.init({
// ... other config
plugins: [
new PluginDiscord({
/* Configuration options go here */
})
// ... other plugins
]
});
[!IMPORTANT]
Please make sure to checkout the contributing guide first and foremost
Make sure you have the following installed:
Node.js (v22.13.1) - We recommend using nvm to manage Node.js versions:
nvm install 22.13.1
nvm use 22.13.1
The pnpm package manager explicitly - Required for managing the monorepo workspace and its dependencies efficiently
Install the project dependencies:
# From the root of the repository
pnpm install
Terminal 1 - Core Packages:
# From the root of the repository
pnpm dev
This command watches for changes in the core packages (packages/**/*.ts) and automatically rebuilds them. It:
.build-complete marker file with current timestamp to indicate the core packages build is finished as a state file to communicate with the development projectTerminal 2 - Development Project:
# From the root of the repository
cd apps/starter # or your own development project
pnpm dev
This command runs the starter project in development mode. It:
.build-complete marker fileThis setup ensures that changes to either the core packages or the starter project are automatically rebuilt and reflected in your running application, providing a seamless development experience.
[!NOTE]
The
apps/starterproject serves as a reference implementation demonstrating how to develop against the core MAIAR packages. You can apply this same development setup to any project that depends on MAIAR packages - simply mirror the dev script configuration and.build-completemarker file handling shown in the starter project's package.json. The key focus of this repository is the core packages inpackages/*, withapps/starterserving as an example consumer.
At its core, MAIAR builds execution pipelines dynamically. When an event or request is received, the runtime:
Rather than hardcoding client logic, MAIAR produces emergent behavior by selecting the most relevant plugins and actions based on context. This enables adaptability and ensures that agents can evolve without rewriting core logic.
MAIAR's architecture is influenced by Unix pipes, where structured input flows through a sequence of operations, using a standard in and out data interface. Each plugin acts as an independent unit:
This structured context chain ensures:
This design enables MAIAR to remain declarative and extensible, allowing developers to build complex AI workflows without locking themselves into rigid architectures.
MAIAR is intentionally unopinionated about external dependencies, ensuring developers have full control over their infrastructure. The framework avoids enforcing specific technologies, making it easy to integrate with:
By maintaining a flexible core, MAIAR ensures that AI agents can adapt to different environments and use cases without unnecessary constraints.
MAIAR isn't just another AI agent framework—it's a declarative, extensible, and composable way to build intelligent applications. Whether you're adding new capabilities or integrating with existing platforms, MAIAR makes it simple.
$ claude mcp add maiar-ai \
-- python -m otcore.mcp_server <graph>