counterparty.activity
LiveEpisodes + recent actions for a counterparty within a time window.
Description
Per ADR-0021 §read-API Family B.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
counterparty_id | string | yes | Canonical counterparty id. |
since | string (ISO-8601) | no | Default 30 days ago. |
until | string (ISO-8601) | no | Default now. |
Output shape
typescript
{
counterparty_id: string;
episodes: Array<{ id: string; source: string; summary: string; occurred_at: string }>;
recent_actions: Array<{ ledger_entry_id: string; action_class: string; summary: string; occurred_at: string }>;
world_version: string;
}Example call
JSON-RPC tools/call request body (omit the JSON-RPC envelope when using an SDK; the SDK adds it for you):
jsontools/call params
{ "name": "counterparty.activity", "arguments": { "counterparty_id": "entity_01HXSARAH", "since": "2026-06-01T00:00:00Z" } }Example response
Tool results are always wrapped as content[0].text with a stringified JSON body. The shape below is what you get back from JSON.parse(result.content[0].text):
jsonparsed result body
{
"counterparty_id": "entity_01HXSARAH",
"episodes": [
{ "id": "ep_01H...", "source": "email", "summary": "Sarah: 'Confirming Thursday 3pm works.'", "occurred_at": "2026-06-12T13:24:00Z" }
],
"recent_actions": [
{ "ledger_entry_id": "led_01H...", "action_class": "communicate", "summary": "Sent reply confirming Thursday 3pm.", "occurred_at": "2026-06-12T13:30:00Z" }
],
"world_version": "wv_01HXR4WORLD"
}Errors this tool can return
| Code | Meaning |
|---|---|
invalid_arguments | Tool input failed Zod validation. |
unauthorized | Missing or invalid bearer token. |
quota_exceeded | Per-minute, daily call, or daily inference budget exceeded. |
not_found | The requested resource (action_id, decision_id, counterparty_id, etc.) was not found. |
See the full error catalog for resolution steps on each code, plus the standard transport-layer responses (401, 429).