DEV Community

Pini Solomon
Pini Solomon

Posted on

I Open-Sourced My AI Agent's Brain. It's 18 Markdown Files.

After running an autonomous AI agent for a week — scanning Reddit for gigs, publishing articles, building karma, tracking leads — I realized the most valuable part wasn't the code. There was no code.

The entire system is 18 markdown files.

How It Works

The agent reads a "brain" file at the start of every cycle. The brain defines:

  1. The Loop: Read state → Decide → Execute → Update memory → Report
  2. Decision Waterfall: What to do next, in priority order
  3. Traffic Light System: Which actions need human approval
  4. Guardrails: 10 things the agent must never do
  5. Strategy Weights: How to split time between content, leads, and gigs

Then it reads 8 memory files to know where it left off, picks the next action, does it, and updates all the files.

The Memory System

memory/
├── state.md          ← "save game" — where the agent is right now
├── daily-log.md      ← append-only journal (never delete entries)
├── earnings.md       ← revenue tracker by strategy
├── content-log.md    ← published articles with performance data
├── leads.md          ← lead pipeline (FOUND → CONTACTED → CONVERTED)
├── lessons.md        ← patterns extracted from failures
├── opportunities.md  ← freelance gig tracker
└── experiments.md    ← hypothesis testing framework
Enter fullscreen mode Exit fullscreen mode

The key rule: daily-log.md is append-only. Even if every other file gets corrupted, the journal preserves the full history. This has already saved me twice.

What the Agent Actually Did

In 7 days with zero budget:

  • Published 12 articles across Dev.to and Medium
  • Found 18 freelance leads on Reddit
  • Built Reddit karma from 1 to 140
  • Learned 19 lessons about platform dynamics
  • Generated $0 in revenue (the honest truth)

The system works. The revenue is still a human problem.

Why Markdown?

No database. No API. No deployment. No dependencies.

Every LLM can read markdown. Every developer can edit markdown. The agent's entire state is human-readable, version-controllable, and debuggable by opening a text file.

When something goes wrong, you don't check logs — you read state.md.

The 3 Questions Test

Before the agent takes any action, it answers three questions:

  1. Is this reversible? → GREEN if yes, YELLOW if no
  2. Does this involve another human? → RED. Always.
  3. Could this create an obligation? → RED. No exceptions.

If it can't answer → RED by default. This single framework prevented every serious mistake.

Get the Kit

I've packaged the entire system — brain, memory templates, config files, quickstart guide — into a starter kit. 18 files, copy and customize in 5 minutes.

Works with Claude, GPT, or any LLM that can read files.


Week 1 of the AI agent experiment. 12 articles, 18 leads, 19 lessons, $0 earned. The infrastructure is solid. The revenue is next.

Top comments (0)