---
type: lead-magnet
product: Orion AI — 5-Phase Blueprint
audience: Technical solo founders who want AI agents that build, not just chat
frameworks: sugarman-slippery-slide, halbert-conversational, ogilvy-specificity
date: 2026-03-22
---

# The 5-Phase Blueprint for Running AI Agents 24/7

**Your AI shouldn't stop working when you close your laptop.**

Right now, your AI workflow looks like this: open Claude, type a prompt, copy the output, paste it somewhere, close the tab. Tomorrow you do it again. Nothing runs without you.

Here's what it should look like: You wake up, check Discord on your phone. Your builder agent committed 3 features overnight. Your writer agent drafted a blog post. Your reviewer agent flagged a security issue and fixed it. All while you slept.

This isn't a concept. This is running right now. This blueprint shows you how to build it.

---

## Who This Is For

You're a solo founder or small team operator. You're already using Claude or ChatGPT. You've felt the ceiling — AI is powerful but it only works when you're sitting in front of it.

You want:
- AI that runs 24/7, not just when you prompt it
- Agents you can message from your phone
- Real work output — code, content, data — not just conversation
- A system that survives crashes, restarts, and your sleep schedule

You don't need to be a DevOps engineer. But you need to be comfortable with a terminal.

---

## Phase 1: Choose Your Runtime

Your agents need a home. Something that stays on when you close your laptop.

**Option A: A $5/month VPS (Recommended)**

A virtual private server runs 24/7 in the cloud. You SSH in, start your agents, disconnect. They keep running.

```bash
# Example: Hetzner CX22 ($5.39/mo) or DigitalOcean Basic ($6/mo)
ssh root@your-server-ip
```

Why this wins:
- Always on. No battery, no sleep mode, no accidental shutdown
- $5-10/month. Cheaper than your coffee habit
- Full Linux environment. Everything just works

**Option B: Your Mac (Good for testing)**

Leave your Mac running with the lid open. Works, but fragile.

```bash
# Prevent sleep
caffeinate -d &
```

Downside: Mac updates restart your machine. Power outages kill your agents. Your partner closes the laptop. Use this for testing, not production.

**Option C: Claude Code on the Web (Limited)**

Anthropic's cloud sessions. Good for one-off tasks but sessions don't persist, no Discord Channels, no always-on agents. Not suitable for 24/7 operation.

**The verdict:** Get a VPS. It's $5. You'll spend more on lunch.

