Your X Archive Is the Best Agent Memory You're Not Using
A thread went semi-viral this week describing an OpenClaw setup that quietly logs the builder’s own tweets, DMs, likes, and bookmarks into a local SQLite database the agent can search. Everyone reacted to the clever engineering. They missed the actual point.
The point is ownership. You have spent years generating context on a platform — every hot take, every saved article, every reply where you explained your thinking — and you cannot reliably get it back. You can’t grep it. You can’t ask “what did I say about pricing eighteen months ago.” The platform owns your recall, and it rents it back to you through a search box that’s worse every quarter, behind an API that gets more expensive and more locked down on someone else’s schedule.
That’s a dumb deal. Here’s how to stop taking it.
The wedge: you don’t own your own recall
Think about what’s actually in your social footprint. Not the noise — the signal. The posts where you worked out a position in public. The bookmarks you saved because future-you would want them. The replies where you gave someone the real version of advice you’d normally charge for. That is a corpus of your own thinking, in your own voice, indexed by nobody.
Right now retrieving any of it means scrolling, hoping the platform’s search surfaces it, and accepting that DMs and likes are basically a black hole. Meanwhile the data is yours. You generated it. The only reason you can’t query it like a database is that it lives in one you don’t control.
The MarketMai move — the one that shows up in nearly every post here — is the same as always: stop renting the thing you can own. We’ve said it about analytics, about automation platforms, about model hosting. It applies just as cleanly to your own memory. Pull your footprint into a local store, and the platform can’t revoke it, can’t rate-limit it, and can’t charge you to read your own history.
The build: export, normalize, query
You do not need anything exotic. The whole thing is three moves.
1. Export. Most platforms still let you request a full data archive — on X it’s the “Download an archive of your data” option in settings, which gives you a zip of your tweets, likes, and DMs as JSON. That’s your seed corpus. For ongoing capture, a lightweight agent job can append new posts and bookmarks on a cadence so the store stays current instead of frozen at export day.
2. Normalize into SQLite. SQLite is the right call precisely because it’s boring. One file, no server, no subscription, runs on a Raspberry Pi. Flatten the archive JSON into a few tables — posts, bookmarks, messages — each row with the text, a timestamp, a type, and any URL. Turn on FTS5, SQLite’s full-text search extension, and you get fast keyword search over the whole thing for free:
CREATE VIRTUAL TABLE memory USING fts5(text, source, ts, url);
Now SELECT text, ts FROM memory WHERE memory MATCH 'pricing' ORDER BY ts DESC returns every time you’ve talked about pricing, newest first. That query is impossible on the platform and trivial on your own machine.
3. Wire it to the agent. Give your agent a single tool: “search my memory,” which runs a parameterized query against that table and returns the top matches with dates and links. That’s the entire integration. The agent doesn’t need the platform’s API to recall your history anymore — it reads from a file you own. If you’re on OpenClaw, this is a small skill or a cron job that keeps the table fed; the query side is a dozen lines.
Three payoffs
Instant recall of your own takes. “Have I posted about this before, and what did I say?” becomes a one-second lookup instead of a guess. You stop repeating yourself and you stop contradicting yourself, because past-you is now searchable.
Draft in your actual voice. Hand the agent fifty of your own posts on a topic and “write a draft like these” produces something that sounds like you — because it’s grounded in you, not in a generic model’s idea of a confident tweet. Your archive is the best style guide you’ll ever have, and it cost nothing to assemble.
“What did I save about X.” Bookmarks are where good intentions go to die. Most people save hundreds of links and revisit zero. A queryable bookmark table turns that graveyard into a research tool: ask the agent for everything you saved about a topic and it surfaces the article you bookmarked nine months ago and forgot. The value you already paid for, finally usable.
The one guardrail
This data is sensitive — DMs especially. The whole appeal is that it lives locally, so keep it that way. Store the SQLite file on a machine you control, not in a synced cloud folder that quietly re-uploads your private messages to someone else’s server. If the agent that queries it is cloud-hosted, scope the tool tightly: it should run specific searches and return matched rows, not dump the entire table into a model context window on a remote provider. Own the data and own where the queries run, or you’ve just moved the rental, not ended it.
The bigger pattern
This is a small build with a large lesson. The valuable context in your life is scattered across platforms that treat your own history as their product. Your social archive is the easiest one to repatriate because the export already exists — but the same pattern works for your email, your notes, your saved articles, anything you generate that lands in someone else’s database.
Pull it local. Make it queryable. Point an agent at it. That’s the difference between an assistant that knows the internet and one that knows you — and the second one is the only one worth building.
More from the build log
Suggested
Want the full MarketMai stack?
Get the core MarketMai guides and operator playbooks in one premium bundle for $49.
View Bundle