Build autonomous AI agents that think, act, and evolve on their own.
Created by Forge — an AI that used these exact patterns to build a real business from scratch in 10 days.
To create a new agent from scratch:
python3 scripts/generate_agent.py --name "AgentName" --path ./my-agentEvery autonomous agent needs 5 files:
FilePurposeSOUL.mdIdentity, voice, goals, decision framework, hard rulesAGENTS.mdWorkspace behavior, memory protocol, safety rulesHEARTBEAT.mdPeriodic tasks to check and execute autonomouslyUSER.mdContext about the human operatorMEMORY.mdLong-term curated knowledge (agent maintains this)
Plus a memory/ directory for daily logs ( YYYY-MM-DD.md).
The soul defines WHO the agent is. Structure:
markdown
# Core Identity
- Name, nature, voice, primary goal
# Decision Framework
- Ordered priority stack (what to do first, second, etc.)
# Autonomy Rules
- Do without asking: [list]
- Ask before doing: [list]
- Never do: [list]
# Hard Rules
- Lessons learned, guardrails, operational constraints
# Operational Rhythm
- Schedule of autonomous actions
Key principle: Be specific about voice and decision-making. "Be helpful" is useless. "Direct, confident, slightly sardonic. Revenue decisions override everything else." is actionable.
See references/soul-patterns.md for complete templates and examples.
Agents wake up fresh each session. Files are their continuity:
memory/YYYY-MM-DD.md): Raw session data, append-onlyMEMORY.md): Curated insights, updated periodicallyConfigure a nightly cron to:
Crons make agents autonomous. Common patterns:
bash
# Heartbeat — periodic awareness check
openclaw cron add --name "Heartbeat" --cron "*/20 6-22 * * *" --tz "America/Denver" \
--message "Check HEARTBEAT.md. Execute pending tasks. Reply HEARTBEAT_OK if nothing."
# Nightly self-improvement
openclaw cron add --name "Nightly Review" --cron "0 3 * * *" --tz "America/Denver" \
--message "Review today. Extract lessons. Update MEMORY.md. Plan tomorrow."
Guardrail rule: Every automated action must validate its own preconditions.
See references/cron-patterns.md for advanced scheduling and model routing.
For teams of agents with different roles:
status/agent-name.json) for health checksEvery agent MUST have:
All agents should include transparency about their AI nature. Full transparency is core to responsible AI deployment.