Skip to content

sentinel

The sentinel plugin provides declarative endpoint monitoring for OpenClaw agents. Define watchers that poll HTTP endpoints, listen to WebSocket/SSE streams, or call EVM smart contracts — and fire callbacks when conditions are met.

For full upstream documentation, see coffeexcoin/openclaw-sentinel.

How it works

Diagram
  1. Define a watcher with an endpoint, polling strategy, and conditions.
  2. Sentinel evaluates JSONPath conditions against each response.
  3. When conditions match, sentinel fires a webhook to the OpenClaw gateway, which routes it to a callback session.
  4. The callback session receives the event with matched data and can execute actions via sentinel_act or escalate via sentinel_escalate.

Strategies

StrategyDescription
http-pollPeriodic HTTP GET/POST polling
websocketPersistent WebSocket connection
sseServer-Sent Events stream
http-long-pollHTTP long-polling
evm-callEVM eth_call against a smart contract

Configuration

Configure in openclaw.json under plugins.sentinel:

FieldTypeDefaultDescription
allowedHostsstring[][]Hostnames watchers can connect to (required)
localDispatchBasestringhttp://127.0.0.1:18789Base URL for webhook dispatch
dispatchAuthTokenstring(auto-detected)Bearer token for dispatch auth
hookSessionPrefixstringagent:main:hooks:sentinelBase prefix for callback sessions
hookSessionGroupstringDefault session group for callbacks
hookRelayDedupeWindowMsinteger120000Dedupe window for relay messages
stateFilePathstring(default)Custom state persistence path
notificationPayloadModenone | concise | debugconciseDelivery target notification verbosity
maxOperatorGoalCharsinteger12000Max chars for fire.operatorGoal
hookResponseTimeoutMsinteger30000Timeout for assistant hook response
hookResponseFallbackModenone | conciseconciseFallback on hook response timeout
hookResponseDedupeWindowMsinteger120000Hook response delivery dedupe window
defaultHookModelstring(gateway default)Default LLM model for hook callback sessions
dataDirstring(plugin default)Managed directory for state file and operatorGoalFile references

Limits

Nested under limits:

FieldDefaultDescription
maxWatchersTotal200Max watchers across all skills
maxWatchersPerSkill20Max watchers per skill
maxConditionsPerWatcher25Max conditions per watcher
maxIntervalMsFloor1000Minimum polling interval (ms)

fire config

FieldTypeDescription
webhookPathstringGateway path for webhook dispatch
eventNamestringEvent name in the callback envelope
payloadTemplateobjectKey-value template with ${JSONPath} interpolation
operatorGoalstringNatural language instruction for the callback agent (max maxOperatorGoalChars chars)
operatorGoalFilestringPath to a file read fresh at fire time — contents injected as operatorGoalRuntimeContext in the callback envelope (use for dynamic policy/config)
modelstringPer-watcher LLM model override for hook sessions (takes precedence over defaultHookModel)
sessionGroupstringOptional hook session group key (watchers with the same key share one callback session)
dedupeKeyTemplatestringTemplate to derive deterministic trigger dedupe key
prioritylow | normal | high | criticalCallback urgency hint
fireOncebooleanDisable the watcher after first fire

Tools

Sentinel provides three tools:

  • sentinel_control — Create, enable, disable, remove, and inspect watchers
  • sentinel_act — Execute actions in response to callbacks (run commands, send notifications)
  • sentinel_escalate — Escalate situations that need human attention

Next steps

Agent skill

The sentinel plugin ships a SKILL.md that surfaces usage guidance to AI agents via OpenClaw's skill system. When the plugin is enabled, agents can load the skill to get:

  • When to use sentinel_control vs other monitoring approaches
  • The strategy/condition/fire schema in plain terms
  • Relay contract semantics (sentinel_act vs sentinel_escalate)
  • Watcher lifecycle guidance