# Moadim

> Moadim is an open-source loop engine that schedules AI agent routines (Claude, Codex, Hermes, Pi) on a cron schedule via a local daemon with UI, REST, and MCP interfaces.

Moadim is an open-source, MIT-licensed loop engine for AI agents, built in Rust and distributed as a self-hosted local daemon. It lets developers define "routines" — a prompt, a schedule, and an agent — and fires them automatically against a repository on every cron tick, without manual prompting. The project is maintained by the moadim-io organization on GitHub and is free to use, modify, and self-host with no account required.

## What It Is

Moadim introduces the concept of "loop engineering": instead of manually prompting AI coding agents, you design a loop that prompts them on a schedule. Each routine pairs a cron expression, a prompt, and a named agent (Claude, Codex, Hermes, NanoClaw, or Pi). The daemon fires the agent inside a fresh, isolated workbench on every tick, kills hung runs via a watchdog, and reaps the session when it finishes. The result is a persistent, automated agent workflow that runs while you sleep — no cloud queue, no sign-up, no hidden infrastructure.

## Architecture and Interfaces

The daemon runs on `http://localhost:5784` and exposes three interfaces simultaneously over a single port:

- **Web UI** — a browser dashboard for managing routines, viewing logs, and controlling the daemon
- **REST API** — a fully documented HTTP API with Swagger UI at `/docs` and an auto-generated OpenAPI spec
- **MCP endpoint** — a Model Context Protocol interface at `/mcp`, compatible with Claude Code and any MCP client

Routines are stored as TOML files under `~/.config/moadim/routines/`, making them git-trackable and diff-friendly. The in-process scheduler (backed by `tokio-cron-scheduler`) handles all firing without relying on the host's cron daemon.

## Supported Agents and Isolation

Built-in agents include `claude`, `codex`, `hermes`, `nanoclaw`, and `pi`. Each agent is configured via a TOML file at `~/.config/moadim/agents/<name>.toml`. The daemon seeds default configs on first run but never overwrites user edits. Every routine run executes in a throwaway workbench directory under `~/.moadim/workbenches/`, reaped on a periodic five-minute sweep. A watchdog enforces per-routine `max_runtime_secs` limits, and an overlap policy (configurable per routine) prevents concurrent fires of the same routine from interfering with each other.

## Deployment and Platform Support

Moadim runs on macOS and Linux. It requires `tmux` on the PATH (used to launch each agent session) and optionally `python3` for the built-in Claude agent's unattended trust pre-seeding. Installation options include:

- `cargo install --locked moadim` (from source via Cargo)
- `cargo binstall moadim` (prebuilt binary, no Rust toolchain compile)
- `npm install -g moadim` (thin npm wrapper over per-platform prebuilt binaries)
- Homebrew tap from the repository

Running `moadim install` registers a `launchd` (macOS) or `systemd` (Linux) user service so the daemon survives reboots. The daemon binds to loopback by default and enforces security guards against non-loopback exposure unless an API token is set.

## Update: v3.2.8

The latest release is **v3.2.8**, published on 2026-09-03, with the repository last updated on 2026-09-10. The project was created in June 2026 and has accumulated 51 GitHub stars and 35 open issues, indicating active early development. The changelog follows the Keep a Changelog format and is tracked in `CHANGELOG.md` in the repository.

## Features
- Cron-scheduled AI agent routines (loop engineering)
- Built-in agents: Claude, Codex, Hermes, NanoClaw, Pi
- Isolated per-run workbench with watchdog and auto-reap
- Web UI, REST API, and MCP endpoint on a single port
- Swagger UI and auto-generated OpenAPI spec
- Git-trackable TOML routine configuration
- In-process scheduler — no host cron daemon required
- launchd/systemd service registration via moadim install
- Per-routine overlap policy and concurrency cap
- Scoped environment variables per routine (tracked and gitignored)
- Global user prompt injected into every routine
- Failure notification hooks (command and webhook)
- iCalendar feed of upcoming routine fire times
- JSON log format for log aggregator integration
- API token authentication for remote deployments
- Machine identity filtering for multi-host config repos
- On-demand workbench cleanup with disk ceiling support
- Shell completions for bash, zsh, fish, powershell, elvish

## Integrations
Claude (Anthropic), Codex (OpenAI), Hermes, NanoClaw, Pi, Model Context Protocol (MCP), tmux, launchd (macOS), systemd (Linux), Homebrew, npm, cargo binstall, Loki, ELK, Vector, CloudWatch

## Platforms
MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source

## Version
v3.2.8

## Links
- Website: https://moadim.io
- Documentation: https://github.com/moadim-io/daemon#readme
- Repository: https://github.com/moadim-io/daemon
- EveryDev.ai: https://www.everydev.ai/tools/moadim
