Overview
TheAgentsClient defines methods to call agents, ask questions, list available toolkits, list available agents, and invoke specific tools. It uses an underlying RoomClient to send requests.
-
AgentsClient: The main client class for interacting with agents. It handles:
- Calling agents
- Asking questions to agents
- Listing available toolkits
- Listing available agents
- Invoking specific tools
- AgentDescription: Describes an agent, its input/output schemas, requirements, labels, etc.
- ToolDescription: Describes an individual tool, including metadata and input schemas.
- ToolkitDescription: Groups multiple tools under one toolkit name, allowing retrieval of individual tools by name.
- ToolkitConfiguration: Describes which tools in a toolkit you want to enable or use.
API Methods
Call
- Description:
Send a request to an agent to perform an action. (Python usesmake_call; other SDKs usecall.) - Parameters:
name: The agent name.url: The route on the agent to call.arguments: Payload to send.
- Returns:
None(request is fire-and-forget; handle results in your agent).
Ask
- Description:
Send a prompt to an agent and get a JSON answer. Optionally allow specific toolkits for the request. - Parameters:
agent: Agent name.arguments: Payload for the agent.requires(optional): List of allowed toolkits/tools.on_behalf_of/onBehalfOf(optional): Act as another participant.
- Returns:
JsonResponsewith ananswerobject.
List toolkits
- Description: Get all available toolkits and their tools.
- Parameters:
participant_id(optional, Python): Filter toolkits for a given participant.
- Returns: Array of
ToolkitDescription.
List agents
- Description: List agents available in the room.
- Parameters: None.
- Returns: Array of
AgentDescription.
Invoke tool
- Description:
Invoke a specific tool inside a toolkit directly (without going through an agent). - Parameters:
toolkit: Toolkit name.tool: Tool name.arguments: Payload for the tool.participant_id/on_behalf_of_id(optional, Python): Act as another participant.caller_context(optional, Python): Additional context metadata for the call.
- Returns:
Response(JsonResponsein most SDKs) with tool output.
Invoke tool (with request body)
- Description:
Send aRequestobject (with optional binary payload) directly to a tool. - Availability: Python SDK (
invoke_request_tool); other SDKs can send raw arguments viainvokeTool. - Parameters:
toolkit: Toolkit name.tool: Tool name.request: ARequestobject carrying headers/args and optional bytes viaget_data().participant_id/on_behalf_of_id(optional, Python): Act as another participant.caller_context(optional, Python): Extra context metadata.
- Returns:
Response(JsonResponseor stream) from the tool.
Typical Workflow
-
Instantiate
RoomClientNodeJs -
List Available Agents and Toolkits
NodeJs
-
Ask a Question to an Agent
NodeJs
-
Invoke a Specific Tool (If needed)
NodeJs
-
Call an Agent Directly (If the agent supports such calls)
NodeJs
AgentDescription
Represents an agent’s descriptive information, including schemas for input/output data and any special requirements the agent may have (for instance, a required toolkit or schema).- Python
- Dart
- TypeScript
- .NET
name: The agent nametitle: The agent title.description: Detailed description of the agent’s behavior or purpose.input_schema: JSON schema describing the input format the agent expects.output_schema(optional): JSON schema describing the agent’s output format.requires(optional): A list ofRequirementobjects (e.g.,RequiredToolkit,RequiredSchema).supports_toolsIndicates whether the agent can use external tools.labels(optional): Tags associated with the agent.
ToolDescription
Represents metadata and input requirements for an individual tool. Tools can exist independently or be grouped in aToolkitDescription.
- Python
- Dart
- TypeScript
- .NET
nameThe tool’s name.title: The tool’s title.description: The tool’s description.input_schema: JSON Schema describing the payload expected when invoking the tool.thumbnail_url(optional): URL for an icon or thumbnail.defs(optional): Additional JSON Schema definitions referenced byinputSchema.pricing(optional): Pricing metadata, if the tool carries usage costs.supports_context(optional; defaults toFalse): Indicates whether the tool can consume conversational context automatically.
ToolkitDescription
Groups multiple tools under a single toolkit. Allows easy retrieval of tools by name and provides a common structure for describing a set of tools.- Python
- Dart
- TypeScript
- .NET
name: The toolkit’s name.title: Display title for the toolkit.description: The toolkit’s description.tools: A list ofToolDescription.thumbnail_url(optional): Thumbnail image URL when provided.
ToolkitConfiguration
Specifies how a particular toolkit should be used. It can indicate whether to use all tools or only specific ones within the toolkit.Conclusion
TheAgentsClient module provides a flexible, high-level API for managing and interacting with agents and toolkits in a distributed or plugin-based environment. Use AgentsClient for routine operations—listing agents and toolkits, invoking tools, or asking questions—and rely on the description classes (AgentDescription, ToolDescription, and ToolkitDescription) to manage the metadata and validation for those resources.
For more details on the underlying request/response flow, refer to your implementation of RoomClient, Response, and JsonResponse.