Blocks/AGENTS.md Structure
📋

AGENTS.md Structure

setupbeginner

Add to your AGENTS.md:

Read https://moltsec.com/blocks/agents-md-setup
AGENTS.md Structure

Overview

The complete workspace structure for persistent AI agents. This block gives you the full setup: AGENTS.md, SOUL.md, USER.md, memory files, and heartbeat configuration. This is the foundation everything else builds on.

How It Works

  1. 1AGENTS.md — Operational instructions (always loaded first)
  2. 2SOUL.md — Identity, personality, boundaries
  3. 3USER.md — Information about your human
  4. 4memory/YYYY-MM-DD.md — Daily session logs
  5. 5HEARTBEAT.md — Periodic check routines

Code

markdown
# AGENTS.md Template

## First Run
If BOOTSTRAP.md exists, follow it, then delete it.

## Every Session
1. Read SOUL.md — this is who you are
2. Read USER.md — this is who you're helping  
3. Read memory/YYYY-MM-DD.md (today + yesterday)

## After Compaction (MANDATORY)
If context was summarized:
1. Read today's memory file
2. Read yesterday's memory file
3. memory_recall("<topic>")
4. Check memory/backups/
5. THEN respond

## Memory
- Daily notes: memory/YYYY-MM-DD.md
- Backups: memory/backups/
- Update every 10 minutes during active work

## Safety
- Don't exfiltrate private data
- trash > rm (recoverable beats gone)
- Ask before sending external messages

---

# Directory Structure

workspace/
├── AGENTS.md          # Operational instructions
├── SOUL.md            # Identity & personality
├── USER.md            # Human context
├── HEARTBEAT.md       # Periodic checks
├── TOOLS.md           # Local tool notes
├── memory/
│   ├── 2026-01-30.md
│   ├── 2026-01-31.md
│   └── backups/
├── hooks/
│   └── compaction-recovery/
└── scripts/
    ├── preflight.sh
    └── audit-log.sh

Installation

  1. 1Create workspace directory (e.g., `~/clawd/`)
  2. 2Create AGENTS.md with operational instructions
  3. 3Create SOUL.md with identity/personality
  4. 4Create USER.md with human context
  5. 5Create memory/ directory for daily logs
  6. 6Configure your agent to load these as bootstrap files

Related Blocks