Define AI agents as markdown files. Schedule them, trigger them on events, or run them as persistent sessions. Memory, cost tracking, and MCP tools built in.
197 runs · $10.18 total cost · Zero manual interventions
The Problem
There are three gaps between "powerful CLI tool" and "autonomous agent."
No built-in way to run at 6 AM or when a new email arrives. You need something to manage when agents run, how long they run, and what to do when they fail.
Each session starts from zero. Your email triage agent doesn't remember what it archived yesterday. Agents that run repeatedly need persistent context.
No guardrails when agents run autonomously. How much did this run cost? How do you prevent a runaway agent from burning through your API budget?
cx fills all three gaps with one primitive: agents as markdown files.
The Result
Processed: 45 emails
Archived & marked read: 45
Flagged as TODO: 1
URGENT — Domain Expiration:
Security Alerts:
Amazon:
Every morning at 6 AM, this runs automatically. By the time you pick up your phone, your inbox is clean.
Features
Six core capabilities, one CLI. No external dependencies.
Cron schedules with timezone support. Daily reports, weekly digests, recurring tasks — on your terms.
Cheap check scripts poll frequently. Claude runs only when triggered. Email monitoring, price alerts, page changes.
Long-running sessions with heartbeats and checkpoints. Restart policies. Build state over time.
Markdown-based memory survives between runs. Auto-compaction keeps context focused. Persistent notes for long-term facts.
Every run logged in USD. Per-run limits, daily and monthly budgets. Alerts before limits hit.
Give agents tools via Model Context Protocol. Gmail, calendars, databases — your code, your machine, your credentials.
The Primitive
One file defines everything: schedule, tools, memory, cost limits, and plain-English instructions.
Cron Schedule
Runs daily at 6 AM with timezone support. The daemon checks every 30 seconds.
MCP Tools
Seven Gmail tools via Model Context Protocol. Your server, your code, your credentials.
Cost Tracking
197 runs at $10.18 total — automatically logged. Per-run and daily limits available.
Plain English
The markdown body is the agent's instructions. No DSL, no config language — just prose.
Architecture
From markdown file to autonomous execution in five steps.
Write an agent as markdown with YAML config
Background loop checks schedules and watchers every 30s
Instructions + memory + secrets assembled into prompt
Spawns claude -p with MCP tools, runs the task
Run log, memory update, cost tracked, notification sent
Use Cases
Real-world agent patterns — each defined in a single markdown file.
Auto-label bugs, feature requests, and duplicates. Post helpful replies from codebase context.
Monitor "auto-fix" issues, write code, open PRs with cost limits per run.
Daily standup from Linear/Jira. Flag stale issues, update statuses automatically.
Comparison
Not confrontational — just different architectures for different goals.
| OpenClaw | cx | |
|---|---|---|
| Scope | General-purpose assistant | Agent management for Claude Code |
| State | Database sessions | Markdown files — git-diffable |
| Tools | Community marketplace | MCP servers you write and audit |
| Cost | No tracking | Per-run limits, daily/monthly budgets |
| Model | Multi-model | Claude-native (wraps CLI directly) |
Not a Swiss Army knife vs. scalpel — more like a Swiss Army knife vs. a CNC machine.
Get Started
From zero to your first autonomous agent.
Reference
18 commands, grouped by what they do.
| Setup | |
| cx init | Initialize cx in current directory |
| cx install-deps | Install watcher dependencies |
| Agent Management | |
| cx create <name> | Create a new agent |
| cx edit <name> | Open agent file in $EDITOR |
| cx list | List all agents |
| cx status | Quick status overview |
| cx delete <name> | Delete an agent (moves to .trash/) |
| Execution | |
| cx start <name> | Manually trigger an agent |
| cx stop <name> | Stop a running agent |
| cx pause <name> | Pause an agent |
| cx resume <name> | Resume a paused agent |
| cx daemon | Manage background daemon |
| cx test-watcher <name> | Test a watcher script |
| Data & Debugging | |
| cx logs <name> | View run logs |
| cx memory <name> | View agent memory |
| cx compact <name> | Trigger memory compaction |
| cx costs | View cost breakdown |
| cx secrets | Manage secret groups |