Install
openclaw skills install intent-guardianWatches your desktop activity, maintains a real-time task stack, detects when you forget what you were doing after interruptions, and gently reminds you. You...
openclaw skills install intent-guardianNever lose your train of thought again.
Intent Guardian continuously monitors your desktop activity, builds a real-time understanding of what you're working on, and detects when you've been derailed by an interruption and forgotten your original task. When that happens, it nudges you back on track.
Knowledge workers are interrupted every 3 minutes on average. After an interruption, it takes ~23 minutes to return to the original task -- and often, you never return at all. Not because the task isn't important, but because you simply forgot.
Intent Guardian solves this by maintaining a task stack -- a living model of what you're doing, what you were doing, and what got interrupted -- so you don't have to.
Polls the active window title and application name to build a continuous activity stream.
macOS:
bash command:"scripts/sense_activity.sh"
With ActivityWatch (richer data):
bash command:"scripts/sense_activitywatch.sh"
With Screen Capture (optional, requires vision model):
bash command:"scripts/sense_screen.sh"
The agent maintains a task stack in memory/skills/intent-guardian/task_stack.json:
{
"stack": [
{
"id": "task_001",
"intent": "Writing product requirements doc, section 3",
"app": "Google Docs",
"window_title": "Product Requirements v2 - Google Docs",
"started_at": "2026-02-26T14:28:00",
"status": "suspended",
"suspended_at": "2026-02-26T14:31:00",
"suspended_by": "Slack notification from Li Si",
"completion_estimate": 0.6
},
{
"id": "task_002",
"intent": "Replying to Li Si about the API bug",
"app": "Slack",
"window_title": "Slack - #engineering",
"started_at": "2026-02-26T14:31:00",
"status": "completed",
"completed_at": "2026-02-26T14:35:00"
},
{
"id": "task_003",
"intent": "Looking up React useEffect cleanup pattern",
"app": "Chrome",
"window_title": "Stack Overflow - React useEffect cleanup",
"started_at": "2026-02-26T14:35:00",
"status": "active"
}
],
"current_focus": "task_003",
"forgotten_candidates": ["task_001"]
}
The agent analyzes the task stack to detect potential forgetting:
Signals that suggest forgetting:
interruption_threshold_minutesSignals that suggest deliberate abandonment (do NOT remind):
When forgetting is detected, the agent sends a non-intrusive reminder:
Simple reminder:
"You were working on the product requirements doc (section 3) about 25 minutes ago, before the Slack interruption. Want to go back to it?"
Smart reminder (with context carried forward):
"You left the product requirements doc to look up the useEffect cleanup pattern for Li Si's bug. The answer is: return a cleanup function in useEffect. Ready to bring this back to the doc?"
The second form is more powerful -- it doesn't just remind you what you forgot, it completes the reason you left, so you can return to your main task with the answer in hand.
Over time, the agent builds a focus profile in memory/skills/intent-guardian/focus_profile.json:
{
"user_id": "default",
"updated_at": "2026-02-26",
"patterns": {
"avg_focus_duration_minutes": 12,
"interruption_sources": {
"Slack": { "count": 45, "forget_rate": 0.78 },
"Mail": { "count": 22, "forget_rate": 0.18 },
"Chrome": { "count": 31, "forget_rate": 0.42 }
},
"peak_focus_hours": ["09:00-11:00", "14:00-16:00"],
"high_risk_transitions": [
{ "from": "VSCode", "to": "Slack", "forget_rate": 0.82 },
{ "from": "Google Docs", "to": "Chrome", "forget_rate": 0.55 }
],
"reminder_effectiveness": {
"accepted": 34,
"dismissed": 8,
"ignored": 5
}
}
}
This profile is used to personalize detection thresholds and reminder timing.
Your Desktop
|
v
[Sensing Layer] ---- scripts/sense_activity.sh (window title, every N sec)
| scripts/sense_activitywatch.sh (ActivityWatch API)
| scripts/sense_screen.sh (optional screenshot + vision)
v
[Activity Log] ---- memory/skills/intent-guardian/activity_log.jsonl
|
v
[Understanding] ---- LLM analyzes activity stream on each Heartbeat:
| - Segments activities into logical tasks
| - Infers intent for each task
| - Detects interruptions and context switches
v
[Task Stack] ---- memory/skills/intent-guardian/task_stack.json
|
v
[Detection] ---- Compares stack state against forgetting heuristics
| Consults focus_profile.json for personalized thresholds
v
[Reminder] ---- Sends reminder via configured notification channel
| Logs user response for feedback loop
v
[Learning] ---- Updates focus_profile.json with new patterns
Add to your HEARTBEAT.md:
## Intent Guardian Check
Every heartbeat, run the intent guardian cycle:
1. Read latest activity from memory/skills/intent-guardian/activity_log.jsonl
2. Update task_stack.json with new activities
3. Check for forgotten tasks (suspended > threshold, not resumed)
4. If forgotten task detected, send reminder
5. Log any reminder responses to focus_profile.json
Add a daily focus report:
openclaw cron add --name "intent-guardian-daily" --schedule "0 18 * * *" \
--prompt "Generate my daily focus report using intent-guardian data"
npx playbooks add skill openclaw/skills --skill intent-guardian
The skill uses native macOS commands (osascript) to get the active window.
No additional software required.
Add the Heartbeat integration above to your HEARTBEAT.md.
activitywatch_enabled: true in skill config.screen_capture_enabled: true and configure vision_model.excluded_apps to prevent tracking specific applications.working_hours_start to working_hours_end.| Key | Type | Default | Description |
|---|---|---|---|
poll_interval_seconds | int | 5 | How often to check the active window |
interruption_threshold_minutes | int | 5 | Minutes before a suspended task is flagged as potentially forgotten |
reminder_cooldown_minutes | int | 3 | Minimum time between reminders to avoid nagging |
max_stack_depth | int | 20 | Maximum tasks to track in the stack |
screen_capture_enabled | bool | false | Enable periodic screenshot analysis |
screen_capture_interval_seconds | int | 30 | Interval for screenshots (if enabled) |
vision_model | string | "" | Model for screenshot analysis (e.g., "gemini", "claude") |
activitywatch_enabled | bool | true | Use ActivityWatch for richer activity data |
activitywatch_url | string | "http://localhost:5600" | ActivityWatch server URL |
notification_channel | string | "system" | Where to send reminders ("system", "telegram", "slack", etc.) |
working_hours_start | string | "09:00" | Start of active tracking window |
working_hours_end | string | "18:00" | End of active tracking window |
excluded_apps | list | ["Finder", "SystemPreferences", "loginwindow"] | Apps to ignore |
User: "What was I doing before I got sidetracked?" Agent reads task_stack.json, responds:
"Before the Slack interruption at 14:31, you were writing section 3 of the product requirements doc in Google Docs. You were about 60% through. Want to jump back?"
User: "Show me my task stack" Agent responds with current stack visualization:
Task Stack (3 items): [ACTIVE] Looking up React useEffect cleanup (Chrome) - 17 min [COMPLETED] Replying to Li Si about API bug (Slack) - 4 min [SUSPENDED] Writing product requirements doc, section 3 (Google Docs) - 25 min ago !!
User: "How's my focus today?" Agent reads activity log and focus profile:
"Today you've had 6 deep work sessions averaging 18 minutes each. You were interrupted 11 times, mostly by Slack (7 times). You forgot to return to your original task 4 times -- I caught 3 of those. Your peak focus was 09:30-10:45."
Proactive (via Heartbeat):
"Heads up -- you've been away from the quarterly report (Excel) for 40 minutes since that phone call. It's due tomorrow. Want to wrap up the current task and go back to it?"
Intent Guardian works well alongside these existing skills:
| Skill | Integration |
|---|---|
personal-analytics | Feed focus_profile data into analytics for richer weekly reports |
daily-review | Include task completion stats and interruption counts in daily reviews |
deepwork-tracker | Auto-start deepwork timer when sustained focus is detected |
screen-monitor | Use screen_analyze for richer context when vision model is configured |
rememberall | Convert suspended tasks into time-based reminders as fallback |
get-focus-mode | Suppress reminders when macOS Focus mode is active |
MIT