Skip to content

API Reference parrot.roost.gating

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

parrot.roost.gating

View source

LLM-free gating: decide who wakes from performative, address and protocol state (FEAT-747 M5).

Class Dispatch

The deterministic result that an endpoint must execute.

Fields:

Field Type Default Description
decision DispatchDecision
transition Optional[Transition] None
emit list[RoostMessage]
handler Any None

Class DispatchDecision

Actions an endpoint may take after deterministic gating.

Class GatingDispatcher

Apply address, state and decision gates without invoking an LLM.

Parameter Type Default Description
self_name str
config Optional[RoostAgentConfig]
engine ProtocolEngine
handlers HandlerRegistry
grant GrantPolicy

Attributes:

Attribute Type Description
wakes int Return the number of LLM or replanning wake decisions emitted.

Method GatingDispatcher.addressed

Return whether the message names this endpoint or matches one advertised capability.

addressed(msg: RoostMessage) -> bool

Parameter Type Default Description
msg RoostMessage

Returns: bool

Method GatingDispatcher.dispatch

Apply address, protocol-state, and decision gates without executing their result.

dispatch(msg: RoostMessage, *, hops: int = 0) -> Dispatch

Parameter Type Default Description
msg RoostMessage
hops int 0

Returns: Dispatch

Alias GrantPolicy

Re-exported from parrot.roost.grant.GrantPolicy.

Class Handler

Asynchronous content handler retained by the endpoint after dispatch.

Class HandlerRegistry

Handlers keyed by content_type (dotted class name or media type; "*" wildcard).

Method HandlerRegistry.register

Register a handler and whether its messages need an LLM decision.

register(content_type: str, handler: Handler, *, needs_decision: bool = False) -> None

Parameter Type Default Description
content_type str
handler Handler
needs_decision bool False

Method HandlerRegistry.resolve

Return an exact handler first, then the wildcard handler if registered.

resolve(content_type: Optional[str]) -> Optional[tuple[Handler, bool]]

Parameter Type Default Description
content_type Optional[str]

Returns: Optional[tuple[Handler, bool]]

Alias InteractionProtocol

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

Alias Performative

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

Alias ProtocolEngine

Re-exported from parrot.roost.protocols.ProtocolEngine.

Alias RoostAgentConfig

Re-exported from parrot.roost.directory.RoostAgentConfig.

Alias RoostMessage

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

Alias Transition

Re-exported from parrot.roost.protocols.Transition.

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