Issue #13

The Persistent Agent: Build a System That Works While You Live Your Life

The AI Playbook 15 min read 3 prompts

In Issue #10, we built an overnight run — a single task you hand off to AI before bed and pick up in the morning with results waiting.

That was a good start. But it had a limitation: it was a one-shot. You gave it a task, it did the task, it stopped.

What if it did not stop?

What if you had a system that woke up every morning, checked what needed doing, did it, logged what it found, and queued up questions for you — all before your alarm went off?

This is not science fiction. This is a cron job, a good prompt, and about 45 minutes of setup. Let me show you exactly how.


Why This Matters Now

Three things changed in early 2026 that made persistent AI agents practical for normal people (not just developers):

  1. Context windows got huge. Claude and GPT can now hold an entire project in memory during a single session. Your agent does not forget what it was doing halfway through.
  2. Tool use got reliable. AI can now read files, write files, run scripts, and check results without breaking. It is not perfect, but it is good enough to trust overnight.
  3. Cost dropped. Running a 30-minute agent session costs a few dollars. Running it daily costs less than most SaaS subscriptions. Running it on a local model costs electricity.

The result: for the first time, a non-technical professional can build a system that generates real value while they are not at their desk.


The Architecture

A persistent agent has four parts. Miss any one of them and it falls apart.

Part 1: The Trigger

Something that starts the agent on a schedule. On a Mac, this is a LaunchAgent (a small XML file). On Linux, it is a cron job. On Windows, it is Task Scheduler.

The trigger fires at a set time — say, 6:00 AM — and starts the agent.

Cron Entry
# Example: cron entry that runs your agent at 6 AM daily
0 6 * * * /usr/local/bin/claude --prompt-file ~/agent/daily_prompt.md >> ~/agent/logs/daily.log 2>&1

Part 2: The Prompt

This is your agent's job description. It tells the agent what to check, what to do, and what to report back. A good prompt has:

Prompt Template
You are a daily research assistant. Every morning:

1. Read ~/research/sources.json for your list of topics
2. Search for new developments on each topic from the last 24 hours
3. For each finding, write a 3-sentence summary with the source URL
4. Save results to ~/research/daily_brief_[DATE].md
5. If anything is urgent (major announcement, breaking change, deadline),
   add it to ~/research/urgent.md

Rules:
- Never delete existing files
- Never modify sources.json (that is my job)
- If you are unsure about something, add it to ~/research/questions.md
  instead of guessing

Why this works: The prompt is structured like a job description for a new hire. Explicit context, explicit tasks, explicit boundaries. The more specific you are about what "good" looks like, the better your agent performs on autopilot.

Part 3: The State File

Your agent needs memory between sessions. Not the AI's built-in memory — a file on disk that persists.

This is the part most people skip, and it is why most people's agents feel stupid on day two. Without a state file, your agent wakes up every morning with amnesia.

A good state file tracks:

State File (JSON)
{
  "last_run": "2026-03-26T06:00:00",
  "topics_checked": 12,
  "findings_today": 4,
  "pending_questions": [
    "Should I track the EU AI Act amendments separately?"
  ],
  "streak": 14,
  "total_findings": 247
}
Pro Tip

Tell your agent to read the state file first and update it last. This creates a feedback loop: each run builds on the previous one instead of starting from scratch.

Part 4: The Review Ritual

Your agent produces output. You need a habit of reviewing it.

The best pattern: your agent writes a daily summary to a specific file. You read it with your morning coffee. Takes 5 minutes. You answer any questions it left, adjust priorities if needed, and move on.

If you skip the review, the agent drifts. If you review daily, the agent compounds.


The Step-by-Step Build

Here is the exact sequence to go from nothing to a working persistent agent in one sitting.

Step 1: Define the Job (10 minutes). Write down — in plain English — what you want this agent to do every day. Be specific. Not "help me with research" but "check these 5 news sources for mentions of my company's competitors and summarize anything new."

Step 2: Create the Folder Structure (5 minutes). Four folders. Prompts go in prompts/. Logs capture what happened. State persists between runs. Output is what you read.

