hive-stateful-monitoring — Stateful Monitoring
Turn durable intent — watch, alert, schedule, remember — into Hive monitors,
alerts, reports, and memory facts. Monitor execution happens on Hive workers
between sessions, not in the current chat, so the contract is: capture intent
precisely, confirm what was saved, and never pretend something was saved when
the call failed.
Task toolset and identifiers
Toolset: stateful_monitoring. Read hive://toolsets/stateful_monitoring
before execution; it is authoritative for the current output schema,
material-call budget, phases, fallback condition, stop conditions, and the
read/write routing policy.
Required identifiers: monitor kind and target object. Worker-supported monitor
kinds are wallet, token, protocol, market, watchlist_digest,
token_discovery_risk, and risk_watch.
Before choosing endpoints, select exactly one matching entry from the exact
workflow's routes[]. Follow its ordered steps, use a fallback only under that
step's published condition, stop at four material calls, and preserve the
selected route_id in the typed result. The broad coverageCatalog is discovery
coverage, not an execution plan.
Procedure
- Convert the user's durable intent into a monitor
kind, target,
rules, and cadence.
- Inspect each exact endpoint schema. On the compact root, state reads route
through
invoke_api_endpoint. Every create, update, archive, remember,
forget, acknowledge, or resolve action routes through
invoke_stateful_endpoint, which must never be auto-approved.
- Call
hive_list_monitors before creating — update instead of duplicating.
- Describe the proposed state change to the user and obtain explicit approval.
- Call
hive_create_monitor for new watch requests, hive_update_monitor
to change cadence, rules, target, metadata, or status, and
hive_archive_monitor when the user asks Hive to stop watching.
- For "what changed / what is alerting / what does Hive remember": use
hive_get_monitor_runs, hive_list_observations, hive_list_alerts,
hive_get_latest_snapshot, or hive_generate_monitor_report.
- Use
hive_update_alert_status when the user acknowledges, reopens, or
resolves an alert.
- Use
hive_remember_fact, hive_list_memory_facts, and
hive_forget_memory_fact for durable user-scoped facts that should appear
in future monitor reports.
- After any write, verify the persisted result, then confirm back to the user exactly what is being watched,
the rules, and the cadence — that confirmation is their only window to
catch a mis-captured intent before workers start running it.
For B2B adapters serving multiple tenants/end users, read
references/b2b-subject-context.md before using subject-scoped state or the
hive_list_subjects / hive_get_subject / hive_archive_subject /
hive_list_subject_audit_events tools.
Worked example
User: "Watch this Ethereum wallet and tell me when it moves more than $100k."
hive_list_monitors — no existing monitor for this wallet.
hive_create_monitor with kind wallet, the Ethereum address as target,
a large-transfer rule with the $100k threshold, and the requested or
default cadence.
- Confirm: "Watching 0x… on Ethereum; you'll get an alert on any transfer
over $100k; checks run on Hive workers at [cadence]."
User: "Send every customer a daily crypto watchlist brief."
Create a watchlist_digest monitor per B2B subject with saved wallets,
tokens, protocols, and markets in the target —
after reading the B2B reference above.
Evidence receipt (required)
End every Hive-backed answer with a compact receipt built from the _hive
object on each material tool response:
provider, tool, fetched_at, observed_at, cache_age_ms, and runtime_status
receipt_id, receipt_version, server/build version, and SHA-256 input/result
digests when present (self-checks, not signatures)
source, cache_status, truncated, and any warnings
- canonical chain/entity identifiers plus block, slot, transaction, or query ids
present in provider data
- material provider disagreements and how they were handled
- checks that were unavailable, gated, stale, truncated, or intentionally not run
- a
claims[] citation from each material statement to exact receipt IDs
- one
coverage[] entry for every canonical evidence phase, with each gap explained
Never turn missing evidence into a clean result, silently merge conflicting
provider values, or omit a degraded/fallback call from the receipt.
observed_at is Hive's first-observation/original cache-population time, not
necessarily upstream event time. Use provider time, block, slot, transaction,
or candle close for source recency; if absent, mark upstream recency unknown.
Run validate_task_result before presenting the typed workflow result; it
checks structure but cannot authenticate an invented receipt.
Runtime status handling
If stateful tools return missing_key or an auth-required error, explain
that hosted MCP authentication or the Hive persistence backend must be
configured before durable monitoring can be used. Do not pretend the monitor
was saved.
Hand-offs
- One-off live question, no durable intent →
hive-query or the matching
domain skill.
- The data to monitor needs diligence first (which token? which pool?) → run
the domain skill, then create the monitor.
1---2name: hive-stateful-monitoring3description: Use this skill whenever the user wants Hive to remember, watch, monitor, schedule, alert, or report on crypto state across sessions — "watch this wallet", "alert me if the price moves", "send me a daily digest", "what changed since last time", "remember that I care about X". Converts durable intent into Hive monitors, alerts, reports, and memory facts that Hive workers execute later. For one-off live questions use hive-query or a domain skill instead.4license: MIT5---67# hive-stateful-monitoring — Stateful Monitoring89Turn durable intent — watch, alert, schedule, remember — into Hive monitors,10alerts, reports, and memory facts. Monitor execution happens on Hive workers11between sessions, not in the current chat, so the contract is: capture intent12precisely, confirm what was saved, and never pretend something was saved when13the call failed.1415## Task toolset and identifiers1617Toolset: `stateful_monitoring`. Read `hive://toolsets/stateful_monitoring`18before execution; it is authoritative for the current output schema,19material-call budget, phases, fallback condition, stop conditions, and the20read/write routing policy.2122Required identifiers: monitor kind and target object. Worker-supported monitor23kinds are `wallet`, `token`, `protocol`, `market`, `watchlist_digest`,24`token_discovery_risk`, and `risk_watch`.2526Before choosing endpoints, select exactly one matching entry from the exact27workflow's routes[]. Follow its ordered steps, use a fallback only under that28step's published condition, stop at four material calls, and preserve the29selected route_id in the typed result. The broad coverageCatalog is discovery30coverage, not an execution plan.3132## Procedure33341. Convert the user's durable intent into a monitor `kind`, `target`,35 `rules`, and `cadence`.362. Inspect each exact endpoint schema. On the compact root, state reads route37 through `invoke_api_endpoint`. Every create, update, archive, remember,38 forget, acknowledge, or resolve action routes through39 `invoke_stateful_endpoint`, which must never be auto-approved.403. Call `hive_list_monitors` before creating — update instead of duplicating.414. Describe the proposed state change to the user and obtain explicit approval.425. Call `hive_create_monitor` for new watch requests, `hive_update_monitor`43 to change cadence, rules, target, metadata, or status, and44 `hive_archive_monitor` when the user asks Hive to stop watching.456. For "what changed / what is alerting / what does Hive remember": use46 `hive_get_monitor_runs`, `hive_list_observations`, `hive_list_alerts`,47 `hive_get_latest_snapshot`, or `hive_generate_monitor_report`.487. Use `hive_update_alert_status` when the user acknowledges, reopens, or49 resolves an alert.508. Use `hive_remember_fact`, `hive_list_memory_facts`, and51 `hive_forget_memory_fact` for durable user-scoped facts that should appear52 in future monitor reports.539. After any write, verify the persisted result, then confirm back to the user exactly what is being watched,54 the rules, and the cadence — that confirmation is their only window to55 catch a mis-captured intent before workers start running it.5657For B2B adapters serving multiple tenants/end users, read58`references/b2b-subject-context.md` before using subject-scoped state or the59`hive_list_subjects` / `hive_get_subject` / `hive_archive_subject` /60`hive_list_subject_audit_events` tools.6162## Worked example6364User: "Watch this Ethereum wallet and tell me when it moves more than $100k."65661. `hive_list_monitors` — no existing monitor for this wallet.672. `hive_create_monitor` with kind `wallet`, the Ethereum address as target,68 a large-transfer rule with the $100k threshold, and the requested or69 default cadence.703. Confirm: "Watching 0x… on Ethereum; you'll get an alert on any transfer71 over $100k; checks run on Hive workers at [cadence]."7273User: "Send every customer a daily crypto watchlist brief."7475Create a `watchlist_digest` monitor per B2B subject with saved wallets,76tokens, protocols, and markets in the target —77after reading the B2B reference above.7879## Evidence receipt (required)8081End every Hive-backed answer with a compact receipt built from the `_hive`82object on each material tool response:8384- `provider`, `tool`, `fetched_at`, `observed_at`, `cache_age_ms`, and `runtime_status`85- `receipt_id`, `receipt_version`, server/build version, and SHA-256 input/result86 digests when present (self-checks, not signatures)87- `source`, `cache_status`, `truncated`, and any warnings88- canonical chain/entity identifiers plus block, slot, transaction, or query ids89 present in provider data90- material provider disagreements and how they were handled91- checks that were unavailable, gated, stale, truncated, or intentionally not run92- a `claims[]` citation from each material statement to exact receipt IDs93- one `coverage[]` entry for every canonical evidence phase, with each gap explained9495Never turn missing evidence into a clean result, silently merge conflicting96provider values, or omit a degraded/fallback call from the receipt.97`observed_at` is Hive's first-observation/original cache-population time, not98necessarily upstream event time. Use provider time, block, slot, transaction,99or candle close for source recency; if absent, mark upstream recency unknown.100Run `validate_task_result` before presenting the typed workflow result; it101checks structure but cannot authenticate an invented receipt.102103## Runtime status handling104105If stateful tools return `missing_key` or an auth-required error, explain106that hosted MCP authentication or the Hive persistence backend must be107configured before durable monitoring can be used. Do not pretend the monitor108was saved.109110## Hand-offs111112- One-off live question, no durable intent → `hive-query` or the matching113 domain skill.114- The data to monitor needs diligence first (which token? which pool?) → run115 the domain skill, then create the monitor.