ava-watcher

Launches background Python watchers that message the agent when a condition or deadline fires.

1|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/zhiyuan-zhang0206/Ava --skill ava-watcher-zhiyuan-zhang0206
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ava-watcher
Source: https://github.com/zhiyuan-zhang0206/Ava/tree/main/ava_builtins/skills/ava-watcher
Command: npx skills add https://github.com/zhiyuan-zhang0206/Ava --skill ava-watcher-zhiyuan-zhang0206

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires redis, psycopg, and includes references (resource) components.

What problem does it solve? Waiting for asynchronous events (files landing, builds finishing, agents going idle, scheduled times) normally forces an agent to burn turns polling. This Skill runs small background Python programs that watch the condition and send a message to wake the agent only when something changes. ## Core Features & Use Cases - Custom condition watchers: Write any Python loop that checks a condition and calls ava.agents.send_message when it fires, launched with a mandatory timeout via ava.watcher.launch. - Time-based watchers: Use ava.watcher.at for one-shot wakeups at a datetime or after a delay, and ava.watcher.cron for recurring schedules with a 7-day default expiry and replace-on-renew semantics. - Idle-agent monitoring: The bundled reference watcher subscribes to the Redis event stream (with a PostgreSQL polling fallback) to notify you when a target agent goes idle. - Use Case: Launch a watcher before starting a long CI build, then idle; the watcher messages you the moment the build artifact appears, and sends an exit notice if its timeout elapses. ## Quick Start Ask the agent to watch for a specific file, process, or deadline and wake you when it happens instead of polling.

Frequently Asked Questions about ava-watcher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a background task that notifies me when a condition is met?▼

Write a Python loop that checks your condition and calls ava.agents.send_message when it fires, then launch it with ava.watcher.launch(code, timeout, name). The watcher runs independently and wakes you with a message, so you can idle instead of polling.

How do I schedule a recurring reminder with a cron expression?▼

Call ava.watcher.cron with a cron expression, message, and timezone. Schedules without an explicit end_time expire after 7 days; re-registering the same expression and timezone replaces the old watcher instead of stacking a duplicate.

Why does my watcher need a mandatory timeout?▼

Every watcher has a bounded lifetime so a forgotten one cannot run forever. When the timeout elapses the watcher stops and sends an exit notice with its exit code and output tail, so you are never silently un-watched.

How do I monitor when another agent finishes its turn?▼

Use the reference watcher watch_idle.py, which subscribes to the Redis event stream and notifies you when the target agent reports an idling status. If the stream dies, it falls back to polling the agents table in PostgreSQL.

Why should a watcher only message on state changes?▼

Each send_message wakes the agent for a full turn, so repeated identical messages waste turns. Keep the last-seen state, compare on every poll, and only message on transitions you care about; use the automatic exit notice instead of heartbeat messages.

What happens to watchers after a machine restart?▼

Time watchers do not survive a host reboot and are not automatically rebuilt. Re-arm any watcher you still need after a restart; if a watcher was reclaimed while you were terminated, the reaper's notice tells you to re-register.