git status, a Kubernetes namespace. The brain polls the source on an interval you set; when something changes, the change flows into memory as a perception, and the agent sees it on its next turn.
Watchers live in the brain, persisted to watchers.json in its data directory, so they survive daemon restarts.
Creating a watcher
The simplest way is to ask in chat (“watch my ~/Notes folder and tell me when new markdown files appear”) and the agent creates one with itswatcher_create tool. You can also call the tool directly:
w_...), which you need for deletion.
Two provider kinds exist:
files_changed watches a directory tree for new or modified files. root is the absolute path; patterns is an optional list of substring filters on the path (an empty list matches every file).
command_output runs a command at each interval and fires when its stdout changes:
$VAR interpolation; arguments go in the args array. cwd is optional; a relative path resolves against your home directory. The brain does not sandbox the command, so stick to read-only commands like git status, kubectl get pods, or pgrep.
The minimum interval is 15 seconds. The first poll establishes a baseline silently; subsequent polls fire only on change. A failing poll (bad path, command error) is logged and does not retry until the next interval, so a broken watcher cannot hot-loop.
What happens when a watcher fires
Each detected change becomes awatcher_event perception ([watcher:notes-inbox] <what changed>) that goes through the same ingest path as everything else: working memory, the Binary Memory Core, and the knowledge graph. The next agent turn sees it in context.
The optional action_prompt is appended to every event, so the agent knows what you want done when it encounters one (“summarize the new file and store the summary”).
Unaddressed events get a follow-up. The brain’s proactive engine checks every 5 minutes for watcher events that have been sitting in working memory between 15 minutes and 24 hours without anything newer referencing them. Each such event gets one proactive_followup perception that surfaces it loudly on the next turn: Xynthis nudges once rather than nagging.
Listing and deleting
watchers.json. Perceptions it already produced stay in memory.
Folders you index with
xynthis corpus add get their own change-watching automatically; that is a separate, event-driven mechanism for keeping the corpus index fresh, not a watcher. Use watchers when you want the agent told about changes; see Codebase memory for corpus watching.