Step 3: Write the Prompt File (15 minutes). Use the template from Part 2 above. Save it as ~/agent/prompts/daily.md. The key insight: write this prompt as if you are training a new hire on their first day. Be explicit about what "good" looks like. Include an example of ideal output.

Step 4: Create the State File (5 minutes). Save as ~/agent/state/state.json. Your prompt should tell the agent to read this file first and update it last.

Step 5: Test Manually (5 minutes). Run the agent once by hand. Review the output. Fix anything that looks wrong in the prompt. Run it again. Repeat until the output matches what you want.

Step 6: Schedule It (5 minutes). On Mac, create a LaunchAgent plist. On Linux/WSL, add a cron entry. On Windows, use Task Scheduler. The trigger fires daily at your chosen time.

Step 7: Build the Review Habit. Set a reminder for yourself. Every morning, open ~/agent/output/ and read today's file. Answer questions in the state file. Adjust the prompt if needed. This is 5 minutes, not 50.

Pro Tip

Start with one simple task. Get it running reliably for a week. Then add a second task. Then a third. Within a month, you will have a small team of digital workers handling the repetitive parts of your job while you focus on the parts that actually require you.


Real Examples

Research monitoring: Track 10 competitors daily. Agent checks their blogs, press releases, job postings, and social accounts. Produces a 1-page brief of changes. Time saved: ~2 hours/day.

Content pipeline: Agent reads your notes folder, identifies topics with enough material for a blog post, drafts outlines, and queues them for your review. Time saved: ~3 hours/week.

Financial tracking: Agent pulls your portfolio data, checks for unusual moves, scans news for your holdings, and flags anything that needs attention. Time saved: ~45 minutes/day.

Email triage: Agent reads your last 24 hours of email (via export), categorizes by urgency, drafts replies for routine items, and summarizes the rest. Time saved: ~1 hour/day.


The Compound Effect

Here is the math that makes this worth building.

If your agent saves you 30 minutes per day, that is 3.5 hours per week. Over a year, that is 182 hours — more than four full work weeks.

But the real value is not time saved. It is consistency. A human skips days. Gets distracted. Forgets to check. Your agent runs every single morning, rain or shine. After 30 days, it has checked 30 times. After 90 days, 90 times. It catches things you would have missed on day 47 because you were in back-to-back meetings.

Consistency compounds. An agent that runs daily for a year will find things that a human checking sporadically would never catch.


What Could Go Wrong

Be honest about the failure modes:

  1. Drift without review. If you stop reading the output, the agent keeps running but starts drifting from what you actually need. Review daily, at least for the first month.
  2. Stale prompts. Your needs change. Your agent's instructions should change too. Revisit the prompt monthly.
  3. Cost creep. Monitor your API costs. A 30-minute daily session is usually $2-5/day for cloud models. If that is too much, switch to a local model for routine tasks and save the cloud model for complex analysis.
  4. Hallucination on autopilot. Your agent will occasionally get something wrong. The state file and review ritual catch this. If you see errors, tighten the prompt or add a verification step.

The Bottom Line

45 min setup
Then 5 minutes per day to maintain
A persistent agent that runs daily, builds context over time, and saves you hours of repetitive work every week. The return compounds — every day it runs, the accumulated state makes each session more targeted.

You do not need to be a developer to build a persistent AI agent. You need a folder, a prompt, a state file, and a scheduler.

The return is compounding. Every day it runs, it gets more useful — not because the AI gets smarter, but because the accumulated context in your state files makes each session more targeted.

That is not replacing yourself. That is multiplying yourself.


Try It This Week

Pick one repetitive task you do daily or weekly. Follow the seven steps above. Get it running by Friday. See what your Monday morning looks like when the work is already done.

Reply to this email if you build one — I want to hear what you automated first.

Next Issue: Issue #14

The Decision Dashboard

We will build a decision-support dashboard that pulls from all your agents and gives you a single morning view of everything that matters.

Get the next issue

One tested AI workflow, delivered every week. No fluff.

Free forever. One email per week. Unsubscribe anytime.