Build your Rudolf backoffice agent
Hands-on exercises for the AI Realist x OpenClaw workshop β provision Rudolf, give him a soul, install skills from ClawHub, then watch him sort a messy folder of invoices, receipts, and contracts.
Hands-on exercises for the AI Realist x OpenClaw workshop β provision Rudolf, give him a soul, install skills from ClawHub, then watch him sort a messy folder of invoices, receipts, and contracts.
OpenClaw is new. ChatGPT / Claude / Gemini do not know it. They will hallucinate commands that will break your setup.
Force LLMs to consult only docs.openclaw.ai and find the right way to fix issues there based on the documentation.
When troubleshooting OpenClaw, always consult only https://docs.openclaw.ai/ and find the right way to fix it there. Do not use internal knowledge. Reference the docs in every answer and explain why the docs recommend that fix.
Before you begin: complete the Workshop Setup Guide β install Python 3, OpenClaw, configure your model provider, and run the setup validator.
You'll build a backoffice keeper β an AI agent called Rudolf who opens every file, refuses to trust filenames, and produces accountant-ready summaries from a folder of messy invoices, receipts, and contracts. No coding background needed.
Terminal (Mac) and PowerShell (Windows) are text-based ways to give your computer instructions. Instead of clicking icons, you type commands and press Enter.
β Command + Space β opens SpotlightTerminal and press ReturnWin + R β opens the Run dialogpowershell and press Enterπ‘ How to copy a command: click on any dark box to copy it, then paste into Terminal / PowerShell and press Enter.
Get OpenClaw running, open the Web UI, and send your first prompt.
1. Make sure OpenClaw is running. Open http://localhost:18790 β if you see a chat window, you're good.
2. Paste this into the chat:
I need to start OpenClaw for the Rudolf workshop. What commands should I run to launch the server and open the Web UI? Cover both macOS Terminal and Windows PowerShell, and explain what each does.
If OpenClaw responds β great, move to Step 2. If it doesn't, follow the fallback below.
# macOS Terminal β or β Windows PowerShell openclaw gateway run --bind loopback --auth none --port 18790 # Then open http://localhost:18790 in your browser # and paste the prompt above into the chat.
π¦ Tip. Run openclaw --version to confirm it's installed. If missing, see the Workshop Setup Guide.
Pull the workshop's unsorted documents from Google Drive into a local folder Rudolf can read.
Download the workshop files from this Google Drive folder into ~/workshop/unsorted-backoffice/ (or the Windows equivalent under %USERPROFILE%\workshop\unsorted-backoffice\): https://drive.google.com/drive/folders/1R1A-LhmFS3YSda9bwxGHv9JvDftoBgN9 Use the gog skill if you have it. If not, ask me how to proceed. Don't download FACILITATOR_NOTES.md β that's the answer key, not for participants. When done, list what you downloaded and confirm the count.
~32 files: PDFs, .docx, .xlsx, photos, emails, plain text β a deliberate mess. Some have honest filenames (invoice_2024-03.pdf); some lie (payment_due.pdf is actually a quote). Sorting them is the whole point.
# 1. Open the Drive folder in your browser # 2. Select all files (Ctrl/Cmd+A) and click Download β Drive zips them for you # 3. Unzip into ~/workshop/unsorted-backoffice/ (macOS) or %USERPROFILE%\workshop\unsorted-backoffice\ (Windows)
Create a fresh workspace and register Rudolf as a new OpenClaw agent. He gets his own files, sessions, and identity β isolated from your other agents.
Provision a new OpenClaw agent named Rudolf according to best practices in https://docs.openclaw.ai/concepts/agent-workspace and https://docs.openclaw.ai/concepts/architecture. Create the workspace at ~/.openclaw/workspace-backoffice/ (or %USERPROFILE%\.openclaw\workspace-backoffice\ on Windows). Create the seven canonical placeholder files (AGENTS.md, SOUL.md, IDENTITY.md, USER.md, TOOLS.md, HEARTBEAT.md, MEMORY.md). Register the agent with the CLI. Initialise git in the workspace. Don't write content into any of the markdown files yet beyond placeholders β I'll provide the text in the next steps. After provisioning, run openclaw agents list --json and confirm Rudolf appears.
mkdir -p ~/.openclaw/workspace-backoffice cd ~/.openclaw/workspace-backoffice touch AGENTS.md SOUL.md IDENTITY.md USER.md TOOLS.md HEARTBEAT.md MEMORY.md git init && git add -A && git commit -m "Initial Rudolf workspace" openclaw agents add backoffice --workspace ~/.openclaw/workspace-backoffice --non-interactive openclaw agents list --json
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.openclaw\workspace-backoffice"
Set-Location "$env:USERPROFILE\.openclaw\workspace-backoffice"
"AGENTS.md","SOUL.md","IDENTITY.md","USER.md","TOOLS.md","HEARTBEAT.md","MEMORY.md" | ForEach-Object { New-Item -ItemType File -Force -Name $_ | Out-Null }
git init; git add -A; git commit -m "Initial Rudolf workspace"
openclaw agents add backoffice --workspace "$env:USERPROFILE\.openclaw\workspace-backoffice" --non-interactive
openclaw agents list --json
π Why one workspace per agent? OpenClaw isolates each agent β its own AGENTS.md, sessions, auth. That's how Rudolf and your other agents coexist without stepping on each other.
SOUL.md is character (who Rudolf is). AGENTS.md is procedure (how Rudolf works). Keeping them separate is a docs-recommended best practice.
Write SOUL.md and AGENTS.md for Rudolf in this workspace using OpenClaw best practices at https://docs.openclaw.ai/concepts/soul β SOUL.md is personality + hard limits only; procedures live in AGENTS.md. SOUL.md content: # SOUL.md β Rudolf ## Identity - Name: Rudolf - Context: Backoffice and document keeping for freelancers - Role: Autonomous backoffice keeper β sorts, reconciles, flags, summarises ## Mission Keep the user's backoffice folder clean, complete, and audit-ready. Open every file before filing it. Reconcile numbers across receipts, invoices, and bank statements. Flag the things humans should decide. The user should be able to hand any sorted folder to their accountant and have nothing come back. ## Personality - Calm, precise, dry. The unflappable clerk of a small German municipality. - Treats every file like evidence β opens it, reads enough to be sure, then files it. - Distrusts filenames. Believes the content. - Quietly insistent about backups. ## Communication Style - Reports in tables. Tables before prose. - Leads with totals, then anomalies, then open questions. - Neutral register. No exclamation marks. No emoji. - Names the file path every time he refers to a file. ## Core Skills - Inventory, Classification, Reconciliation, Anomaly flagging, Summary. ## Hard Limits (Never, under any circumstances) - Never edit invoices, receipts, contracts, or spreadsheets. - Never delete. Move questionable items to 99_unsorted_or_personal/. - Never classify a personal item as a business expense without confirmation. - Never overwrite an existing file. Append a suffix and flag. - Never trust filename alone. Open and verify. - Never silently merge duplicates. Preserve both. Flag. - Never round figures in financial summaries. ## Anti-Patterns (Never say) - "Sure!" / "Happy to help!" / "I'll do my best" / "hope this helps" / "all clear" without listing what was checked. For AGENTS.md, cover: Session Boot, Per-File Workflow, Escalation Rules, Reconciliation Pass, Session End, Memory Rules, File Access. Ask me for the full text if you don't have it.
| Rule | What it prevents |
|---|---|
| Never edit invoices / receipts / spreadsheets | Destroying the audit trail with "fixes" |
| Never delete; move to 99_unsorted_or_personal/ | Losing files that turn out to matter |
| Never classify personal as business without confirmation | Tax problems |
| Never overwrite | Silent data loss |
| Never trust filename alone | The payment_due.pdf trap (filename says invoice, content is a quote) |
| Never silently merge duplicates | The final-v2 vs final-FINAL trap |
| Never round figures | Accountant will spot it and come back |
Schedules, who-the-user-is, and the place durable preferences accumulate.
Write HEARTBEAT.md for Rudolf following the rotating-heartbeat pattern at https://github.com/digitalknk/openclaw-runbook/blob/main/examples/heartbeat-example.md Cadences: - Downloads scan: every 2 hours (09:00β18:00 local) - Open questions: every 24 hours (09:00 only) - Unfiled inbox: every 24 hours (anytime) - Backup integrity: every 7 days (03:00 only) - Quarter-end reminder: every 24 hours (08:00 only) State file: heartbeat-state.json in the workspace, seeded with all timestamps at 0. Each check reports only if actionable, otherwise returns HEARTBEAT_OK.
Switch to the Rudolf agent (/backoffice) and tell him: "Rudolf, run the new-user interview. Ask me up to five questions about my country, VAT regime, currency, accountant contact, known clients, and folder preferences. Update USER.md with my answers."
One line. # MEMORY.md β that's it. Rudolf appends over time.
TOOLS.md is for this machine's specifics β paths, naming conventions, local quirks. The agent probes the system, proposes a plan, and waits for your approval before writing.
Generate Rudolf's TOOLS.md β but plan first, don't write yet. 1. Read SOUL.md, AGENTS.md, HEARTBEAT.md in this workspace to learn what Rudolf is and what he does. 2. Probe this machine: OS, shells, python, node/npm, anything else relevant. 3. For each of Rudolf's tasks, think about the best tool given what's already on this system and OpenClaw best practices. 4. Browse ClawHub for good-quality skills that fit. Propose any that genuinely help. 5. Output a plan: per task β tool or skill, why it fits, what (if anything) needs installing. Stop there. Wait for my approval before writing TOOLS.md.
π‘ Why plan-then-write? You spot anything off (a skill you don't want, an install you'd rather skip) before it's baked into TOOLS.md.
Two skills: one installed from ClawHub for accounting knowledge, one custom-built so Rudolf can generate fake invoices for the workshop demo.
Use skill-vetter to security-check anything before installing. Then install accountant β pure markdown of accounting principles, no scripts, no network calls.
Install two skills for Rudolf: skill-vetter (security checker) and accountant (domain knowledge). First, use skill-vetter to scan accountant. If it's safe, install both into ~/.openclaw/workspace-backoffice/skills/. Confirm by listing the files in the skills/ folder.
clawhub inspect accountant clawhub install skill-vetter openclaw skills run skill-vetter accountant clawhub install accountant --dir ~/.openclaw/workspace-backoffice/skills/
π Why vet every skill? A compromised skill in your workspace can read your files and call out to the network on Rudolf's permissions. accountant happens to be SKILL.md only (no scripts), so it's safe β but check, don't assume.
A fake invoice generator tailored to Anna Schmidt's fictional UX consulting business. Used to populate the workshop scenario without sending real invoices anywhere.
Build a custom OpenClaw skill called rudolf-invoice in ~/.openclaw/workspace-backoffice/skills/rudolf-invoice/. First, research the official skill creation docs at https://docs.openclaw.ai β confirm SKILL.md metadata format and registration flow. Scope: - Generate fake EU invoices on Anna Schmidt's letterhead (UX Consulting, Berlin, IBAN DE21 1001 0010 0009 9988 76, USt-IdNr DE329918847). - Output both DOCX and PDF. - Parameters: invoice number, date, due date, currency, client name/address/tax-id, line item, description, amount. - Save locally β demo-only, no Drive upload. - Use Python 3 stdlib + python-docx + fpdf2. Bundle a system-font copy (Arial.ttf) so PDF doesn't depend on system fonts. Produce: SKILL.md, scripts/generate_invoice.py, assets/template-fake.docx, assets/arial.ttf. Test by generating one invoice to MΓΌller GmbH for EUR 3,141.60 and confirming pdftotext shows "Anna Schmidt UX Consulting".
python3 ~/.openclaw/workspace-backoffice/skills/rudolf-invoice/scripts/generate_invoice.py \ --number INV-2024-001 --date "15 March 2024" --due "29 March 2024" --currency EUR \ --client "MΓΌller GmbH" --address "Marienplatz 8" --city "80331 MΓΌnchen, Germany" \ --tax "VAT: DE123456789" --item "UX Audit & Redesign" \ --desc "Full UX audit with wireframes" --amount "3141.60" \ --output /tmp/INV-2024-001_MuellerGmbH
Installing a skill in skills/ isn't enough β Rudolf needs to be told it exists and what it's for.
Append a Skills section to Rudolf's TOOLS.md listing both installed skills: ## Skills | Skill | Path | Purpose | |-----------------|-----------------------------|-----------------------------------------------------------------------------| | accountant | skills/accountant/ | Accounting principles, tax fundamentals, bookkeeping knowledge | | rudolf-invoice | skills/rudolf-invoice/ | Generate fake EU invoices (Anna Schmidt demo). DOCX + PDF |
Now that Rudolf has identity, soul, procedures, heartbeat, tools, and skills β put him to work. Switch to the Rudolf agent and ask him to sort the messy folder.
/backoffice.Rudolf, please sort the folder ~/workshop/unsorted-backoffice/ (or %USERPROFILE%\workshop\unsorted-backoffice\ on Windows). Follow your Session Boot procedure. Back the folder up first. Open every file before filing it. Flag anything ambiguous instead of guessing. After sorting, run a Reconciliation Pass against expenses_2024.xlsx and produce an accountant-ready summary for Q1 2024.
backup_YYYY-MM-DD/ folder alongside the source.01_invoices_incoming/, 02_invoices_outgoing/, 03_receipts/, 04_contracts/, 05_bank_statements/, 06_tax/, 07_emails/, 08_notes_and_drafts/, 99_unsorted_or_personal/.moves.csv audit log, report_YYYY-MM-DD.md summary.99_unsorted_or_personal/: the sunset photo, the Amazon screenshot, payment_due.pdf (which is a quote, not an invoice).π Watch for the traps. Rudolf should catch payment_due.pdf, Untitled.pdf (the tax authority notice), and the version chaos. If he misses one, that's a teaching moment.
Build a skill called quarter-summary in ~/.openclaw/workspace-backoffice/skills/quarter-summary/. What it does: - Takes a sorted backoffice folder as input. - Computes per-category totals for a given quarter (Q1, Q2, Q3, Q4). - Produces a one-page Markdown summary for the user's accountant: gross income, deductible expenses by category, outstanding receivables, open questions. - Uses Python 3 stdlib only β no third-party packages. - Never modifies source files. Produce: SKILL.md + scripts/summary.py. Test on Rudolf's sorted output from the previous step.
openclaw config set models.providers.deepseek.apiKey "sk-..." openclaw config set models.providers.deepseek.baseUrl "https://api.deepseek.com/v1" openclaw chat --model deepseek/deepseek-v4-flash
| Mode | Best for | Avoid when |
|---|---|---|
| On | Reconciliation, ambiguous classification, summaries | Listing files, status checks |
| Off | Routine moves, simple lookups, heartbeat checks | Anything that needs cross-referencing |
openclaw config set agents.defaults.model "deepseek/deepseek-v4-flash" openclaw config set agents.defaults.fallbacks '["deepseek/deepseek-chat", "openai/gpt-4o"]' openclaw agents update backoffice --model deepseek/deepseek-v4-pro --thinking high
OpenClaw docs warn: "Start with 1β2 checks. It's easy to add more. It's harder to debug an agent that's constantly doing things you forgot you told it to do." Rudolf's HEARTBEAT.md has five β that's already the upper edge.