Skip to content

API Reference parrot.squawk.client.received_ledger

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.squawk.client.received_ledger

View source

Client-side received ledger (D13 level 2): what came back, from whom, under which contract, and what the LLM did with it.

Alias CallCost

Re-exported from parrot.interagent.CallCost.

Class ReceivedLedger

Bounded client-side record of received results (best-effort, unlike the served ledger).

Parameter Type Default Description
sink Callable[[str], Awaitable[None]] | None None Optional async JSON sink; failures are logged, never raised.
max_entries int 10000 Size of the in-memory recent window.

Method ReceivedLedger.append

Record an entry and forward it to the sink.

append(entry: ReceivedLedgerEntry) -> None

Parameter Type Default Description
entry ReceivedLedgerEntry Received-result record.

Method ReceivedLedger.note_follow_up

Record that a local affordance consumed the handle (no-op when the handle is unknown).

note_follow_up(handle_key: str, tool_name: str) -> None

Parameter Type Default Description
handle_key str Handle key of the received artifact.
tool_name str Local tool that consumed it.

Method ReceivedLedger.recent

Return up to limit most recent entries, oldest first.

recent(*, limit: int = 100) -> list[ReceivedLedgerEntry]

Parameter Type Default Description
limit int 100 Maximum entries; 0 or less returns none.

Returns: list[ReceivedLedgerEntry] — The most recent entries.

Class ReceivedLedgerEntry

One result received from a remote agent, and what the local LLM did with it.

Fields:

Field Type Default Description
remote_agent str
cap_id str
contract_hash str
handle_key str | None None
descriptor_digest str | None None
cost CallCost
trace_id str
follow_ups tuple[str, ...] ()

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally