Skip to content
moadim.

Open source · Loop engine

Put your
agents on a loop.

Moadim is a loop engine for AI agents. Define a loop — a prompt, a schedule, an agent — and it runs Claude, Codex, Hermes, or Pi against your repo on every tick, or queues a NanoClaw task, in an isolated workbench with a watchdog on every run. Loop engineering, not prompting by hand.

Installcargo install --locked moadimmoadim

Starts the server in the background at http://localhost:5784/. Requires a Unix-like OS with tmux — Moadim's portable in-process scheduler dispatches loops, then launches each agent inside a tmux session. No host cron daemon is required.

Prefer a prebuilt install? Use cargo binstall moadim or npm install -g moadim.

Star on GitHub(opens in a new tab)crates.io(opens in a new tab)

The loop

Animated diagram: an agent reads goals from a goals repository and travels to a routines repository where it creates, edits, and removes routines — each routine itself a small, always-running loop with its own pace. The routines act on external repositories and tasks, and the resulting progress flows back into the goals.

Quickstart

REST — list loops
curl http://localhost:5784/api/v1/routines

Every loop is also a documented HTTP endpoint, with an OpenAPI schema and Swagger UI baked into the daemon.

MCP — list loops
{ "name": "list_routines", "arguments": {} }

The same call as an MCP tool, for any MCP-compatible agent connected to /mcp.

Features

  • A loop runs an agent

    A loop pairs a prompt, a schedule, and an agent — Claude, Codex, Hermes, NanoClaw, or Pi. Each tick launches it in a fresh, isolated workbench, kills hung runs, and reaps the session when it's done.

  • Runs locally, survives reboot

    Loops fire from Moadim's portable in-process scheduler — no hidden queue, no cloud. Run moadim install to register a launchd / systemd service so the daemon keeps running across logins and reboots.

  • UI · REST · MCP

    Every loop is an MCP tool and a documented HTTP endpoint — Swagger UI, an iCal feed, and a web UI baked into the daemon.

On loop engineering

FAQ

Is Moadim free? What's the license?
Yes — Moadim is open source under the MIT license, free to use, modify, and self-host. There's no paid tier and no account to create.
Is it self-hosted or a cloud service?
It runs entirely on your own machine. Loops fire from Moadim's portable in-process scheduler — no hidden queue, no cloud, no sign-up. Run moadim install to register a launchd (macOS) or systemd (Linux) service so the daemon survives logins and reboots.
Which agents does it support?
Built-in agents include Claude, Codex, Hermes, NanoClaw, and Pi. Each loop names the agent it runs; NanoClaw queues a one-shot task in its configured agent group, while the others run in Moadim's isolated workbench. The built-in Claude agent additionally needs python3 on your PATH to pre-seed unattended trust and MCP-approval state.
Which operating systems are supported?
macOS and Linux. Moadim schedules loops inside its daemon and runs agents inside tmux; running moadim install registers a launchd (macOS) or systemd (Linux) service that keeps the daemon alive across reboots. tmux needs to be on your PATH, but no host cron daemon is required.
How is each run isolated?
Every tick launches the agent in a fresh, isolated workbench. A watchdog kills hung runs, and the session is reaped once it finishes — so one run can't leak state into the next.