Skip to main content

Overview

Methods

getAgents()

Get all agents (local + adopted).
Example:

findById()

Find an agent by its ID.
Example:

findByName()

Find an agent by its name.
Example:

getVisibleAgentsFor()

Get agents visible to a specific agent.
Example:

getAgentsAsTools()

Get tool definitions for all agents.
Agents are automatically registered as tools so they can be called by other agents or the MCP client. Example:

getAgentToolsFor()

Get tool definitions for agents visible to a specific agent.
Example:

getInlineAgents()

Get only agents defined inline in this registry.

listAllInstances()

List all agent instances (locals + adopted).

subscribe()

Subscribe to agent change events.
Returns: Unsubscribe function. Example:

getCapabilities()

Get MCP capabilities for agents.

hasAny()

Check if any agents exist.

adoptFromChild()

Adopt agents from a child registry.

removeChild()

Remove a child registry and clean up subscriptions.

dispose()

Dispose registry and clean up all child subscriptions.

Change Events

Indexes

Agent Visibility

Agents can control which other agents they can see and call:
Use getVisibleAgentsFor() to query visibility:

Agents as Tools

Agents are automatically registered in the parent scope’s ToolRegistry: