Note (April 2026): This project is currently on hold. I'm focusing on other work for the foreseeable future.
$ npx -y skills add gavdalf/total-recall --agent claude-code
Note (April 2026): This project is currently on hold. I'm focusing on other work for the foreseeable future. The code works, the docs are accurate, and issues/PRs are welcome, but response times will be slower than usual. See #22 for details.
Autonomous memory for OpenClaw-style agents.
Total Recall v2.0 keeps the existing v1.x stack intact:
It also adds the Ambient Intelligence Engine (AIE): a configurable sensor and rumination pipeline that can watch external systems, think about what changed, maintain a preconscious buffer, and surface urgent items.
Prerequisites: python3, jq, curl, and PyYAML.
Install PyYAML with:
python3 -m pip install PyYAML
# or on Debian/Ubuntu:
sudo apt install python3-yaml
setup.sh will verify all dependencies are present before continuing.
Observer -> observations.md -> Reflector -> Dream Cycle -> session recovery / watcher
sensor-sweep
-> enabled connectors emit events to memory/events/bus.jsonl
-> rumination-engine reads new events and writes structured insights
-> preconscious-select scores recent insights into memory/preconscious-buffer.md
-> ambient-actions optionally enriches insights with read-only lookups
-> emergency-surface pushes urgent alerts through configured channels
-> buffer-inject sends the latest buffer back into the live session
The AIE flow is additive. None of the v1.x scripts are removed or replaced.
git clone https://github.com/gavdalf/total-recall.git
cd total-recall
bash scripts/setup.sh
config/aie.yaml.workspace if you do not want to use the repo root../.env or your shell environment.bash scripts/sensor-sweep.sh --dry-run
bash scripts/rumination-engine.sh --dry-run
bash scripts/preconscious-select.sh --dry-run
bash scripts/ambient-actions.sh --dry-run-actions
*/15 * * * * OPENCLAW_WORKSPACE=/path/to/total-recall bash /path/to/total-recall/scripts/sensor-sweep.sh >> /path/to/total-recall/logs/sensor-sweep.log 2>&1
17,47 * * * * OPENCLAW_WORKSPACE=/path/to/total-recall bash /path/to/total-recall/scripts/preconscious-select.sh >> /path/to/total-recall/logs/rumination.log 2>&1
19,49 * * * * OPENCLAW_WORKSPACE=/path/to/total-recall bash /path/to/total-recall/scripts/emergency-surface.sh >> /path/to/total-recall/logs/emergency-surface.log 2>&1
Minimal first-run path:
filewatchmodelsAll new AIE behavior is controlled by config/aie.yaml.
workspace: root directory for memory, logs, health data, and .envpaths: all file and directory locations used by AIE scriptsprofile: assistant/user labels and timezone used in prompts and quiet hoursapi: shared API metadata such as the outbound HTTP referermodels: model IDs for rumination, classification, enrichment, and ambient actionsconnectors: per-connector enable flags, high-importance sender patterns, and connector-specific settingsnotifications: quiet hours plus Telegram, Discord, and generic webhook deliverythresholds: cooldowns, pruning windows, emergency thresholdsambient_actions: global action toggle plus read-only tool settingsEach connector now checks its own enabled flag before doing any work:
connectors.calendar.enabledconnectors.todoist.enabledconnectors.ionos.enabledconnectors.gmail.enabledconnectors.fitbit.enabledconnectors.filewatch.enabledThe orchestrator in scripts/sensor-sweep.sh also skips disabled connectors.
Set your own model IDs here:
models:
rumination: <model-id>
classification: <model-id>
enrichment: <model-id>
ambient_actions: <model-id>
The AIE scripts no longer hardcode user-specific model selections.
notifications:
quiet_hours:
enabled: true
timezone: UTC
start_hour: 22
end_hour: 7
telegram:
enabled: false
bot_token: ""
chat_id: ""
discord:
enabled: false
webhook_url: ""
webhook:
enabled: false
url: ""
headers: {}
emergency-surface.sh will only send through enabled channels. If no channel is enabled, it exits without error.
Everything that was previously tied to ~/clawd is now configurable under paths, including:
.env fileKey defaults:
thresholds:
rumination_cooldown_seconds: 1800
rumination_staleness_seconds: 14400
sensor_prune_hours: 48
emergency:
importance: 0.85
expires_within_seconds: 14400
max_alerts_per_day: 2
calendar
accountcalendar_idlookahead_daysmax_eventskeyring_passwordgmail
accountquery (default newer_than:3h)max_messageskeyring_passwordionos
accountquery (recent or unread)max_messagesconnectors.scoring
modelbatch_sizecache_thresholdsender_cache_fileconnectors.high_importance_senders
["mycompany", "school", "hospital", "accountant", "bank"]fitbit
sleep_target_hoursshort_sleep_minutesgreat_sleep_minuteswatch_off_minuteswatch_uncertain_minutesresting_hr_thresholdweight_target_lbssteps_milestonefilewatch
watch_filesambient_actions
enabledmax_actionsaction_budget_secondsweather_urlplaces.default_latplaces.default_lngplaces.default_limitambient_actions.tool_settings
calendar_lookup.gog_accountcalendar_lookup.gog_keyring_passwordgmail_search.gog_accountgmail_search.gog_keyring_passwordgmail_read.gog_accountgmail_read.gog_keyring_passwordionos_search.accountfitbit_data.enabledopenrouter_balance.enabledweb_search.enabledweb_search.scriptplaces_lookup.enabledambient-actions.sh reads enriched rumination insights and decides what to do with them. Five action types are supported, each with guardrails to prevent runaway behaviour:
| Action | Description | Guardrails |
|---|---|---|
ask | Surfaces a question to the user via preconscious buffer | Max 3/run |
learn | Stores a confirmed fact to learned-facts.json | Importance >= 0.7, dedup, max 5/run |
draft | Prepares content for user review in drafts/ | Importance >= 0.75, max 2/run |
notify | Sends an urgent alert via emergency-surface | Importance >= 0.85, max 2/day, quiet hours respected |
remind | Creates a time-based nudge in reminders.jsonl | Auto-surfaces when due, max 3/run |
The AIE creates several files in memory/rumination/ during operation:
learned-facts.json — facts the engine has confirmed and stored autonomouslyreminders.jsonl — pending time-based nudgesdrafts/ — content prepared for user review (one .md file per draft)cycle-state.json — working memory: tracks lookups between cycles with TTL-based dedup (4hr window)For best results, have your agent read memory/rumination/learned-facts.json and check memory/rumination/drafts/ at session start. This surfaces what the AIE has learned and prepared between sessions.
The original observer / reflector / dream-cycle flow still works as before. The v1.x scripts continue to read their existing environment variables and paths. The new AIE config does not remove that compatibility layer.
See:
| Path | Purpose |
|---|---|
scripts/observer-agent.sh | v1.x observer |
scripts/reflector-agent.sh | v1.x reflector |
scripts/dream-cycle.sh | v1.x nightly consolidation helper |
scripts/sensor-sweep.sh | AIE connector orchestrator |
scripts/rumination-engine.sh | AIE reasoning pass |
scripts/preconscious-select.sh | buffer scorer/selector |
scripts/ambient-actions.sh | read-only enrichment loop |
scripts/emergency-surface.sh | urgent alert surfacing |
scripts/buffer-inject.sh | inject buffer back into active session |
scripts/connectors/*.sh | pluggable AIE sensors |
config/aie.yaml | AIE runtime configuration |
MIT. See LICENSE.
total-recall is a Claude Code plugin with 1 hand-picked skill, indexed on Flowy in the Agent Memory category. Install it with the command on its page. It includes total-recall. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it