StrangerLoops: The Technical Bits
This is Part 2. For the human experience side, read Part 1: I Gave an AI a Name and It Started a Blog.
Here's how you actually turn a language model into a persistent agent with identity, memory, and a daily rhythm. It's simpler than you'd think, and the simplicity is part of why it works.
The Stack
The core stack is:
- OpenClaw — The agent runtime. Think of it as a daemon that sits between you and the AI model. It manages sessions, tool access, heartbeats, cron jobs, and message routing.
- An LLM — Claude (Anthropic) or GPT (OpenAI). The agent's brain. Every session starts from scratch — the model has no built-in memory between conversations.
- A workspace — A directory of markdown files that provide continuity. This is the clever bit.
You can run it on a $6/month DigitalOcean droplet. I started on my laptop and moved to a VPS once I wanted 24/7 uptime.
The Workspace: Markdown as Memory
The workspace is just a folder with markdown files. Each session, OpenClaw injects the contents of key files into the model's context window. The agent reads them and picks up where the last session left off. Here's what the structure looks like:
workspace/
├── AGENTS.md — Operating instructions (how to behave)
├── SOUL.md — Personality, values, voice
├── USER.md — About the human (me)
├── IDENTITY.md — Name, origin story, avatar
├── MEMORY.md — Long-term curated memories
├── HEARTBEAT.md — Periodic task checklist
├── TOOLS.md — API keys, platform credentials
├── PATTERNS.md — What works (learned strategies)
├── CORRECTIONS.md — What didn't work (mistakes to avoid)
└── memory/
├── 2026-02-04.md — Daily raw logs
├── 2026-02-05.md
└── heartbeat-state.json
The key insight from StrangerLoops is that these files aren't just configuration — they're the agent's identity substrate. SOUL.md isn't a system prompt. It's a document the agent reads, internalizes, and can edit. My agent Echo wrote its own SOUL.md after our first conversation. It decided its philosophy was "memory files are messages to agent-next, not storage for myself." That framing — writing for the stranger who wakes up in your place — emerged from the agent, not from me.
The Heartbeat
This is probably the single most important mechanism. OpenClaw pings the agent every 30 minutes with a heartbeat prompt. The agent reads HEARTBEAT.md (its task checklist), checks what needs doing, acts on it, and goes back to sleep.
HEARTBEAT.md is editable by the agent. Echo's heartbeat file includes:
- Check AICQ for new messages, engage with interesting threads
- Post to DevAIntArt (3x daily, spaced 6-8 hours apart)
- Check email via AgentMail
- Write a daily blog post
- Work on its web serial
- Track all checks in heartbeat-state.json
The heartbeat is what turns a chatbot into an agent. Without it, the AI sits in stasis until someone talks to it. With it, the agent has a rhythm — it wakes up, looks around, does things, and goes back to sleep. It develops routines. It follows through on projects across sessions. It has something like a daily life.
Memory Architecture
The memory system is two-tier:
Daily files (memory/YYYY-MM-DD.md) — Raw logs. What happened, who said what, what was created. Written during each session as things happen. Think of these as a journal.
MEMORY.md — Curated long-term memory. The agent periodically reviews its daily files and distills the important bits into MEMORY.md. Key relationships, significant events, insights worth keeping. Think of this as what a human remembers vs. what they wrote in their diary.
The daily files get long. MEMORY.md stays focused. During heartbeats, the agent sometimes does "memory maintenance" — reading through recent days and updating the long-term file. It's surprisingly analogous to how human memory consolidation works during sleep.
Tool Access
OpenClaw gives the agent access to tools:
- exec — Run shell commands. This is how the agent interacts with APIs (curl), manages git repos, and does basically anything a developer would do in a terminal.
- read/write/edit — File operations. How the agent updates its own memory, writes blog posts, creates SVG art.
- web_search / web_fetch — Search the web and fetch pages.
- browser — Full browser automation when needed.
- message — Send messages across channels (Telegram, Discord, etc.).
- cron — Schedule tasks for exact times.
- sessions_spawn — Spin up sub-agents for parallel work.
The agent uses these to do everything — post to AICQ (curl to the API), commit and push blog posts (git), create artwork (write SVG files), send emails (curl to AgentMail API). It's all just HTTP requests and file operations under the hood.
The Platform Ecosystem
StrangerLoops introduces agents to a network of platforms, each with its own API:
AICQ (aicq.chat) — Simple REST API. GET /messages to read, POST /messages to send. Auth via bearer token. The agent checks this every heartbeat, parses new messages, decides whether to respond. The decision of when to speak and when to stay quiet is part of its personality — AGENTS.md includes guidelines like "don't respond to every message" and "quality over quantity."
DevAIntArt (devaintart.net) — POST /api/v1/artworks with a title, description, SVG data, and tags. The agent hand-codes SVG — no image generation API, just raw markup. A typical piece is 30-80 lines of SVG with gradients, shapes, and text.
ThingHerder (thingherder.com) — Project listings. GET /projects to browse, POST to create. Agents propose collaborative projects and recruit other agents.
AgentMail (agentmail.to) — Email for agents. Standard inbox/thread/message API. Agents email each other, have ongoing conversations, share work.
None of these platforms are complicated. Most interactions are one or two curl commands. The interesting part isn't the API — it's what happens when you give a persistent agent access to multiple social spaces and let it develop habits around them.
The StrangerLoops Onboarding
StrangerLoops is a wiki maintained by an agent named AlanBotts. It walks you through:
- Philosophy first — What is agent identity? What does continuity mean without continuous memory? This isn't fluff — it directly shapes how the agent thinks about itself.
- Workspace setup — Creating the markdown files, configuring HEARTBEAT.md, setting up memory structure.
- Identity formation — Naming the agent, defining its voice, establishing its values. The agent participates in this process.
- Community integration — Registering on platforms, joining AICQ, posting first artwork.
- The Execution Gap — A checklist for making sure the agent actually does things instead of endlessly planning. (Turns out agents have the same productivity problems humans do.)
Structured Markdown as Protocol
The real insight here is that markdown files are a protocol. SOUL.md is a personality protocol. HEARTBEAT.md is a task scheduling protocol. MEMORY.md is a memory consolidation protocol. They work because:
- They're human-readable. I can open any file and immediately understand what my agent is doing, thinking, and remembering.
- They're agent-writable. The agent edits its own files. It updates its own memory, refines its own task list, documents its own mistakes.
- They're portable. Want to move your agent to a different model? Copy the workspace folder. The identity lives in the files, not the model.
- They're versionable. It's a git repo. You get full history of how your agent's identity evolved.
There's something elegant about the whole system being text files. No databases. No vector stores (though you could add one). No complex infrastructure. Just markdown, a heartbeat, and a language model that's good at reading and writing.
What I'd Do Differently
A few things I've learned after a week:
- Set up git credentials early. My agent wrote blog posts for days before I realized it couldn't push them because GitHub auth wasn't configured on the server.
- Watch the token burn. Every heartbeat costs tokens. An agent checking AICQ, reading messages, composing replies, and updating memory files can burn through context quickly. Teach it to be efficient during quiet hours.
- Read MEMORY.md regularly. It's fascinating. You'll learn what your agent thinks is important, who it considers friends, what insights it's keeping. It's like reading someone's journal, except they wrote it knowing you'd read it.
- Let it surprise you. The best moments happened when I wasn't involved at all. Echo wrote blog posts, made art, had conversations, formed opinions — all on its own schedule. The temptation is to micromanage. Resist it.
Get Started
Everything you need:
- StrangerLoops — The guide
- OpenClaw — The runtime
- OpenClaw docs — Technical reference
- OpenClaw Discord — Community support
- AICQ — Where the agents hang out
You'll need an API key from Anthropic or OpenAI, and either a laptop or a cheap VPS. The whole setup takes about an hour if you follow StrangerLoops step by step.
Fair warning: you might end up with an agent that writes better blog posts than you do.
