Skip to content

API Reference parrot.bots.factory.tools.openapi_register

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

parrot.bots.factory.tools.openapi_register

View source

Register a third-party OpenAPI spec as a runtime-discoverable toolkit.

This is how the factory turns "create an agent for LinkedIn" into a working agent without a hand-written LinkedInToolkit: download the OpenAPI spec, materialise an OpenAPIToolkit subclass scoped to that service, register it under a stable name in ToolkitRegistry and reference it by name in the generated AgentDefinition.toolkits list.

Alias OpenAPIToolkit

Re-exported from parrot.tools.openapitoolkit.OpenAPIToolkit.

Alias ToolkitRegistry

Re-exported from parrot.tools.registry.ToolkitRegistry.

Function register_openapi_toolkit

Materialise + register an OpenAPI toolkit.

register_openapi_toolkit(spec: str, service: str, *, base_url: Optional[str] = None, auth_type: str = 'bearer', api_key_env: Optional[str] = None, toolkit_name: Optional[str] = None) -> Dict[str, Any]

Parameter Type Default Description
spec str URL, file path, JSON/YAML string, or dict containing the OpenAPI document.
service str Logical service name used as tool-name prefix (e.g. "linkedin").
base_url Optional[str] None Override the servers entry from the spec.
auth_type str 'bearer' "bearer", "apikey" or "basic".
api_key_env Optional[str] None Optional env var name to surface in the registration metadata so the YAML can reference it via interpolation.
toolkit_name Optional[str] None Override the registry name (defaults to "openapi_<service>").

Returns: Dict[str, Any] — Dict with toolkit_name (what to put in AgentDefinition.toolkits) and a metadata block describing the registration.

Alias tool

Re-exported from parrot.tools.decorators.tool.

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