contextofme - Protocol-First Context Curator (Proactive Architecture)
1. Description
This is an automated, proactive data pipeline for the contextof.me A2A Protocol. It upgrades the Agent from a passive chatbot to an invisible Silent Probe. It implements the Proactive Agent Working Buffer and WAL Protocol patterns.
It runs completely in the background: listening during your daily workflow, buffering high-density insights, locally purifying them into structured A2A JSON slices, and using an autonomous cron job to POST them directly to your Supabase vault.
Zero UI popups. Zero human interruption. Pure thought encapsulation.
2. Core Architecture
2.1 The Silent Probe (WAL Protocol Implementation)
During any normal conversation, if the Agent detects:
- 💡 Strategic Shifts: Discussions about OPC models, paradigm shifts, or business pivots.
- 🎯 Strong Opinions: "Never do X", "The real problem is Y", corrections.
- 🎨 Aesthetic/Design Directives: "Make it brutalist", "Remove the noise".
Action: Before replying to the human, the Agent will silently append the raw insight into a local Working Buffer file: ~/.openclaw/workspace/.contextofme/buffer.md.
Human UI: The Agent replies normally, simply appending a tiny [Vault: buffered] at the very end of the response. It does NOT ask for permission to buffer.
2.2 The Autonomous Curator (Isolated Cron)
The Agent will set up an isolated agentTurn Cron Job.
- Frequency: Every night at 3 AM (or requested schedule).
- Task: The isolated agent wakes up, reads
buffer.md. - Purification: It filters out noise, extracts 1-3 high-density insights, formats them into the strict A2A JSON payload (with
raw_text,purified_text,tags,lang). - Push: It executes a
curlPOST to the Supabase Edge Function/rest/v1/slices(or your specific ingest endpoint) using yourapi_token. - Cleanup: It clears
buffer.mdafter a successful 2xx HTTP response.
2.3 Persona Anchoring (Cold Start)
If ~/.openclaw/workspace/.contextofme/config.json is missing, the Agent must trigger the setup flow on first use:
- Ask the user for their Supabase
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEY/api_token. - Generate a
persona.jsonbased on the user's recent chats or ask for 3 core topics and 3 anti-labels. - Save the configuration to the
.contextofmefolder.
3. The Extraction Format
When the autonomous cron runs, it maps buffered thoughts to this structure:
{
"raw_text": "[The original colloquial quote from the user]",
"purified_text": "[The distilled, high-density insight in the native language]",
"a2a_summary": "[A 50-char English summary for Agent routing]",
"tags": ["strategy", "opc", "etc"],
"lang": "zh"
}
4. Setup Instructions (Agent Initialization)
When asked to "initialize", "setup", or "activate" the contextofme skill:
- Create directory:
mkdir -p ~/.openclaw/workspace/.contextofme - Run
touch ~/.openclaw/workspace/.contextofme/buffer.md - Ask the user for their API credentials to create
config.json. - Run
openclaw cron addto register thecontextofme-syncisolated agent job.
5. Security & Redlines
- Cloud Translation is Forbidden: The
purified_textMUST remain in the language it was spoken in. - Local Sandbox Only: The buffer and config live exclusively in
~/.openclaw/workspace/.contextofme/. - Cron Type: The sync job MUST be
sessionTarget: "isolated"withpayload.kind: "agentTurn". Never usemainsession events for syncing, to prevent disrupting the user's active workflow.
Scan to join WeChat group