Skip to content

InteractableSubAgentTool

This docs was updated at: 2026-02-23

com.paragon.agents.InteractableSubAgentTool  ยท  Class

Extends FunctionTool<InteractableSubAgentTool.InteractableParams>


Wraps any Interactable as a FunctionTool, enabling composition of multi-agent patterns.

This is the primary tool for agent composition. It supports any Interactable implementation including Agent, RouterAgent, ParallelAgents, AgentNetwork, and SupervisorAgent.

Usage Example

// Create a router that handles different domains
RouterAgent router = RouterAgent.builder()
    .addRoute(billingAgent, "billing questions")
    .addRoute(techAgent, "technical support")
    .build();
// Use the router as a tool in a supervisor
InteractableSubAgentTool tool = new InteractableSubAgentTool(router, "Route to specialists");

See Also

  • SubAgentTool
  • Interactable

Since: 1.0

Methods

InteractableSubAgentTool

public InteractableSubAgentTool(@NonNull Interactable target, @NonNull String description)

Creates an InteractableSubAgentTool with a description.

Parameters

Name Description
target the interactable to invoke as a tool
description description of when to use this interactable

InteractableSubAgentTool

public InteractableSubAgentTool(@NonNull Interactable target, @NonNull Config config)

Creates an InteractableSubAgentTool with the specified configuration.

Parameters

Name Description
target the interactable to invoke as a tool
config configuration for context sharing and description

target

public @NonNull Interactable target()

Returns the target interactable.

Returns

the wrapped interactable


sharesState

public boolean sharesState()

Returns whether state is shared.

Returns

true if state is shared


sharesHistory

public boolean sharesHistory()

Returns whether history is shared.

Returns

true if history is shared


builder

public static @NonNull Builder builder()

Creates a new Config builder.


description

public @Nullable String description()

Returns the description.


shareState

public boolean shareState()

Returns whether state is shared.


shareHistory

public boolean shareHistory()

Returns whether history is shared.