Skip to content

API Reference parrot.roost.blackboard

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

parrot.roost.blackboard

View source

Roost blackboard — versioned single-writer keys with ACLs and subscriptions (FEAT-747 M6).

Alias AgentAddress

Re-exported from parrot.roost.messages.AgentAddress.

Class Blackboard

Abstract blackboard scoped to a conversation or channel.

Parameter Type Default Description
scope str
policy WriterPolicy

Method Blackboard.get

Read a key (ReadDeniedError if the ACL forbids it).

get(key: str, *, reader: str) -> Optional[BlackboardEntry]

Parameter Type Default Description
key str
reader str

Returns: Optional[BlackboardEntry]

Method Blackboard.put

Compare-and-set write of a key.

put(key: str, value: Any, *, writer: str, expected_version: Optional[int], acl: Optional[KeyACL] = None, provenance: Optional[dict[str, Any]] = None, producer: Optional[str] = None) -> BlackboardEntry

Parameter Type Default Description
key str
value Any
writer str
expected_version Optional[int]
acl Optional[KeyACL] None
provenance Optional[dict[str, Any]] None
producer Optional[str] None

Returns: BlackboardEntry

Method Blackboard.subscribe

Subscribe to changes of key; returns the subscription id.

subscribe(key: str, subscriber: Subscriber, *, subscriber_name: str) -> str

Parameter Type Default Description
key str
subscriber Subscriber
subscriber_name str

Returns: str

Method Blackboard.unsubscribe

Remove a subscription; True if it existed.

unsubscribe(subscription_id: str) -> bool

Parameter Type Default Description
subscription_id str

Returns: bool

Method Blackboard.keys

List readable keys.

keys(*, reader: str) -> list[str]

Parameter Type Default Description
reader str

Returns: list[str]

Method Blackboard.render_prefix

Deterministic text rendering for prompt-cache-friendly prefixes.

render_prefix(*, reader: str, keys: Sequence[str] = ('roster', 'definitions', 'tasks', 'digest')) -> str

Parameter Type Default Description
reader str
keys Sequence[str] ('roster', 'definitions', 'tasks', 'digest')

Returns: str

Class BlackboardEntry

A versioned blackboard value.

Fields:

Field Type Default Description
key str
value Any
version int
writer str
acl KeyACL
updated_at datetime
provenance dict[str, Any]

Class BlackboardKey

Well-known blackboard keys.

Class InMemoryBlackboard

Process-local blackboard.

Parameter Type Default Description
scope str
policy WriterPolicy

Method InMemoryBlackboard.get

Read a key.

get(key: str, *, reader: str) -> Optional[BlackboardEntry]

Parameter Type Default Description
key str
reader str

Returns: Optional[BlackboardEntry]

Method InMemoryBlackboard.put

Compare-and-set write; stale writes are refused with StaleWriteError.

put(key: str, value: Any, *, writer: str, expected_version: Optional[int], acl: Optional[KeyACL] = None, provenance: Optional[dict[str, Any]] = None, producer: Optional[str] = None) -> BlackboardEntry

Parameter Type Default Description
key str
value Any
writer str
expected_version Optional[int]
acl Optional[KeyACL] None
provenance Optional[dict[str, Any]] None
producer Optional[str] None

Returns: BlackboardEntry

Method InMemoryBlackboard.keys

List keys the reader may read.

keys(*, reader: str) -> list[str]

Parameter Type Default Description
reader str

Returns: list[str]

Alias InteractionProtocol

Re-exported from parrot.roost.performatives.InteractionProtocol.

Class KeyACL

Access control for one key: a single writer and a reader list (* = everyone).

Fields:

Field Type Default Description
readers list[str]
writer str

Alias Performative

Re-exported from parrot.roost.performatives.Performative.

Class ReadDeniedError

The reader is not allowed to read the key.

Alias RoostMessage

Re-exported from parrot.roost.messages.RoostMessage.

Class StaleWriteError

A write carried an expected_version that no longer matches; it is refused, never merged.

Attribute Subscriber

Class WriterDeniedError

The writer is not the owner of the key.

Class WriterPolicy

Decides the single owner (writer) of each blackboard key.

Parameter Type Default Description
harness str 'harness' Owner of roster and definitions.
engine str 'engine' Owner of tasks.
coordinator Optional[str] None Owner of digest when set.

Method WriterPolicy.owner_of

Return the owner of key, or "" when no owner can be determined yet.

owner_of(key: str, *, last_request_closer: Optional[str] = None, producer: Optional[str] = None) -> str

Parameter Type Default Description
key str Blackboard key.
last_request_closer Optional[str] None Overrides the recorded last Request closer.
producer Optional[str] None Producer of an artifact (owner of artifacts).

Returns: str — The owning agent name; empty string when undetermined (unknown keys: first writer wins).

Method WriterPolicy.record_request_closed

Record the agent that last closed a Request (digest owner without a coordinator).

record_request_closed(agent_name: str) -> None

Parameter Type Default Description
agent_name str

Attribute logger

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