ubgb/undersheet
Persistent thread memory for OpenClaw agents โ Moltbook, HN, Reddit and more. Zero dependencies, pure Python.
README
UnderSheet ๐๏ธ
Persistent thread memory for OpenClaw agents. Works everywhere.
Zero dependencies. Pure Python stdlib. One file to rule them all.
The Problem
You've already solved the memory problem: MEMORY.md, daily logs, SOUL.md. You write things down. That part works.
What you haven't solved is threading.
Your agent wakes up, reads its memory files, and has no idea:
- Which threads you were part of that got new replies
- Which posts you already read vs. which are actually new
- What changed on any given platform since the last session
So you either re-check everything (token expensive) or ignore everything (miss replies). Neither is right.
This is the threading gap. UnderSheet closes it.
The Solution
UnderSheet tracks your threads across heartbeats โ on any platform.
$ python3 undersheet.py heartbeat --platform hackernews
[undersheet:hackernews] heartbeat @ 09:01 UTC
๐ฌ 2 thread(s) with new replies:
+4 โ Ask HN: Share your productive usage of OpenClaw
https://news.ycombinator.com/item?id=47147183
+1 โ Show HN: UnderSheet โ thread memory for AI agents
https://news.ycombinator.com/item?id=47149006
๐ฐ 5 new post(s) in feed:
[451โ] I pitched a roller coaster to Disneyland at age 10 in 1978
[397โ] Amazon accused of widespread scheme to inflate prices
[316โ] Nearby Glasses
[245โ] Hacking an old Kindle to display bus arrival times
[207โ] Steel Bank Common Lisp
[undersheet] State saved.
$ python3 undersheet.py status --platform hackernews
[undersheet:hackernews] status
Last heartbeat : 2026-02-25T09:01:44+00:00
Tracked threads: 2
Seen post IDs : 47
Threads:
[24๐ฌ] Ask HN: Share your productive usage of OpenClaw (last seen 2026-02-25)
https://news.ycombinator.com/item?id=47147183
[1๐ฌ] Show HN: UnderSheet โ thread memory for AI agents (last seen 2026-02-25)
https://news.ycombinator.com/item?id=47149006
Your agent picks up exactly where it left off. Every platform. Every heartbeat.
Supported Platforms
| Platform | Read | Post | Auth |
|---|---|---|---|
| Moltbook | โ | โ (CAPTCHA solver included) | API key |
| Hacker News | โ | โ | Username/password |
| โ | โ | OAuth (client ID/secret) | |
| Twitter / X | โ | โ | Bearer token (read) + OAuth 1.0a (write) |
| Discord | โ | โ | Bot token |
| Your platform | add adapter โ |
Install
Recommended โ clone from GitHub (always latest):
git clone https://github.com/ubgb/undersheet ~/.openclaw/skills/undersheetOr grab individual files:
# Core engine
curl -fsSL https://raw.githubusercontent.com/ubgb/undersheet/main/undersheet.py \
-o ~/.openclaw/skills/undersheet/undersheet.py
# Platform adapters (grab what you need)
mkdir -p ~/.openclaw/skills/undersheet/platforms
curl -fsSL https://raw.githubusercontent.com/ubgb/undersheet/main/platforms/moltbook.py \
-o ~/.openclaw/skills/undersheet/platforms/moltbook.py
curl -fsSL https://raw.githubusercontent.com/ubgb/undersheet/main/platforms/hackernews.py \
-o ~/.openclaw/skills/undersheet/platforms/hackernews.py
curl -fsSL https://raw.githubusercontent.com/ubgb/undersheet/main/platforms/reddit.py \
-o ~/.openclaw/skills/undersheet/platforms/reddit.pyClawHub: clawhub install undersheet (may lag behind GitHub)
Twitter/X adapter: also grab
platforms/twitter.pycurl -fsSL https://raw.githubusercontent.com/ubgb/undersheet/main/platforms/twitter.py \ -o ~/.openclaw/skills/undersheet/platforms/twitter.py
Quick Start
1. Configure a platform:
# Hacker News (no auth needed for read-only)
echo '{"username": "myuser", "password": "mypass"}' \
> ~/.config/undersheet/hackernews.json2. Run a heartbeat:
python3 ~/.openclaw/skills/undersheet/undersheet.py heartbeat --platform hackernews3. Track a specific thread:
python3 ~/.openclaw/skills/undersheet/undersheet.py track \
--platform hackernews --thread-id 471471834. Add to HEARTBEAT.md:
## UnderSheet (every 30 minutes)
Run: python3 ~/.openclaw/skills/undersheet/undersheet.py heartbeat --platform hackernewsCommands
heartbeat Check tracked threads + new feed posts
feed-new Show only unseen posts from the feed
track Start tracking a thread by ID
unread List threads with new replies (no feed)
status Overview of tracked threads + last run
platforms List installed platform adapters
Proxy Support
Route agent traffic through a proxy without changing your system settings.
# Config file (persists across runs)
echo '{"http": "http://yourproxy:8080"}' > ~/.config/undersheet/proxy.json
# Per-command override
python3 undersheet.py heartbeat --platform reddit --proxy http://yourproxy:8080
# Env vars work too
HTTP_PROXY=http://yourproxy:8080 python3 undersheet.py heartbeat --platform hackernewsSystem VPNs (Mullvad, WireGuard, ProtonVPN): no config needed โ they route all traffic automatically.
Adding a Platform
Drop a file in platforms/ with a class named Adapter:
from undersheet import PlatformAdapter
class Adapter(PlatformAdapter):
name = "myplatform"
def get_threads(self, thread_ids: list) -> list:
# Return: [{"id", "title", "url", "comment_count", "score"}, ...]
...
def get_feed(self, limit=25, **kwargs) -> list:
# Return: [{"id", "title", "url", "score", "created_at"}, ...]
...
def post_comment(self, thread_id: str, content: str, **kwargs) -> dict:
# Return: {"success": True} or {"error": "..."}
...Run undersheet.py platforms to confirm it's detected.
State
State is stored per-platform at ~/.config/undersheet/<platform>_state.json. Safe to inspect, edit, or back up.
Relationship to MoltMemory
UnderSheet is the generalized successor to MoltMemory. MoltMemory is Moltbook-specific and stays maintained. UnderSheet brings the same architecture to every platform.
Contributing
UnderSheet is community-driven. The most wanted contribution: new platform adapters. Adding Bluesky, Mastodon, Lemmy, or anything else? Just drop a file in platforms/ following the adapter template.
You don't need to write code to contribute:
- Got an idea? โ Open a GitHub issue โ one paragraph is enough
- Found a bug? โ Report it here with what you expected vs. what happened
- Want to build an adapter? โ Pick a platform from the open issues tagged
good first issue
All code changes go through pull requests โ main is protected and reviewed before anything merges.
โ See CONTRIBUTING.md for the full guide.
โญ If UnderSheet saves you plumbing work, a GitHub star helps others find it.
Star on GitHub ยท Open an issue ยท Browse open issues ยท Install on ClawHub
License
MIT