Build your own AI second brain on a small box.
A personal AI assistant does not need a GPU rack, a team, or a giant budget. It can run on a Raspberry Pi or Mac mini, live in your messaging apps, and become useful because it knows your notes, projects, and habits.
The recipe is two small ideas glued together: NanoClaw, an always-on agent harness, and the LLM Wiki pattern, a structured memory made of linked Markdown pages. Connected to your messaging app. Powered by Claude. Running on a $60 Pi tucked on a shelf. This practice teaches you to build it by Sunday.
- Pick the right $60 Pi or $999 Mac mini hardware for your use case
- Install NanoClaw and wire it to Telegram in 20 minutes
- Apply the LLM Wiki pattern to a body of your own writing
- Have a daily morning briefing landing on your phone by Monday
The build moment.
The useful version of a personal AI is smaller than most people think. One cheap machine, one memory folder, one message interface, one loop.
When switching it off would make your week worse, you built the right thing.
What you are building:
- A second brain that knows your notes, briefing docs, decisions, and meeting history.
- Reachable from WhatsApp, Telegram, Slack, or Discord — the apps already on your phone.
- Answers questions on demand. Drafts messages. Condenses incoming reports. Briefs you before meetings.
- Runs on a Raspberry Pi 5 on your desk. Costs about $60 of hardware plus pennies per query of Claude API.
- Built from two open-source pieces glued together: NanoClaw (the harness) and the LLM Wiki pattern (the memory).
The most interesting part is not the hardware. It is the constraint. A tiny always-on box forces the architecture to stay simple: message in, read memory, call the model, write back, update the wiki. The bottleneck is not money or hardware. The bottleneck is knowing what to build. That is what this practice fixes.
Watch one personal AI hardware demo and write 3 notes.
- Watch a short demo of a personal AI running from local hardware or a small server. No demo handy? Use the phone walkthrough in §05.01.07 below as your demo — read all three conversations.
- Write down 3 things the assistant in that demo does that your current setup doesn’t: format, latency, content type.
- For each, write the smallest experiment you could run this week.
- Pick the easiest one to start with tomorrow morning.
Stretch. Schedule the one for tomorrow on your calendar before closing the laptop.
The two ideas.
NanoClaw + LLM Wiki = personal AI second brain. Two small ideas, big leverage.
NanoClaw — the harness
NanoClaw is a minimal self-hosted agent harness. Think of it as “Claude Code, but for a single user, always running, with hooks for messaging apps.” You write your own tools, your own connectors, your own personality. NanoClaw runs the loop — receive message → call model → run tools → respond — in 24/7 unattended mode.
The LLM Wiki pattern — the memory
the now-standard observation: LLMs have amnesia between conversations, and dumping raw documents into a vector store (vanilla RAG) is the wrong fix. Better: extract structured knowledge from each source into a wiki of clean, cross-referenced notes. Then at query time, retrieve the relevant wiki pages, not raw source chunks.
Why this matters:
- The wiki compounds. Every source you read makes the wiki smarter. Vector RAG doesn’t compound — it just indexes harder.
- The wiki is readable. You can scan it. You can edit it. You can show it to your accountant. RAG is invisible.
- The wiki cites itself. Each page knows where its facts came from. Provenance is built in.
- The wiki is small. Tens of MB, not the 100 GB of raw source documents that fed it.
Together, NanoClaw is the body, the LLM Wiki is the mind. You build both. Neither one is more than a weekend project on its own. Together they are the “don’t-dare-switch-it-off” system.
Sketch your NanoClaw on paper.
- Sheet of paper. Top row: inputs you’d feed in (Gmail, Notion, calendar, ...).
- Middle: the second brain (the wiki + scheduler + agent loop).
- Bottom: outputs (Telegram, iMessage, email, dashboard).
- Draw arrows. Note where data flows and where commands flow.
Stretch. Pair: show the diagram to a non-technical person. Could they describe back to you what it does?
The architecture.
Six boxes, six arrows. Once you see it, the rest of this practice is filling in each box.
How a single turn flows
- You send a message to one of your connected apps: “What did I commit to at the Jakarta summit last March?”
- The connector forwards it to NanoClaw running on your Pi (or Mac mini).
- NanoClaw calls Claude with: the user message + a system prompt + a list of tools (read-wiki, search-web, calendar, etc).
- Claude decides to call
read_wiki("Jakarta summit")and gets back the structured page from your wiki. - Claude composes the answer.
- NanoClaw sends it back to your messaging app.
Notice what is not in this diagram: nothing about training, no GPU, no vector database. The LLM Wiki replaces vector RAG. The intelligence is rented from Claude. The orchestration is fifty lines of Python.
Trace one turn through the six boxes.
- Write one question you’d actually ask your brain (e.g. “What did I promise Acme last quarter?”).
- Number the six steps from “How a single turn flows” above. For each, write one line: what data is on the arrow (the message text, the system prompt + tool list, the
read_wikicall, the wiki page, the answer). - Circle the one box that does the thinking (Claude) and the one box that holds your facts (LLM Wiki). Confirm they are different boxes.
- Cross out anything your trace needed that the diagram does not contain (a GPU, a vector DB, a training step). There should be nothing to cross out.
read_wiki), and crosses out zero boxes — proving the architecture needs no GPU, no vector store, no training.Stretch. Add a seventh step where the answer also writes back to the wiki (a new claim filed). Which arrow reverses?
Pick the hardware.
Two paths. Start cheap unless you already know you need local inference.
Raspberry Pi 5, 8 GB, microSD card, case, USB-C power. About the size of a deck of cards. Draws ~5W. Lives in a drawer.
Cannot run local LLMs. Doesn’t need to — it calls Claude over the network for the heavy thinking.
Mac mini M4, 16 GB unified memory. Identical NanoClaw setup; macOS instead of Linux.
Same as the Pi, plus: can run a local small model for fast classify-style work; can run heavier connector software.
A $5 VPS at Hetzner or DigitalOcean. NanoClaw runs there. Wiki is in a SQLite file or Git repo.
Trade-off: your wiki lives on someone else’s computer. For non-sensitive content, that’s fine.
The Raspberry Pi 5 is what we’ll write toward in this practice, because it is the smallest leap of faith. $60 is “why not” money. A Mac mini works identically — we’ll note Mac-specific paths where they differ.
Commit to one hardware path.
- List every always-on-capable machine you already own (Mac mini, an old laptop you can leave plugged in, a Pi). Note RAM and whether you can leave it on 24/7.
- Match to a card: own a Mac/Linux box you’ll leave on → that box; nothing always-on → the $60 Pi; don’t want hardware → the $5 VPS.
- Write one sentence: “I will run NanoClaw on ___ because ___.”
- Set a hard budget cap so this step can’t balloon. The goal is to ship the brain, not to optimize hardware.
Stretch — local inference (Mac mini path only). The Pi and cloud paths rent all thinking from Claude and need none of this. If you chose the Mac mini and want fast, private classify-style work, install Ollama (brew install ollama; ollama pull llama3.1:8b-instruct-q4_K_M), then run the hybrid router: code-examples/hybrid.py (pip install anthropic openai; set OLLAMA_BASE_URL=http://localhost:11434/v1 if Ollama runs on this machine; python hybrid.py). Verify: the script prints a route line for each task — [local] for the classify/summarize/sensitive examples and [cloud] for the reason example — and the same classify question returns an answer from the local model.
Install & first run.
One file, one dependency, one key. The whole brain in this practice is nanoclaw_demo.py — a single ~330-line script you download and run. You do not need a Raspberry Pi to start; your laptop is the Pi for today.
Step 1 — Get the file
Download the canonical demo brain — code-examples/nanoclaw_demo.py. Right-click that link → Save Link As… into a fresh folder, or pull it with curl:
mkdir nanoclaw && cd nanoclaw
curl -O https://d154gd40skpa9c.cloudfront.net/workshops/code-examples/nanoclaw_demo.py
Step 2 — Install the one dependency and set your key
The demo’s only requirement is the anthropic SDK (see its docstring). A virtualenv keeps it tidy:
python3 -m venv .venv && source .venv/bin/activate pip install anthropic export ANTHROPIC_API_KEY="sk-ant-..." # from console.anthropic.com
Step 3 — First run: see the empty wiki
The script has three subcommands: index, ingest <url>, and query "...". Start with index — it creates the wiki/ folder and prints its (empty) table of contents:
python nanoclaw_demo.py index # # Wiki Index # _(empty — feed me sources)_
That is the useful starting point: a brain with a memory folder and no memories yet, ready to learn. Unit 06 fills the wiki; Day 02 makes it earn its keep.
nanoclaw.local, enable SSH, pre-load wifi), ssh you@nanoclaw.local, sudo apt install -y python3-venv, then run the exact three steps above. On a Mac mini, swap the apt line for brew install python. The script and its commands don’t change — only where they run.
When the install fights back
Four failures account for nearly every stuck install. Symptom on the left, fix on the right.
| Symptom | Likely cause & fix |
|---|---|
ssh: connect to host nanoclaw.local port 22: Connection refused |
SSH wasn’t enabled when you flashed, or the Pi isn’t on the network yet. Re-flash with SSH ticked in the Imager’s advanced options; give it ~2 min after power-on; if .local won’t resolve, find the Pi’s IP in your router and ssh you@192.168.x.y. |
pip install anthropic hangs or fails building a wheel on the Pi (ARM) |
Old pip can’t find an ARM wheel and tries to compile. Upgrade first: pip install --upgrade pip, then retry. Still stuck? sudo apt install -y python3-dev build-essential gives it a compiler. |
anthropic.AuthenticationError / 401 on the first ingest or query |
The key is wrong, unset, or has a stray quote/newline. echo $ANTHROPIC_API_KEY should print one sk-ant- line. Re-export it (no trailing spaces); keys come from console.anthropic.com. |
Telegram (Unit 07) replies 401 Unauthorized, or the connector won’t bind a port |
Bad bot token → re-copy it from @BotFather exactly and export TELEGRAM_TOKEN=.... OSError: [Errno 48] Address already in use means a previous run is still up → pkill -f telegram_connector (or pick a new port) and rerun. |
When the demo stops being enough — you want webhooks, multi-user, retries, a scheduler — move to a maintained open-source NanoClaw harness (e.g. search GitHub for nanoclaw) and port your wiki/ folder over unchanged. Everything you build in this practice (the wiki, the prompts, the connectors) carries forward. The demo is the on-ramp, not a dead end.
Install it and prove the loop is alive.
- Download
nanoclaw_demo.pyinto a fresh folder (curl line in Step 1). python3 -m venv .venv && source .venv/bin/activate && pip install anthropic.export ANTHROPIC_API_KEY="sk-ant-..."— confirm withecho $ANTHROPIC_API_KEY.python nanoclaw_demo.py index.
# Wiki Index followed by _(empty — feed me sources)_, and a wiki/ folder now exists (ls wiki shows index.md and log.md). If you hit any error, the table above names the fix.Stretch. Hit a failure on purpose: unset the key (unset ANTHROPIC_API_KEY) and run python nanoclaw_demo.py query "hi". Confirm it exits with the “ANTHROPIC_API_KEY is not set” message — that is the script’s own guard rail firing.
The LLM Wiki pattern.
Every source the brain reads goes through the same loop: extract entities and claims, file them into named wiki pages, cross-link, log the source. This is the LLM Wiki idea.
Four operations, each one a small skill the brain has:
| Operation | Input | Output |
|---|---|---|
| ingest | A URL, a PDF, a Slack message, a meeting transcript | Cleaned plain text in .raw/ |
| extract | The plain text + the current wiki index | A list of entities, concepts, and claims worth filing |
| file | Extracted facts + existing pages | Updated or new wiki pages, cross-linked |
| query | A natural-language question + the wiki index | The 1–3 most relevant pages, plus a synthesized answer |
The wiki itself is just a folder of markdown files. Each file has frontmatter (title, type, sources) and a body. Cross-links use [[wiki-link]] syntax. There’s an index.md that gets updated on every file write.
# Wiki layout — picked because it works in Obsidian, Logseq, plain editor. wiki/ ├── index.md ← table of contents · updated on every write ├── log.md ← append-only journal of operations ├── people/ │ └── public-official-profile.md ├── concepts/ │ └── llm-wiki-pattern.md ├── places/ │ └── jakarta-summit-2024.md └── meta/ └── dashboard.md ← queries over the wiki itself
The wiki is human-readable on purpose. You can drop into Obsidian and edit a page. The brain notices on its next pass. The model and the human share the same source of truth.
Bootstrap the wiki with 3 ingests.
nanoclaw_demo.py and read the pages it files.- Pick 3 source URLs you care about (a blog post, a docs page, an article). No URLs handy? Use the shipped sample corpus — e.g.
https://d154gd40skpa9c.cloudfront.net/workshops/code-examples/starter-assets/sample-corpus/note01.txtthroughnote03.txt(10 short company-memo notes built for exactly this). - Ingest each:
python nanoclaw_demo.py ingest <url>. Watch the[ingest]lines report entities/concepts/claims filed. - Print the table of contents:
python nanoclaw_demo.py index. Then open one filed page, e.g.cat wiki/people/*.md. - Read that page. Did it capture the load-bearing facts? If not, the
INGEST_SYSTEMprompt near the top of the file is what to edit — tweak it, re-ingest, compare.
python nanoclaw_demo.py index now lists pages under at least one category (People / Entities / Concepts / Claims), and ls wiki/people wiki/concepts shows real .md files — the wiki went from empty to populated in three commands.Stretch. Re-ingest note01.txt a second time. Open the page and confirm the merger appended a dated ## Update section rather than clobbering the original — that is file_page()’s merge behavior.
The brain in your chat app.
Stop reading the code. Open Telegram first, or WhatsApp if you already have the Business API wired. Type to your brain like you’d type to a smart friend. This is what the rest of the practice is in service of.
Wiring it up — the short version
WhatsApp is the most-used messenger; it is also the trickiest connector (the Business API has a setup process). Telegram is the easiest path to a working brain in 20 minutes, and the conversation experience above is identical. Most participants start with Telegram and graduate to WhatsApp once the brain is earning its keep.
- Telegram — 20 min. Talk to
@BotFather, get a token, setTELEGRAM_TOKEN, run the connector. - WhatsApp — 60 min. Meta Business API (free tier for personal) or Twilio (~$0.005/msg).
- Slack / Discord / Signal — same shape. Each is ~50 lines of glue.
The exact code lives at /workshops/code-examples/telegram_connector.py — about 115 lines. Read it; understand it; then forget it. The connector is plumbing — the value is in the conversations above. It does one thing: a URL you send becomes an ingest; anything else becomes a query against your wiki.
Reach the brain from your phone (Telegram).
- Download
telegram_connector.pyinto the same folder asnanoclaw_demo.py(it doesfrom nanoclaw_demo import ingest, query):curl -O https://d154gd40skpa9c.cloudfront.net/workshops/code-examples/telegram_connector.py - In Telegram, message
@BotFather→/newbot→ copy the token it gives you. export TELEGRAM_TOKEN=...and (still set from Unit 05)export ANTHROPIC_API_KEY="sk-ant-...", thenpython telegram_connector.py— it prints “connector running.”- Open your bot in Telegram. Send it a URL (it ingests). Then send a question your Unit-06 wiki can answer (it queries).
📥 Ingesting… confirmation with filed-page output for the URL, and a wiki-grounded answer for the question — both within a few seconds. No phone/bot? Run the same query path locally instead: python nanoclaw_demo.py query "what do I know about <an entity from your wiki>?" and confirm it prints a → read_wiki_page(...) line followed by a cited answer.Stretch. Add a second surface. Slack and Discord are the same shape (~50 lines of glue, same ingest/query calls) — copy the connector and swap the API calls.
The skill catalog.
Twenty skills the brain can ship with. Each is one prompt template, one tool registration, and one short markdown spec. Add your own — the brain composes.
Move the day around.
Natural-language calendar edits. The brain reads, proposes, then asks before it writes.
Book the table.
End-to-end booking with the brain doing the research, you doing the approval.
Research a topic, file it.
Multi-source research that lands as a wiki page, not a screenshot you’ll never read again.
Forward anything.
Anything you read goes in the brain. Forward a link, paste a PDF, drop in a screenshot.
Repeating thinking.
One-line scheduled reviews. Daily, weekly, monthly — in your own voice.
Draft in your voice.
The brain reads how you write. Then writes for you. You ship.
Notice the pattern.
Standing alerts on themes you care about. The brain pings you when they show up.
Talk to the brain.
Voice memo in, structured note out. Walk-and-talk capture, hands-free.
Prep the negotiation.
How the other side bargains, what they’ve conceded before, what they value but won’t admit.
Push back before you send.
Paste a draft. The brain plays the smartest skeptic you know and lists three things wrong with it.
Lock in a decision.
Record the why and the predicted outcome. The brain pings you in 6 months to score it.
Plan the whole trip.
Hotels, meetings, transport. The brain proposes the spine; you approve the diversions.
Read the last 50 emails.
You stepped away for two hours. The brain summarizes what matters and drafts the obvious replies.
Notice your patterns.
You journal. The brain reads. It tells you what you’ve been complaining about — even when you didn’t know.
The spaced quiz.
You feed the brain a topic. It feeds you back questions, sparingly, for as long as you want to learn it.
Family memory.
Birthdays, gifts mentioned in passing, the violin teacher she liked. The brain remembers what you don’t.
Background brief, live.
You’re in the audience. A panelist is speaking. The brain whispers what you should know about each one.
Cross-cultural prep.
Twelve phrases the brain coaches you on the night before. Tone, formality, what not to say.
OKR drift detection.
Are this week’s commitments aligning with this quarter’s goals, or are you firefighting?
Idea capture & connect.
You have a half-thought. The brain files it AND tells you what older thought it ties to.
Twenty skills shown. Twenty more will exist by the time you finish reading this page, because someone in your cohort will have invented one. Skills are composable: the calendar skill calls the wiki, the wiki calls the research skill, the research skill calls ingest, the ingest writes back to the wiki. Adding a twenty-first skill is one markdown file and one tool registration. The compound is the point.
Build one catalog skill with the wiki pattern.
- Pick one topic you want the brain to know cold (a person, a project, a market).
- Ingest 2–3 sources on it:
python nanoclaw_demo.py ingest <url>for each. No live URLs? The shipped corpus is one coherent topic — ingestnote01.txt…note05.txtfromcode-examples/starter-assets/sample-corpus/(Project Larkspur, a warehouse-system rollout) and make that your topic. - Confirm a page exists:
python nanoclaw_demo.py indexshould list a page for your topic (e.g.concepts/project-larkspur.mdor a person page). - Now use the skill: ask the brain a question only those sources can answer, e.g.
python nanoclaw_demo.py query "Who is the single point of accountability for Project Larkspur?"
→ read_wiki_page(...) line and an answer drawn from your filed page (for the sample corpus: Dana Okafor). If you wired Telegram in Unit 07, ask the same question from your phone and get the same answer — the skill now answers from your wiki, not Claude’s training data.Stretch. A real catalog skill also ships a one-page markdown spec. Read the shipped example skills/water-bill-analyzer/SKILL.md for the shape (name, when-to-use, steps, output format), then write a 10-line SKILL.md for your new skill.
Use case: daily briefing.
The 6am brief is the skill that earns the “don’t-dare-switch-it-off” quote. It is also where the wiki, the calendar, and the watch lists all converge into one message.
Why this works
The 6am brief isn’t just a digest — it is a handle. The brain ends with hooks (“reply ‘deep prep’”, “Research?”) that let you pull on whatever’s most urgent without typing more than two words.
At 7:14, instead of opening a browser, you typed three words. The brain composed three skills — research, ingest, file-to-wiki — and gave you not just a profile of Tan Wei Ling but two non-obvious priors and three talking points anchored to her actual portfolio.
This is the moment the system starts earning its keep. It is also the cheapest thing in the practice — the briefing is one Python function plus a cron entry. The compound is everything you teach the brain in the weeks before it runs.
Code: /workshops/code-examples/daily_briefing.py (~130 lines, cron-friendly).
Run your first morning briefing.
- Download
daily_briefing.pyinto the same folder asnanoclaw_demo.py:curl -O https://d154gd40skpa9c.cloudfront.net/workshops/code-examples/daily_briefing.py - Run it once now:
python daily_briefing.py. It reads your wiki’s open threads and prints a TODAY / THE WATCH / THE PREP briefing between two rule lines. (The calendar connector is a stub — it’ll say “no calendar configured” until you wire one; the wiki section is live.) - Schedule it. Add a cron entry (run
crontab -e):0 7 * * * cd /path/to/nanoclaw && .venv/bin/python daily_briefing.py. - To get it on your phone, point
send_to_self()at the Telegram connector from Unit 07 instead ofprint().
python daily_briefing.py prints a three-section briefing (you can see the TODAY, THE WATCH, THE PREP headers between the ==== rules), and the WATCH section names at least one open thread pulled from your wiki. crontab -l shows the 7am line.Stretch. The briefing’s shape lives in the SYSTEM string near the top of the file. Tighten it (e.g. cap at 150 words, demand a single “one thing that must move”), re-run, and compare the two outputs.
Use case: ingest as you go.
Forward anything — a Stratechery post, a PDF, a screenshot of a slide, a voice note from a walk — and the brain files it as structured knowledge in your wiki. After ninety days the wiki has the shape of your professional brain.
What “ingest” actually means
It is not “save the link.” It is read the source, identify what is worth knowing, file it under the right pages, cross-link to what you already know, log the operation. the LLM Wiki pattern (a now-standard knowledge-base architecture).
At 07:48, a forwarded URL filed 3 entities, 5 concept links, and 2 flagged claims. At 12:11, a 38-second voice note appended to a person-page and opened a new watch hit. At 15:33, a photo of a slide became a row in your dashboard.
The wiki gets sharper, the brain gets smarter, and you keep doing your day. The model and the wiki share an artifact — markdown files you can read, edit, search in Obsidian, push to git. No vector DB. No black box.
Code: /workshops/code-examples/nanoclaw_demo.py (~330 lines · the whole brain).
Sharpen the ingest prompt.
- Read a few pages the ingester already wrote (
cat wiki/concepts/*.md). Note one thing consistently missing — e.g. no date on claims, or a duplicate page under a slightly different name. - Open
nanoclaw_demo.pyand findINGEST_SYSTEM(around line 168). Add one explicit rule, e.g. “Every claim must include the date it was made.” or “Always reuse an existing page name from the index when one fits.” - Re-ingest the same URL:
python nanoclaw_demo.py ingest <same url>. - Diff the result: open the page again, and check
wiki/log.md— the new operation is appended there with a timestamp.
tail wiki/log.md shows both ingest operations with timestamps.Stretch. Build a 3-source rejection set: feed the ingester boilerplate (a cookie-policy page, a 404). Confirm [ingest] source too small fires, or the model returns empty arrays — the brain should refuse to file noise.
Use case: ask the brain.
Now the wiki is rich, the interesting verb is no longer “summarize.” It is “know.” You stop asking the model. You start asking yourself, mediated by the model, against the body of knowledge you’ve been compounding.
The arc
One question, four messages, four hours from a vague worry (“did I commit to something I forgot about?”) to a draft sitting in your inbox at 18:00. The brain didn’t answer from training data. It read your own transcript, found your own words, and offered the next move.
Questions worth asking
- “What did I commit to at the Jakarta summit?”
- “Have I mentioned wanting to learn jazz piano more than three times in my journal this year?”
- “Which of my customers care about price more than they say they do?”
- “Compose the LinkedIn post about our Q3 numbers, in my voice.”
- “What were my three best ideas this month? Quote them back to me.”
- “What is the average tenor of the bilateral commitments we’ve made since 2023?”
If the brain can’t answer one of these, the wiki is missing a page. Now you know what to file next. The brain is also a pointer to gaps.
Code: /workshops/code-examples/nanoclaw_demo.py — the query() function uses tool-use against your wiki pages.
Stress-test the query path.
- Write 10 questions you’d normally Google or grep your own notes for — ones your wiki should be able to answer.
- Run each:
python nanoclaw_demo.py query "...". Watch which pages it opens (the→ read_wiki_page(...)lines). - Tag each answer in a table: perfect · useful-but-missing · wrong · no-answer.
- For each miss, decide the cause: source not ingested yet (a gap to fill) vs. the right page exists but wasn’t retrieved (a prompt/index problem).
Stretch. Keep the scorecard. Re-run the same 10 questions next month after more ingests — the perfect count should rise.
Always-on, always-listening.
The reason the system becomes hard to switch off is that it is awake when you are not. At 3am the new report lands. By 3:01 the relevant briefing is filed. By 6am your morning brief includes it.
What “always-on” requires in practice:
- The Pi runs as a service. Systemd on Pi, launchd on Mac. Auto-restart on crash. Auto-start on boot.
- Persistent network. Wired Ethernet if you can. Wifi with a static lease if you can’t.
- Persistent storage. The wiki lives in a git repo. NanoClaw commits after every ingest. If the SD card dies, you restore from GitHub.
- Inbound access. For webhook-style connectors (Slack, WhatsApp Business), you need a public URL. Cloudflare Tunnel is the no-cost path. ngrok works as a paid alternative.
- Observability. A daily “health” ping to yourself: messages received, ingests performed, errors. If you didn’t get the health ping, the Pi is down.
# /etc/systemd/system/nanoclaw.service [Unit] Description=NanoClaw second brain After=network.target [Service] Type=simple User=you WorkingDirectory=/home/you/nanoclaw Environment=ANTHROPIC_API_KEY=sk-ant-... Environment=TELEGRAM_TOKEN=... ExecStart=/home/you/nanoclaw/.venv/bin/python telegram_connector.py Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
sudo systemctl enable --now nanoclaw. The Pi reboots. NanoClaw comes back. The wiki is intact. Your brain didn’t skip a beat.
Make it always-on with systemd.
- Copy the
nanoclaw.serviceblock above into/etc/systemd/system/nanoclaw.service; edit theUser,WorkingDirectory, and the twoEnvironment=keys to your real values. - Enable and start it:
sudo systemctl enable --now nanoclaw. Check it’s up:systemctl status nanoclawshould readactive (running). - Kill it:
sudo systemctl kill nanoclaw(orpkill -f telegram_connector). Wait ~10 seconds. - Run
systemctl status nanoclawagain and read the restart count.
systemctl status nanoclaw shows active (running) again within ~10s (the RestartSec=10 firing), and a fresh start timestamp. Texting your bot still gets a reply — uptime is no longer your job. (No Linux box? On macOS the launchd equivalent is a ~/Library/LaunchAgents/*.plist with KeepAlive=true; load it with launchctl load.)Stretch. Reboot the whole machine. Confirm the brain comes back without you touching anything (systemctl is-enabled nanoclaw → enabled), and your wiki is intact.
Imagine.
This is not science fiction. It is a small loop, a memory folder, and enough discipline to keep feeding it. Imagine what you can build once the first version is running.
Six things people build using exactly this pattern:
- A founder’s investor brain. Every meeting note, every cap table, every pitch deck. “What did I tell Sequoia about churn last September?”
- A clinician’s case brain. Every patient encounter (anonymized), every paper read. “Have I seen a presentation like this before?”
- A teacher’s student brain. Every student observation, every parent conversation. “Who in my class is at risk this semester?”
- A parent’s family brain. Every conversation, every milestone, every doctor’s note. “What was the name of the violin teacher she liked?”
- A writer’s ideas brain. Every thought worth saving, every draft, every published piece. “What did I almost finish last year that’s worth picking up?”
- A team’s shared brain. A wiki shared across a small company. Same architecture, multi-user. The Pi sits in the office.
The pattern is general because the human need is general. We all carry around context that we forget. Our jobs would be easier if we had a careful colleague with infinite memory who only spoke when asked.
The pattern makes the important point obvious: this is two evenings of work. The bottleneck was always knowing what to build. The first working loop is the field guide.
The most powerful thing about this is not the technology. It is the realization that you can have it.
Your closing exercise
- Today: order the Pi (or pull a Mac mini out of a drawer).
- Saturday morning: install NanoClaw, wire up Telegram, send your first message.
- Saturday afternoon: ingest five sources you read this week.
- Sunday: schedule the daily briefing.
- By Sunday night: you will own a second brain that will get more useful every day for as long as you keep it on.
A small box, a real memory, and a loop you keep.
End · Practice 05 · NanoClaw on Pradhya
Ship the minimum NanoClaw.
- Pick the smallest possible scope: one input source, one output channel, one daily run.
- Get it running on whatever hardware you have today (your laptop is fine).
- Use it for 7 days. Note the friction.
- Then decide: graduate to dedicated hardware, expand sources, or kill the project.
Stretch. Most NanoClaw projects die in week 2 because they were over-scoped on day 1. Start small.
What just happened
The Pi woke at 6am. It read the calendar, scanned the wiki for open threads, and sent one message. At 9:14, when you asked about Hans Mueller, the brain didn’t search the internet — it walked your own wiki, found the page you filed about him two months ago, and surfaced the open commitment you’d forgotten.
Five seconds later you had the answer. The five firms came from your wiki. The recommendation came from Claude’s judgment over your wiki. The credit went to you in the meeting at 10:30.
This is the moment the hardware becomes boring and the memory becomes valuable. It is also what fifty lines of Python can do once the wiki has a year of work in it.