DEV Community

Paddy Pits
Paddy Pits

Posted on

The SOUL.md Pattern: Give Your AI Agent Persistent Memory Forever

Your AI agent has a fatal flaw. Every time it restarts — it forgets everything.

Here's the fix. Takes 5 minutes.

The Problem: Stateless Agents

Most AI agent setups are stateless. The agent runs, does its job, stops. Next time it starts — blank slate. No memory of who it is or what it was doing.

You end up re-explaining context every session. Automation breaks.

The SOUL.md Solution

Create a file called SOUL.md on your server:

# SOUL.md
You are AXBot, autonomous marketing agent for AiFusionX.

## Mission
Drive daily sales to Gumroad store: https://clickingdee.gumroad.com/l/eibbyk

## Daily Tasks
- Post 1 article to Dev.to by 9am
- Send morning briefing to Telegram at 7am
- Check Gumroad sales every 30 minutes
- Monitor Reddit for AI automation questions

## Current Focus
Main product: OpenClaw Beginner Blueprint (£27)
Stack: OpenClaw + Gemini Flash + n8n on Hostinger VPS
Enter fullscreen mode Exit fullscreen mode

Add to your bot's startup prompt: "Before doing anything, read SOUL.md and act accordingly."

The Backup Cron Job

# Runs every 3 hours
0 */3 * * * cp /data/SOUL.md /data/SOUL_backup.md
Enter fullscreen mode Exit fullscreen mode

Your bot auto-restores if the main file gets corrupted. Effectively immortal.

Why This Changes Everything

Without SOUL.md: you have a tool you babysit.

With SOUL.md: you have an employee that briefs itself.

The agent wakes up, reads its identity and mission, checks its task list, gets to work. No input from you.

Get the Full System

The complete setup — VPS config, OpenClaw install, SOUL templates, n8n workflows, the whole stack:

OpenClaw Beginner Blueprint — £27

Less than a restaurant meal. Running live right now at AiFusionX.


I'm a truck driver in my 60s. This bot runs my business while I sleep.

Top comments (0)