by lattice1992
Real-time context layer that converts user activity into actionable signals for OpenClaw.
# Add to your Claude Code skills
git clone https://github.com/lattice1992/Activity2Context-for-openclawChinese version: README.zh-CN.md
Imagine an agent that can "see what you see and track what you do."
When you want fast execution, you only provide the goal. You do not need to repeatedly feed background context every turn.
Activity2Context is a Runtime Hook, not a Skill.
Pipeline:
activity2context/memory.md into the OpenClaw system prompt.Outputs:
<workspace>/.openclaw/activity2context_behavior.md<workspace>/activity2context/memory.md<workspace>/activity2context/memory.semantic.jsonUsually no. Only aggregated memory.md is injected, not full raw logs.
Entity count is capped and ranked by recency/activity.
No comments yet. Be the first to share your thoughts!
By default, data is generated and stored locally.
However, if you use cloud models, injected memory.md content is sent with prompts to your model provider.
For sensitive environments, prefer local models or narrower capture scope.
The runtime is lightweight (polling + periodic aggregation). Raw logs are capped and trimmed, preventing unbounded I/O growth.
observer.maxBehaviorLines (default 5000).From repo root:
powershell -ExecutionPolicy Bypass -File .\install\windows\install.ps1 -Workspace "$PWD"
If your OpenClaw workspace is different from the current folder:
powershell -ExecutionPolicy Bypass -File .\install\windows\install.ps1 -Workspace "C:\path\to\your\workspace"
Control commands:
$env:USERPROFILE\.activity2context\activity2context.cmd status
$env:USERPROFILE\.activity2context\activity2context.cmd start
$env:USERPROFILE\.activity2context\activity2context.cmd stop
$env:USERPROFILE\.activity2context\activity2context.cmd index
From repo root:
bash ./install/macos/install.sh --workspace "$PWD"
Control commands:
~/.activity2context/activity2context status
~/.activity2context/activity2context start
~/.activity2context/activity2context stop
~/.activity2context/activity2context index
Required macOS permissions:
/usr/bin/python3)You only need memory.md injection. No Skill file is required.
openclaw config set hooks.internal.enabled true --strict-json
openclaw config set hooks.internal.entries.bootstrap-extra-files.enabled true --strict-json
openclaw config set "hooks.internal.entries.bootstrap-extra-files.paths[0]" "activity2context/memory.md"
More details: integrations/openclaw/README.md
Config file:
~/.activity2context/config.jsonTemplates:
config/activity2context.example.jsonconfig/activity2context.macos.example.jsonKey parameters:
observer.pollSecondsobserver.browserThresholdobserver.browserUpdateIntervalobserver.appThresholdobserver.appUpdateIntervalobserver.maxBehaviorLines (default 5000)indexer.intervalSecondsindexer.minDurationSecondsindexer.maxAgeMinutesindexer.maxTotalindexer.maxWebindexer.maxDocindexer.maxAppindexer.semanticOutput (structured JSON output path)indexer.appAliases (normalize process names, optional type hints)Windows:
powershell -ExecutionPolicy Bypass -File .\install\windows\uninstall.ps1
macOS:
bash ./install/macos/uninstall.sh
Keep data but remove runtime:
powershell -ExecutionPolicy Bypass -File .\install\windows\uninstall.ps1 -KeepData
bash ./install/macos/uninstall.sh --keep-data