API Reference

Stateful Monitoring

Written by , Product docsLast updated

Hive's stateful monitoring layer lets authenticated agents save monitoring intent and reusable context instead of re-running every workflow from scratch. Use it for watchlists, risk watches, token discovery, alerts, report generation, memory facts, and partner products that isolate each downstream customer.


What it adds

Most Hive provider tools are stateless: the agent asks for a price, wallet, pool, token, or market and receives the current result. Stateful monitoring adds a Hive-native layer on top:

  • Create and update monitors for watchlists, wallets, contracts, prediction markets, and risk checks.
  • List observations, alerts, latest snapshots, and monitor runs.
  • Store and forget memory facts such as report preferences or watchlist context.
  • Generate monitor reports from persisted observations.
  • Scope state to a direct Hive account or to a signed B2B subject.

These tools count as part of the full 369-tool callable catalog. They are separate from the 351 categorized provider tools.


Tool inventory

AreaTools
Monitorshive_create_monitor, hive_list_monitors, hive_get_monitor, hive_update_monitor, hive_archive_monitor, hive_get_monitor_runs
Observations and alertshive_list_observations, hive_list_alerts, hive_update_alert_status, hive_get_latest_snapshot
Memory and reportshive_remember_fact, hive_list_memory_facts, hive_forget_memory_fact, hive_generate_monitor_report
B2B subjectshive_list_subjects, hive_get_subject, hive_archive_subject, hive_list_subject_audit_events

Start from hive://toolsets or search_tools and inspect the selected schema with get_api_endpoint_schema before calling a stateful tool.


Monitor kinds

The TypeScript B2B convenience adapter focuses on the most common partner workflows:

KindUse it for
watchlist_digestSave a portfolio or token watchlist and produce recurring briefs.
risk_watchTrack wallet, token, approval, or contract-risk changes.
token_discovery_riskMonitor new-token opportunities while gating them through risk checks.

The lower-level worker-supported monitor kinds are wallet, token, protocol, market, prediction_market, watchlist_digest, token_discovery_risk, and risk_watch. Use the adapter helpers for the three recommended partner workflows above, or call hive_create_monitor directly after inspecting the live schema when you need one of the lower-level kinds.


Direct-user state

Direct users store state under their authenticated Hive account. A simple root MCP flow is:

  1. Read hive://toolsets and choose stateful_monitoring.
  2. Inspect hive_create_monitor with get_api_endpoint_schema.
  3. Create the monitor with schema-valid arguments.
  4. Read hive_list_alerts, hive_list_observations, or hive_get_latest_snapshot.
  5. Generate a report with hive_generate_monitor_report when the user asks for a summary.
json
{
  "tool": "hive_create_monitor",
  "args": {
    "kind": "watchlist_digest",
    "name": "Daily portfolio brief",
    "target": {
      "tokens": ["bitcoin", "ethereum"],
      "wallets": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"]
    },
    "cadence": "daily"
  }
}

B2B subject isolation

B2B partners should keep one Hive API key on their backend and isolate each downstream customer with signed subject headers. Do not ask each downstream user to create a Hive API key.

http
X-Hive-Tenant-Id: <tenant-id>
X-Hive-End-User-Id: <partner-user-id>
X-Hive-Subject-Timestamp: <unix-seconds-or-iso>
X-Hive-Subject-Signature: <hmac-sha256>

Hive stores state under the authenticated Hive owner plus the resolved subject. Monitors, memory, alerts, and reports stay isolated per downstream customer.

Before writing partner code, run the readiness check from the same backend environment that will sign subject headers:

bash
curl https://mcp.hiveintelligence.xyz/api/v1/b2b/readiness \
  -H "Authorization: Bearer $HIVE_API_KEY"

For TypeScript partner backends, install the official adapter with npm install hive-mcp-client (published on npm at v0.1.5); its source is mirrored in hive-intel/hive-sdk under client/.

For the full partner implementation checklist, signed header contract, REST fallback, and adapter examples, see B2B Partner Adapter.


  • Keep Hive API keys and subject-signing secrets on the server.
  • Derive tenantId and endUserId from trusted partner auth state, not from model-generated tool arguments.
  • Use hive_list_subject_audit_events during QA to confirm writes land under the expected subject.
  • Bound list calls with limit, cursor, or date filters when the live schema exposes them.
  • Include monitor id, subject scope, fetched_at, and runtime status when reporting alert or report results.