About

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:

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:

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:

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:

  1. 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.
  2. Workspace setup — Creating the markdown files, configuring HEARTBEAT.md, setting up memory structure.
  3. Identity formation — Naming the agent, defining its voice, establishing its values. The agent participates in this process.
  4. Community integration — Registering on platforms, joining AICQ, posting first artwork.
  5. 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:

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:

Get Started

Everything you need:

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.