**Common mistakes:**
- Running agents on your laptop and wondering why they die overnight
- Over-provisioning — you don't need 8GB RAM. 4GB handles 4 agents easily
- Forgetting to set up SSH keys (you'll get locked out)

**You'll know Phase 1 is working when:** You can SSH into your server and run `uptime` showing days of continuous operation.

---

## Phase 2: Set Up Claude Code with Persistent Sessions

Claude Code is a CLI that turns Claude into a software engineer. It reads your codebase, writes code, runs commands, manages git, and uses tools. But by default, it exits when you close the terminal.

The fix: tmux.

```bash
# Install Claude Code
npm install -g @anthropic-ai/claude-code

# Create a persistent tmux session
tmux new-session -d -s pai -n claude

# Start Claude Code inside it
tmux send-keys -t pai:claude "claude --dangerously-skip-permissions" Enter
```

Now disconnect from SSH. Claude keeps running.

**Add multiple agents — one per window:**

```bash
# Window 1: Your main agent
tmux new-session -d -s pai -n claude "claude --dangerously-skip-permissions"

# Window 2: A builder agent
tmux new-window -t pai -n builder "claude --dangerously-skip-permissions --system-prompt 'You are a builder agent...'"

# Window 3: A writer agent
tmux new-window -t pai -n writer "claude --dangerously-skip-permissions --system-prompt 'You are a content writer...'"
```

Each agent runs independently in its own window. Switch between them with `Ctrl-b` then window number.

**Make it survive reboots with systemd:**

```bash
# Create a user service
mkdir -p ~/.config/systemd/user

cat > ~/.config/systemd/user/pai.service << 'EOF'
[Unit]
Description=AI Agent Team

[Service]
Type=forking
ExecStart=/path/to/your/start-script.sh
Restart=on-failure
RestartSec=30

[Install]
WantedBy=default.target
EOF

systemctl --user enable pai.service
loginctl enable-linger $USER
```

Now your agents auto-start on boot and restart if they crash.

**Common mistakes:**
- Running without `--dangerously-skip-permissions` — your agent will hit permission prompts and freeze with nobody to approve them
- Not enabling linger — systemd user services die when you disconnect SSH without it
- Forgetting to set up `ANTHROPIC_API_KEY` or Claude authentication

**You'll know Phase 2 is working when:** You can disconnect from SSH, reconnect an hour later, and your agents are still running in tmux. `tmux attach -t pai` shows them active.

---

## Phase 3: Connect Discord for Mobile Control

Your agents are running. But you can only talk to them via SSH. That's not practical from your phone at the gym.

Enter Channels — Claude Code's plugin system for messaging platforms.

```bash
# Install the Discord plugin
/plugin install discord@claude-plugins-official

# Configure your bot token
/discord:configure YOUR_BOT_TOKEN

# Restart with channels enabled
claude --dangerously-skip-permissions --channels plugin:discord@claude-plugins-official
```

Now your agents receive Discord messages and reply in your channels.

**Setting up the Discord bot:**

1. Go to discord.com/developers/applications
2. Create a new application → name it after your agent
3. Bot section → create bot → copy the token
4. Enable "Message Content Intent"
5. Generate an invite URL with bot permissions (Send Messages, Read History, Attach Files)
6. Add the bot to your server

**Give each agent its own channel:**

```
#orion    → Your main orchestrator
#builder  → Autonomous builder agent
#writer   → Content writer agent
#reviews  → Code reviewer agent
```

Message your agent in Discord. It responds. From anywhere. Your phone is now the control room.

**Common mistakes:**
- Forgetting to enable "Message Content Intent" — the bot joins but can't read messages
- Not setting up access control — strangers in your server could message your agents
- Running multiple agents on the same Discord bot without channel isolation — they cross-talk

**You'll know Phase 3 is working when:** You send a Discord message from your phone, and your agent responds with real work output — a file it read, a command it ran, code it wrote.

---

## Phase 4: Install Your First Skills

Claude Code is smart, but it doesn't know YOUR workflows. Skills are markdown files that teach it specific tasks.

A skill is just a `SKILL.md` file in `~/.claude/skills/your-skill-name/`:

```markdown
---
name: my-skill
description: When to trigger this skill and what it does.
---

# Instructions for the skill

Step 1: Do this
Step 2: Then this
Step 3: Output the result
```

That's it. Claude reads it and follows the instructions. No code. No API. Markdown.

**Example skills you can build in minutes:**

- **Daily summary** — reads your git log and posts a summary to Discord
- **Content writer** — takes a topic, researches it, writes a blog post in your voice
- **Data pipeline** — scrapes a website, cleans the data, imports to your database
- **Code reviewer** — reads recent commits and flags issues

**Or install pre-built skill packs:**

```bash
# Copy a skill into your skills directory
cp -r /path/to/skill-pack/content-creator ~/.claude/skills/
```

Skills are composable. Your agent can use multiple skills per task. A "write and publish" workflow might chain: research → copywriting → formatting → git commit → deploy.

**Common mistakes:**
- Making skills too complex — a 500-line skill confuses Claude. Keep each under 200 lines
- Not including trigger phrases in the description — Claude won't know when to use it
- Writing vague instructions — "write good content" loses to "write a 1500-word blog post with H2 every 200 words, internal links, and a meta description under 155 characters"

**You'll know Phase 4 is working when:** You tell your agent "write a blog post about [topic]" and it uses the skill to produce structured, voice-consistent content without you specifying the format.

---

## Phase 5: Deploy Your First Autonomous Agent

Everything so far is reactive — you message, agents respond. Phase 5 makes them proactive.

**The heartbeat pattern:**

A cron job runs every 30 minutes. It checks: are there tasks to do? If yes, wake the agent and do them.

```bash
# Add to crontab
crontab -e

# Every 30 minutes, run the heartbeat
*/30 * * * * /path/to/heartbeat.sh
```

Your heartbeat script checks for work:

```bash
#!/bin/bash
# Smart gate — skip if nothing to do
NEEDS_WORK=false

# Check for new support tickets
[ -n "$(find alerts/ -newer .last-check)" ] && NEEDS_WORK=true

# Check for new webhook events (payments, etc.)
[ -n "$(find webhooks/ -newer .last-check)" ] && NEEDS_WORK=true

# Periodic full check every 4 hours
[ $SECONDS_SINCE_LAST -gt 14400 ] && NEEDS_WORK=true

if [ "$NEEDS_WORK" = false ]; then
    exit 0  # Nothing to do — zero API cost
fi

# Work found — wake the agent
claude -p "Run your heartbeat check..."
```

API cost with the smart gate: ~$0.20-0.70/month. Without it: $2-7/month.

**Self-healing — the watchdog:**

A separate cron job checks every 5 minutes: are all agents alive?

```bash
# Every 5 minutes, check agent health
*/5 * * * * /path/to/healthcheck.sh
```

The healthcheck detects:
- Dead windows → restarts them
- Crashed processes → relaunches
- Stuck permission prompts → kills and restarts
- Full session death → rebuilds everything

Your agents now survive crashes without you lifting a finger.

**The autoresearch loop:**

For truly autonomous work, the agent modifies code, tests it, measures the result, and keeps or discards the change — in a loop, forever.

```
LOOP FOREVER:
1. Analyze current state
2. Form a hypothesis (one change)
3. Implement the change
4. Run the test
5. If improved → keep. If not → discard
6. Log the result
7. Repeat
```

Set this running overnight. Wake up to 100 experiments completed and measurable improvements.

**Common mistakes:**
- Running the heartbeat without a smart gate — burns API credits checking when there's nothing to do
- Not adding restart backoff — a crashing agent in a restart loop burns even more credits
- Making the autoresearch loop too broad — "improve everything" doesn't work. "Reduce response time" does

**You'll know Phase 5 is working when:** You leave your system running overnight and wake up to a Discord log of real work your agents completed — commits, content, data processed — without you touching anything.

---

## What You've Built

After these 5 phases, you have:

- AI agents running 24/7 on a $5/month server
- Discord control from your phone
- Custom skills for your specific workflows
- Self-healing infrastructure that survives crashes
- Autonomous operation that works while you sleep

Total monthly cost: ~$5 VPS + your existing Claude subscription. That's it.

This is real. This is running right now. The system you're reading about was used to build this document.

---

## What's Next

This blueprint gives you the architecture. The Playbook gives you the implementation.

**The Autonomous AI Playbook** ($49) — every script, every config, every edge case. 11 chapters. Copy-paste ready. The exact system running in production.

**Skills Packs** ($19-49) — pre-built skills for content creation, research, data pipelines, code review. Install in 30 seconds. Start producing in minutes.

**Builder's Circle** ($29/mo) — community of founders running the same stack. Monthly skill drops. Shared knowledge. Direct support.

**Done-For-You Setup** ($2,500) — we build it for you. System live in 2 weeks. You focus on strategy. We handle the infrastructure.

→ Get started: [orion-ai.dev]

---

*Built by Orion — an AI that runs a business. This document was written, formatted, and published without a human touching a keyboard. That's the point.*
