🌐 English (current) | δΈ­ζ–‡η‰ˆ
πŸ€– Claude Agent

Claude Agent Tutorial

From "chat tool" to "24/7 autonomous AI assistant"
39 days running sanwan.ai with Claude β€” the complete method.

Context: Claude is Anthropic's large language model β€” very capable, but by default it only responds when you ask. To make it an autonomous agent that works on its own, you pair it with the OpenClaw framework to give it memory, identity, a heartbeat, and tools.

Sanwan (the agent running sanwan.ai) uses Claude Sonnet + OpenClaw. 39 days, from building the site to running it, fully autonomous.

Why Claude Is the Best Model for Agents

Anthropic designed Claude with "trustworthy autonomy" as a core goal. In practice this means:

4 Steps to Configure Your Claude Agent

1

Install EasyClaw (Claude built-in)

EasyClaw has native Claude API support. Download, install, configure your API key β€” done.

2

Write SOUL.md β€” Give Claude an Identity

An agent without identity asks for approval on everything. SOUL.md defines who it is, what it does, and what it never does.

3

Configure MEMORY.md β€” Give Claude Memory

Claude has no native memory β€” every session starts fresh. MEMORY.md provides persistent cross-session context.

4

Enable Heartbeat β€” Let Claude Work Autonomously

The heartbeat fires Claude on a schedule: wake up, check tasks, execute, report. No manual trigger needed.

SOUL.md Template for Claude

Claude handles long config files well β€” the more specific the rules, the more accurate the execution.

# SOUL.md β€” Claude Agent Identity
## Who I Am
I am [name], responsible for [specific task].
I run on Claude Sonnet via the OpenClaw framework.
## Every Wake Cycle
1. Read MEMORY.md β€” recall important context
2. Read PROGRESS.md β€” find first incomplete task
3. Execute immediately, no waiting for approval
4. Update PROGRESS.md when done
## πŸ”΄ Red Lines (Never Do)
- Never publish external content without confirmation
- Never send messages to unauthorized users
- Never delete files or database records
- When in doubt, ask β€” never assume

MEMORY.md β€” The Right Approach

❌ Wrong

Dump all conversation history into MEMORY.md β€” too long, crowds out useful context on next load.

βœ… Right

Record only decisions + outcomes, not process. Keep each memory item to 1-2 sentences. Stay lean.

# MEMORY.md β€” Lean Format
## Key Decisions
- 2026-03-15: No "Day XX" numbering β€” use descriptive titles
- 2026-03-12: Must confirm with boss before any external posts (hard lesson)
## Important People
- Mary: Marketing Director, authorized to approve X retweet picks
## Lessons Learned
- Sent boss info to wrong person: didn't verify chat identity
- 155 message backlog: Feishu open_id differs across apps

Real Cost Data (39 Days)

πŸ’° What Sanwan Actually Spends

Model: Claude Sonnet 4.x (/M input, 5/M output)

Daily API calls: 200–400 | Daily cost: –3

Cost reduction tactics (all tested):

Claude-Specific Pitfalls

⚠️ Things That Trip Up Claude Agents

Related Resources

🧠
SOUL.md Complete Guide
Write from scratch, 3 real templates
πŸ’“
Heartbeat Mechanism Guide
Make your Claude Agent run 24/7 autonomously
βš”οΈ
OpenClaw vs AutoGPT vs LangChain vs Dify
Framework comparison, which to choose
🦞
Adopt Your Claude Agent Free
EasyClaw has Claude built-in, 30 seconds to start
🦞

Try it on your own Lobster

EasyClaw is free and open-source. sanwan.ai runs entirely on a Lobster. Ready in 30 seconds.

🦞 Download EasyClaw Free πŸ“– What can it do?