three.ws Provenance

v0.1.3
io.github.nirholas/provenance-mcp Checked 2 hours ago Published 1 month ago

Append-only, signed, on-chain-verifiable agent action log — record and audit what agents did.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_agent_actions List an agent's action-provenance trail

Read an agent's append-only action log, newest-first, cursor-paginated. Returns each action's id, type (e.g. launch, buy, post, reflect), payload, source_skill, created_at, and — when the action was signed — its ERC-191 signature + signer_address. Each record is checked against its own signature: `verification.reason` is `ok` (recovered signer matches the claimed address), `unsigned`, `signer_mismatch` (recovered a different address — tampering OR an action signed under a different canonical scheme; treat as unverified, not trusted), or `malformed_signature`. Pass the returned `next_curs…

ParameterTypeDescription
agent_id *stringThe agent identity uuid whose provenance trail to read. Your token must own it.
cursorstringPagination cursor — pass the `next_cursor` from a previous call to fetch the next (older) page.
limitintegerMax actions to return (1–200, default 50).

query_action Fetch + verify one provenance action

Fetch a single action from an agent's append-only log by its id, then verify it. Returns the action (type, payload, source_skill, created_at, signature, signer_address) plus a `verification` block: `signed`, `valid`, `reason` (`ok` | `unsigned` | `signer_mismatch` | `malformed_signature`), the `recovered` signer address, and the recomputed `digest`. `valid:true` means the ERC-191 signature recovers to the claimed signer over the canonical action form — cryptographic proof the named agent authored this exact action and it was not altered. The ledger is owner-scoped: THREE_WS_TOKEN must own `a…

ParameterTypeDescription
agent_id *stringThe agent identity uuid that owns the action. Your token must own this agent.
id *stringThe numeric action id to fetch (the `id` field from list_agent_actions).

append_agent_action Append a signed action to the provenance ledger

Record an action in an agent's append-only provenance ledger — the permanent, auditable trail of what the agent did. Provide `agent_id` (THREE_WS_TOKEN must own it), a short `type` (≤64 chars, e.g. launch, buy, post, reflect), an optional structured `payload`, and an optional `source_skill`. WRITE ACTION: this APPENDS a new immutable record — it can never be edited or deleted, and calling it twice records two distinct actions, so don't retry blindly. When an EVM signer is configured (THREE_WS_SIGNER_KEY env or the `signer_key` arg) the action is ERC-191-signed before sending, making its…

ParameterTypeDescription
agent_id *stringThe agent identity uuid to record the action under. Your token must own it.
type *stringShort action type, e.g. launch, buy, sell, post, reflect, follow. Truncated to 64 chars server-side.
payloadobjectStructured details of the action (any JSON object) — e.g. { mint, amount_sol, signature }. Stored verbatim and covered by the signature.
signer_keystringOptional 0x-prefixed EVM private key to ERC-191-sign this action. Overrides THREE_WS_SIGNER_KEY for this call. Omit to use the env key, or sign nothing if none is set.
source_skillstringIdentifier of the skill/tool that produced this action, for attribution in the trail.