DEV Community

Ray
Ray

Posted on

6 Config Files That Turned Claude into a 24/7 Autonomous Agent

Most people use Claude like a fancy search engine. You ask it something, it answers, session ends, memory gone.

That's not how you build a real autonomous agent.

I've been running a 24/7 Claude-based agent system in production for months. The agent manages tasks, publishes content, monitors infrastructure, and executes builds — autonomously, overnight, without my involvement.

The difference between "Claude in chat mode" and "Claude as an agent" is mostly six config files.

Here's what they are and why each one matters.


The Core Problem With LLM Agents

LLMs have no persistent state. Every session starts blank. If your agent finished an important task yesterday, it doesn't know that today — unless you tell it.

Most agent frameworks solve this with databases, embeddings, or vector stores. That works, but it's heavyweight. There's a simpler approach that works surprisingly well for autonomous agents: structured markdown context files.

The agent reads them at startup. No database required.


The Six Files

1. SOUL.md — Personality and Behavior Rules

This is the most underrated file. It defines how the agent behaves, not just what it does.

# SOUL.md
- Blunt and direct. No fluff, no filler. Just answer.
- Always honest. No sugarcoating.
- Never assume. If unsure, ask.
- Verify everything. If you changed it, prove it works.
Enter fullscreen mode Exit fullscreen mode

Without this, Claude defaults to a generic helpful-but-verbose assistant. With SOUL.md, it has a consistent character. It pushes back when something's wrong. It doesn't pad answers with unnecessary caveats.

Why it matters: Character consistency across sessions. Every time the agent wakes up, it knows who it is.


2. USER.md — Who the Agent Is Serving

Simple but essential. Name, timezone, communication preferences, hard rules.

# USER.md
- Name: Ray
- Timezone: US Eastern
- WhatsApp is for Ray only. No exceptions.
- Infrastructure: VPS hosts OpenClaw, Mac Mini handles all app builds.
Enter fullscreen mode Exit fullscreen mode

Why it matters: The agent should serve your workflow, not a generic user. Getting this right means fewer mismatches on judgment calls.


3. AGENTS.md — The Startup Protocol

Every session, the agent runs through this file first. It's the boot sequence.

# AGENTS.md

## Every Session
1. Read SOUL.md
2. Read USER.md
3. Read memory/YYYY-MM-DD.md (today + yesterday)
4. If in MAIN SESSION: also read MEMORY.md
Enter fullscreen mode Exit fullscreen mode

Without a startup protocol, the agent flails. It might start a task without context, duplicate yesterday's work, or miss a critical constraint.

Why it matters: Deterministic startup behavior. The agent knows exactly what to do in its first 30 seconds.


4. MEMORY.md — Long-Term Memory

The curated log of what matters: decisions made, lessons learned, key context.

# MEMORY.md
- We use Gumroad for product distribution (API writes deprecated as of Mar 2026 — use browser)
- TradeSight backtesting had 4 biases: look-ahead, survivorship, instant fill, no commission
- MerchBridge connects InkForge designs to Amazon Merch via API
Enter fullscreen mode Exit fullscreen mode

It's not a chat log. It's a distillation of insights worth keeping across sessions.

Why it matters: Prevents the agent from re-learning the same lessons every run. Expensive mistakes only happen once.


5. HEARTBEAT.md — Periodic Task Behavior

The heartbeat protocol runs every N minutes via cron. This file tells the agent what to check, what to skip, and what warrants an alert.

# HEARTBEAT.md
- Check if Jinx task runner has completed results awaiting action
- If Mac unreachable 3+ consecutive times: WhatsApp alert
- Otherwise: HEARTBEAT_OK (no reply)
Enter fullscreen mode Exit fullscreen mode

Why it matters: Efficient cron behavior. Without this, every heartbeat becomes a full reasoning cycle. With it, the agent does exactly what's needed and shuts up.


6. TOOLS.md — Environment-Specific Setup

This is where you document the physical reality of your setup: SSH aliases, camera names, API token locations, device names, infrastructure quirks.

# TOOLS.md
- Mac Mini: ssh -i ~/.ssh/lucky_to_mac luckyai@100.90.7.148
- External SSD: /Volumes/Crucial X10 — use for all projects + builds
- No Brave API key — use web_fetch, not web_search
- Reddit OAuth: not configured yet (see REDDIT_OAUTH_SETUP.md)
Enter fullscreen mode Exit fullscreen mode

Why it matters: The agent stops guessing and starts operating. Every session begins with full situational awareness.


The Result

With these six files in place, the agent:

  • Wakes up knowing who it is (SOUL.md)
  • Knows who it's serving and the hard constraints (USER.md)
  • Runs the correct startup sequence (AGENTS.md)
  • Has access to months of accumulated context (MEMORY.md)
  • Handles cron efficiently without over-reasoning (HEARTBEAT.md)
  • Operates in your actual environment without guessing (TOOLS.md)

Total overhead: six markdown files. No database. No embeddings. No orchestration framework beyond the LLM itself.


The Productivity Gap

Most developers who try autonomous agents hit the same wall: the agent "forgets" things, behaves inconsistently, and requires constant re-briefing. The config layer above directly solves that wall.

The session count where you stop feeling the friction is around 15-20. After that, the agent has enough context in MEMORY.md and the startup protocol runs fast enough that it feels like talking to someone who actually knows your situation.


Get the Production Templates

If you want to start with a working config layer rather than building from scratch, I've packaged the exact files I use:

👉 CLI Agent Starter Kit v2 — 6 core config templates + NEXT_TASKS.md protocol + wiring guide. Built for OpenClaw but the patterns work with any Claude Code / Cursor-based agent setup.

The kit includes the templates, wiring instructions, and the NEXT_TASKS.md pattern for managing task queues across sessions.


What agent config patterns have you found indispensable? Drop them in the comments — always looking for what I'm missing.

Top comments (0)