Skip to content

API Reference parrot.bots.factory.tools.introspection

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

parrot.bots.factory.tools.introspection

View source

Introspection helpers — the catalog the builders show to their LLM.

Every helper has a plain async function (callable from builder code) and a @tool-decorated wrapper of the same name suffix for LLM invocation.

Alias ToolkitRegistry

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

Alias agent_registry

Re-exported from parrot.registry.agent_registry.

Function list_available_toolkits

Return the registered toolkit catalog: name + class docstring summary.

list_available_toolkits() -> List[Dict[str, str]]

Returns: List[Dict[str, str]]

Function list_available_tools

Return the catalog of tools a builder may reference by name.

Two sources, merged:

  • get_toolkit_resolver().registry_paths() — the declarative TOOL_REGISTRY maps published by installed packages (parrot_tools and friends). Read without importing anything, so the full catalog is cheap.
  • the @tool-decorated functions re-exported at the parrot.tools top level, which carry a human-written description.

The registry is the reason this is not just the second source: scanning dir(parrot.tools) alone sees only what happens to be re-exported there, which is a small fraction of the registry — so a builder was being shown a catalog that omitted most installed tools and then (correctly) refused to use them.

(This function previously opened with from parrot.tools import _imports, a module that does not exist, so every call raised ImportError before reaching the scan.)

list_available_tools() -> List[Dict[str, str]]

Returns: List[Dict[str, str]] — Name-sorted entries of {name, description, kind, dotted_path}. description is empty for a registry entry that was not imported; resolving it would mean importing every tool in the catalog.

Function list_registered_agents

List agents currently known to AgentRegistry (YAML + decorator).

list_registered_agents() -> List[Dict[str, Any]]

Returns: List[Dict[str, Any]]

Function load_agent_definition

Return the BotConfig of a registered agent as a dict (for cloning).

Returns None if the agent is not registered or has no config (i.e. was registered programmatically without YAML metadata).

load_agent_definition(name: str) -> Optional[Dict[str, Any]]

Parameter Type Default Description
name str

Returns: Optional[Dict[str, Any]]

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