Skip to content

API Reference parrot.roost.directory

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

parrot.roost.directory

View source

Roost capability-directory models (FEAT-747 M3). Imported by parrot.registry — keep it dependency-light.

Class CapabilityMatch

One ranked agent match for a requested capability.

Fields:

Field Type Default Description
agent_name str
cap_id str
locality Locality
cost float
kind str 'local'
backing str 'llm_backed'
score float 1.0
category_hash Optional[str] None

Alias CarrierKind

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

Class InterAgentGrant

Capability-pattern scopes an agent may call (hr.*, *). Empty means not granted.

Fields:

Field Type Default Description
scopes list[str]

Class Locality

Relative location of a registered agent, ordered from nearest to farthest.

Class RoostAgentConfig

What an agent advertises on its registry entry and how it is reached.

Fields:

Field Type Default Description
capabilities list[str]
categories list[str]
category_hashes dict[str, str]
keywords list[str]
carrier CarrierKind CarrierKind.IN_PROCESS
host_id Optional[str] None
cost float 1.0
backing Literal['deterministic', 'llm_backed'] 'llm_backed'
grant Optional[InterAgentGrant] None
bid Optional[dict[str, float]] None

Function locality_of

Classify where an agent runs relative to the caller.

locality_of(config: Optional[RoostAgentConfig], *, kind: str, local_host_id: Optional[str]) -> Locality

Parameter Type Default Description
config Optional[RoostAgentConfig] Roost advertisement for the agent, if it has one.
kind str Registry entry kind, including remote a2a and squawk entries.
local_host_id Optional[str] Host identifier of the caller.

Returns: Locality — The deterministic locality classification.

Function rank

Stable sort by locality, cost, and descending score.

rank(matches: Iterable[CapabilityMatch]) -> list[CapabilityMatch]

Parameter Type Default Description
matches Iterable[CapabilityMatch] Capability matches to order.

Returns: list[CapabilityMatch] — A new list ordered from the preferred match to the least preferred match.

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