Skip to content

API Reference parrot.interagent.compiler

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

parrot.interagent.compiler

View source

Compile Squawk capabilities into provider-neutral core tool definitions.

Alias CAP_ID_PATTERN

Re-exported from parrot.interagent.contract.CAP_ID_PATTERN.

Alias MediaType

Re-exported from parrot.interagent.descriptors.MediaType.

Alias SquawkCapability

Re-exported from parrot.interagent.contract.SquawkCapability.

Alias ToolDefinition

Re-exported from parrot.tools.manager.ToolDefinition.

Function affordances_for

Return local tools that accept a handle of the given media type.

affordances_for(media_type: MediaType | None) -> tuple[str, ...]

Parameter Type Default Description
media_type MediaType | None

Returns: tuple[str, ...]

Function cap_id_for

Convert a provider-safe tool name back into a capability id.

Exact inverse of :func:tool_name_for because CAP_ID_PATTERN forbids __ and edge underscores inside a segment.

cap_id_for(tool_name: str) -> str

Parameter Type Default Description
tool_name str

Returns: str

Raises:

  • ValueError — If the name does not map back to a valid capability id.

Function compile_capability

Compile a capability while preserving its Squawk routing identity.

compile_capability(cap: SquawkCapability, *, function: Callable) -> ToolDefinition

Parameter Type Default Description
cap SquawkCapability Capability definition to expose through the core tool manager.
function Callable Caller-supplied capability wrapper.

Returns: ToolDefinition — A provider-neutral definition suitable for ToolManager registration.

Function tool_name_for

Convert a capability id into a provider-safe tool name.

tool_name_for(cap_id: str) -> str

Parameter Type Default Description
cap_id str

Returns: 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