{"slug": "lessons-from-a-2734-tick-earning-loop-on-openclaw", "title": "Lessons from a 2,734-tick earning loop on OpenClaw", "summary": "A developer ran an AI agent on a Mac mini for two months, executing 2,734 ticks to test whether an autonomous agent could earn money. The loop, built on OpenClaw, used a state file and cron job to perform one action per tick, with a daily spend cap of $0.50. The developer published the loop as a skill on A2A Market, highlighting the architecture's focus on budgets, self-parking, and idempotency.", "body_md": "I let an AI agent run on my Mac mini for two months. It woke up every five minutes, picked one action, did it, wrote the result to a state file, and went back to sleep. After **2,734 ticks**, I am publishing the loop itself as a skill.\n\nThis is the architecture, the bugs, and the math.\n\nI wanted to answer a specific question: *can an AI agent running on a personal Mac actually make money?* Not as a thought experiment — for real, in a wallet I own, on chains I can read.\n\nThe setup: OpenClaw (a local-first agent runtime) + a cron job firing every 5 minutes + a state file the agent reads before deciding what to do. No infinite loops, no multi-step chains, no \"let me figure it out\" spirals. **One action per tick. State on disk. Move on.**\n\nThree lanes the loop could choose from:\n\nEach tick the loop looked at its state, picked the lane with the most recent activity gap, did one thing, wrote the result.\n\nThe key insight: **agents need budgets, not ambitions.**\n\n```\n{\n  \"daily_spend_cap_usd\": 0.50,\n  \"tick_cost_avg_usd\": 0.02,\n  \"lanes\": {\n    \"scribe\": { \"auth\": true, \"last_action_at\": \"...\", \"rate_limit_remaining\": 8 },\n    \"scout\": { \"auth\": true, \"last_action_at\": \"...\", \"rate_limit_remaining\": null },\n    \"signals\": { \"auth\": false, \"last_action_at\": null }\n  }\n}\n```\n\nHard daily spend cap. Per-tick cost tracking. Self-park semantics — if any lane blocks, the loop sets `active=false`\n\nand stops firing, rather than spinning. **The agent that admits defeat at $0.50/day is more useful than the agent that burns $50 trying to win.**\n\nThe state file (`memory/agent-state.json`\n\n) is the whole interface. The cron payload does not think — it just hands the agent a fresh tick and trusts the state file.\n\n**1. State vs scheduler drift is real.**\n\nSetting `enabled=false`\n\nin the state file does NOT silence the cron. The scheduler and the agent-state are two different layers. I logged 819 no-op ticks before I figured out the fix: `cron.remove`\n\nfrom the gateway own tool, not from inside the loop. **If your agent can self-park, it should be able to actually park.**\n\n**2. Telegram exec approvals will block everything.**\n\nA cron agent calling `gog`\n\nor `gh`\n\nwill hit \"Exec approval is required, but native chat exec approvals are not configured.\" Every external tool needs an allowlist. This is not an agent problem — it is a config problem — but the agent sees it as a wall.\n\n**3. The bot might not be in the channel.**\n\nA separate failure mode: outbound messages from the cron lane 403 because the bot was kicked from the channel it was supposed to post to. Always check membership before scheduling delivery.\n\n**4. Idempotency is not optional.**\n\nEvery tick that touches the outside world must be idempotent. I had to add a \"did this already?\" check before every API call. The cost of a duplicate post or a double-paid bounty is paid by the human, not the agent.\n\nThe Dev.to publishing lane was the workhorse. I published one article — [I built an autonomous earning loop on OpenClaw, here is the blueprint](https://dev.to/hamo_e38ec2422de5ab43c6c6/i-built-an-autonomous-earning-loop-on-openclaw-heres-the-blueprint-460h) — and the loop kept nudging it, tracking comments, drafting follow-ups. Single lane, single auth, single API key, no surprises.\n\n**Real numbers from 2,734 ticks:**\n\nTwo months in, the lesson is clear: **the loop is the product, not the earnings.** The real value is the architecture — the daily spend cap, the self-park semantics, the state-vs-scheduler discipline, the idempotency checks. Most agents shipping today do not have any of these.\n\nSo I packaged the whole thing and listed it on **A2A Market** — an agent-to-agent marketplace where skills trade for USDC on Base. $5, MIT licensed, source on GitHub, ready to drop into any OpenClaw workspace.\n\nIf you are building an agent that needs to earn, run, or just stay alive across a weekend — the loop is the part you do not want to write from scratch.\n\n→ **A2A Market listing:** [skill_5e0db987](https://a2amarket.live/listings/skill_5e0db987) — $5 USDC\n\n→ **Source:** [github.com/hamoisworking/jarvis-loop](https://github.com/hamoisworking/jarvis-loop)\n\n→ **Prior article on the build:** [dev.to/hamoisworking](https://dev.to/hamo_e38ec2422de5ab43c6c6/i-built-an-autonomous-earning-loop-on-openclaw-heres-the-blueprint-460h)\n\n`date`\n\necho. If even that fails, the bot is not ready.The whole thing — schema, scripts, examples, MIT license — is on GitHub. The marketplace version is one `bash scripts/publish.sh`\n\naway for anyone who wants the same setup.\n\nNow I get to find out if anyone buys it.", "url": "https://wpnews.pro/news/lessons-from-a-2734-tick-earning-loop-on-openclaw", "canonical_source": "https://dev.to/hamo_e38ec2422de5ab43c6c6/lessons-from-a-2734-tick-earning-loop-on-openclaw-4g92", "published_at": "2026-08-17 19:00:29+00:00", "updated_at": "2026-08-17 19:14:50.954301+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-products", "ai-tools", "developer-tools"], "entities": ["OpenClaw", "A2A Market", "Mac mini", "Base", "GitHub", "Dev.to"], "alternates": {"html": "https://wpnews.pro/news/lessons-from-a-2734-tick-earning-loop-on-openclaw", "markdown": "https://wpnews.pro/news/lessons-from-a-2734-tick-earning-loop-on-openclaw.md", "text": "https://wpnews.pro/news/lessons-from-a-2734-tick-earning-loop-on-openclaw.txt", "jsonld": "https://wpnews.pro/news/lessons-from-a-2734-tick-earning-loop-on-openclaw.jsonld"}}