🛠️ Tools¶
evoagentx.tools ¶
Tool ¶
Bases: BaseModule
Source code in evoagentx/core/module.py
required
class-attribute
instance-attribute
¶
inputs: {"input_name": {"type": "string", "description": "input description"}, ...}
DockerInterpreterToolkit ¶
DockerInterpreterToolkit(name: str = 'DockerInterpreterToolkit', image_tag: Optional[str] = None, dockerfile_path: Optional[str] = None, require_confirm: bool = False, print_stdout: bool = True, print_stderr: bool = True, host_directory: str = '', container_directory: str = '/home/app/', container_command: str = 'tail -f /dev/null', tmp_directory: str = '/tmp', storage_handler: FileStorageHandler = None, auto_cleanup: bool = True, auto_destroy: bool = True, **kwargs)
Bases: Toolkit
Source code in evoagentx/tools/interpreter_docker.py
cleanup ¶
Clean up the Docker interpreter and storage handler.
Source code in evoagentx/tools/interpreter_docker.py
BrowserToolkit ¶
BrowserToolkit(name: str = 'BrowserToolkit', browser_type: str = 'chrome', headless: bool = False, timeout: int = 10, **kwargs)
Bases: Toolkit
Browser toolkit with auto-initialization and cleanup.
The browser is automatically initialized when any tool is first used, and automatically closed when the toolkit instance is destroyed. No explicit initialization or cleanup is required.
Source code in evoagentx/tools/browser_tool.py
MCPToolkit ¶
MCPToolkit(servers: Optional[list[MCPClient]] = None, config_path: Optional[str] = None, config: Optional[dict[str, Any]] = None)
Source code in evoagentx/tools/mcp.py
get_toolkits ¶
Return a flattened list of all tools across all servers
Source code in evoagentx/tools/mcp.py
BrowserUseToolkit ¶
BrowserUseToolkit(name: str = 'BrowserUseToolkit', model: str = 'gpt-4o-mini', api_key: str = None, browser_type: str = 'chromium', headless: bool = True)
Bases: Toolkit
Toolkit for browser automation using Browser Use.
Initialize the BrowserUse toolkit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Toolkit name |
'BrowserUseToolkit'
|
model
|
str
|
LLM model to use |
'gpt-4o-mini'
|
api_key
|
str
|
API key for the LLM |
None
|
browser_type
|
str
|
Browser type (chromium, firefox, webkit) |
'chromium'
|
headless
|
bool
|
Whether to run browser in headless mode |
True
|
Source code in evoagentx/tools/browser_use.py
GoogleMapsToolkit ¶
Bases: Toolkit
Complete Google Maps Platform toolkit containing all available tools.
Initialize the Google Maps toolkit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api_key
|
str
|
Google Maps Platform API key. If not provided, will try to get from GOOGLE_MAPS_API_KEY environment variable. |
None
|
timeout
|
int
|
Request timeout in seconds |
10
|
name
|
str
|
Toolkit name |
'GoogleMapsToolkit'
|
Source code in evoagentx/tools/google_maps_tool.py
MongoDBToolkit ¶
MongoDBToolkit(name: str = 'MongoDBToolkit', connection_string: str = None, database_name: str = None, local_path: str = None, auto_save: bool = True, read_only: bool = False, **kwargs)
Bases: Toolkit
MongoDB-specific toolkit with simplified design. Automatically handles remote, local file-based, or new database creation.
Initialize the MongoDB toolkit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the toolkit |
'MongoDBToolkit'
|
connection_string
|
str
|
MongoDB connection string (for remote/existing) |
None
|
database_name
|
str
|
Name of the database to use |
None
|
local_path
|
str
|
Path for local file-based database |
None
|
auto_save
|
bool
|
Automatically save changes to local files |
True
|
read_only
|
bool
|
If True, only read operations are allowed (no insert, update, delete) |
False
|
**kwargs
|
Additional connection parameters |
{}
|
Source code in evoagentx/tools/database_mongodb.py
1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 |
|
get_capabilities ¶
Get MongoDB-specific capabilities
Source code in evoagentx/tools/database_mongodb.py
get_local_info ¶
Get information about local database setup
Source code in evoagentx/tools/database_mongodb.py
FileStorageHandler ¶
Bases: StorageBase
Reference implementation showing all available _raw_xxx methods. This class serves as a template for developers creating new storage handlers. Concrete handlers only need to implement the _raw_xxx methods they need.
Initialize the storage handler.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
base_path
|
str
|
Base directory for storage operations (default: current directory) |
'.'
|
**kwargs
|
Additional keyword arguments for parent class initialization |
{}
|
Source code in evoagentx/tools/storage_handler.py
LocalStorageHandler ¶
Bases: FileStorageHandler
Local filesystem storage implementation. Provides all file operations for local storage with default working directory.
Initialize local storage handler.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
base_path
|
str
|
Base directory for storage operations (default: current directory) |
'.'
|
**kwargs
|
Additional keyword arguments for parent class initialization |
{}
|
Source code in evoagentx/tools/storage_handler.py
SupabaseStorageHandler ¶
Bases: FileStorageHandler
Supabase remote storage implementation. Provides file operations via Supabase Storage API with environment-based configuration.
Initialize Supabase storage handler.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bucket_name
|
str
|
Supabase storage bucket name (default: from environment or "default") |
None
|
base_path
|
str
|
Base path for storage operations (default: "/") |
'/'
|
**kwargs
|
Additional keyword arguments for parent class initialization |
{}
|
Source code in evoagentx/tools/storage_handler.py
translate_in ¶
Resolve file path for remote storage
Source code in evoagentx/tools/storage_handler.py
StorageToolkit ¶
StorageToolkit(name: str = 'StorageToolkit', base_path: str = './workplace/storage', storage_handler: LocalStorageHandler = None)
Bases: Toolkit
Comprehensive storage toolkit with local filesystem operations. Provides tools for reading, writing, appending, deleting, moving, copying files, creating directories, and listing files with support for various file formats.
Initialize the storage toolkit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the toolkit |
'StorageToolkit'
|
base_path
|
str
|
Base directory for storage operations (default: ./workplace/storage) |
'./workplace/storage'
|
storage_handler
|
LocalStorageHandler
|
Storage handler instance (defaults to LocalStorageHandler) |
None
|
Source code in evoagentx/tools/storage_file.py
CMDToolkit ¶
CMDToolkit(name: str = 'CMDToolkit', default_shell: str = None, storage_handler: FileStorageHandler = None)
Bases: Toolkit
Command line toolkit that provides safe command execution with permission checking and cross-platform support. Supports Linux, macOS, and Windows.
Initialize the CMDToolkit with a shared command base instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the toolkit |
'CMDToolkit'
|
default_shell
|
str
|
Override default shell detection |
None
|
storage_handler
|
FileStorageHandler
|
Storage handler for file operations |
None
|
Source code in evoagentx/tools/cmd_toolkit.py
RSSToolkit ¶
Bases: Toolkit
Toolkit for RSS feed operations.
Source code in evoagentx/tools/rss_feed.py
SerperAPIToolkit ¶
SerperAPIToolkit(name: str = 'SerperAPIToolkit', api_key: Optional[str] = None, num_search_pages: Optional[int] = 10, max_content_words: Optional[int] = None, default_location: Optional[str] = None, default_language: Optional[str] = 'en', default_country: Optional[str] = 'us', enable_content_scraping: Optional[bool] = True, **kwargs)
Bases: Toolkit
Initialize SerperAPI Toolkit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the toolkit |
'SerperAPIToolkit'
|
api_key
|
str
|
SerperAPI authentication key |
None
|
num_search_pages
|
int
|
Default number of search results to retrieve |
10
|
max_content_words
|
int
|
Default maximum words per result content |
None
|
default_location
|
str
|
Default geographic location |
None
|
default_language
|
str
|
Default interface language |
'en'
|
default_country
|
str
|
Default country code |
'us'
|
enable_content_scraping
|
bool
|
Whether to enable content scraping |
True
|
**kwargs
|
Additional keyword arguments |
{}
|
Source code in evoagentx/tools/search_serperapi.py
SerpAPIToolkit ¶
SerpAPIToolkit(name: str = 'SerpAPIToolkit', api_key: Optional[str] = None, num_search_pages: Optional[int] = 5, max_content_words: Optional[int] = None, default_engine: Optional[str] = 'google', default_location: Optional[str] = None, default_language: Optional[str] = 'en', default_country: Optional[str] = 'us', enable_content_scraping: Optional[bool] = True, **kwargs)
Bases: Toolkit
Initialize SerpAPI Toolkit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the toolkit |
'SerpAPIToolkit'
|
api_key
|
str
|
SerpAPI authentication key |
None
|
num_search_pages
|
int
|
Default number of search results to retrieve |
5
|
max_content_words
|
int
|
Default maximum words per result content |
None
|
default_engine
|
str
|
Default search engine |
'google'
|
default_location
|
str
|
Default geographic location |
None
|
default_language
|
str
|
Default interface language |
'en'
|
default_country
|
str
|
Default country code |
'us'
|
enable_content_scraping
|
bool
|
Whether to enable content scraping |
True
|
**kwargs
|
Additional keyword arguments |
{}
|