Agent.getTools()
The .getTools()
method retrieves the tools configured for an agent, resolving them if they’re a function. These tools extend the agent’s capabilities, allowing it to perform specific actions or access external systems.
Usage example
await agent.getTools();
Parameters
options?:
{ runtimeContext?: RuntimeContext }
= {}
Optional configuration object containing runtime context.
Returns
tools:
TTools | Promise<TTools>
The tools configured for the agent, either as a direct object or a promise that resolves to the tools.
Extended usage example
await agent.getTools({
runtimeContext: new RuntimeContext()
});
Options parameters
runtimeContext?:
RuntimeContext
= new RuntimeContext()
Runtime context for dependency injection and contextual information.