Toolkit
A collection of tools that can be used by an agent.Class
Groups related tools together with instructions for the agent.
Constructor
Initialize a new Toolkit.
Parameters
Descriptive name for the toolkit.
List of tools (callables or Function objects) to include.
Instructions for the toolkit. Helps the agent understand when and how to use these tools.
Automatically register all tools in the list.
Methods
Register a function with the toolkit.Parameters:
function(Callable | Function): Function to registername(str | None): Optional custom name
Get all registered functions.
Get a function by name.Parameters:
name(str): Function name
Function | None: Function if found, None otherwise
Usage Examples
Function
Model for storing functions that can be called by an agent.Class
Represents a single tool function that can be called by the agent.
Constructor
Create a Function object manually.
Parameters
Name of the function.
Description of what the function does.
JSON Schema object describing function parameters.
The function to be called.
If True, the function call will show the result.
If True, the agent will stop after the function call.
If True, the function will require confirmation before execution.
If True, the function will be executed outside the agent’s control.
Class Methods
Create a Function from a callable.Parameters:
c(Callable): Python function to convertname(str | None): Optional custom name
Function: Function object
Methods
Convert function to dictionary for API calls.Returns:
Dict[str, Any]: Function dictionary with name, description, parameters
Call the function entrypoint.Parameters:
*args: Positional arguments**kwargs: Keyword arguments
Any: Function result
ValueError: If entrypoint is None
Usage Examples
RESTAPIToolkit
Create tools from REST API endpoints (Postman collections).Class
Toolkit that loads REST API tools from Postman collections.
Class Methods
Create RESTAPIToolkit from a Postman collection file.Parameters:
collection_path(str): Path to Postman collection JSON filebase_url(str): Base URL for API requestsheaders(Dict[str, str] | None): Optional default headersauth(Any | None): Optional authentication object
RESTAPIToolkit: Toolkit with API tools
Usage Examples
Related
- Tools → - Complete guide to adding capabilities
- Postman API Example → - REST API tools example
- Simple Tools Example → - Custom functions example

