tooluniverse.agentic_tool module¶
- class tooluniverse.agentic_tool.datetime(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])[source][source]¶
Bases:
date
The year, month and day arguments are required. tzinfo may be None, or an instance of a tzinfo subclass. The remaining arguments may be ints.
- now()[source]¶
Returns new datetime object representing current time local to tz.
- tz
Timezone object.
If no tz is specified, uses local timezone.
- isoformat()[source]¶
[sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM]. sep is used to separate the year from the time, and defaults to ‘T’. The optional argument timespec specifies the number of additional terms of the time to include. Valid options are ‘auto’, ‘hours’, ‘minutes’, ‘seconds’, ‘milliseconds’ and ‘microseconds’.
- class tooluniverse.agentic_tool.BaseTool(tool_config)[source][source]¶
Bases:
object
- classmethod get_default_config_file()[source][source]¶
Get the path to the default configuration file for this tool type.
This method uses a robust path resolution strategy that works across different installation scenarios:
Installed packages: Uses importlib.resources for proper package resource access
Development mode: Falls back to file-based path resolution
Legacy Python: Handles importlib.resources and importlib_resources
Override this method in subclasses to specify a custom defaults file.
- Returns:
Path or resource object pointing to the defaults file
- tooluniverse.agentic_tool.register_tool(tool_type_name=None, config=None)[source][source]¶
Decorator to automatically register tool classes and their configs.
- Usage:
@register_tool(‘CustomToolName’, config={…}) class MyTool:
pass
- tooluniverse.agentic_tool.get_logger(name: str | None = None) Logger [source][source]¶
Get a logger instance
- Parameters:
name (str, optional) – Logger name (usually __name__)
- Returns:
Logger instance
- Return type:
- class tooluniverse.agentic_tool.AzureOpenAIClient(model_id: str, api_version: str | None, logger)[source][source]¶
Bases:
BaseLLMClient
- DEFAULT_MODEL_LIMITS: Dict[str, Dict[str, int]] = {'embedding-ada': {'context_window': 8192, 'max_output': 8192}, 'gpt-4.1': {'context_window': 1047576, 'max_output': 32768}, 'gpt-4.1-mini': {'context_window': 1047576, 'max_output': 32768}, 'gpt-4.1-nano': {'context_window': 1047576, 'max_output': 32768}, 'gpt-4o': {'context_window': 128000, 'max_output': 16384}, 'gpt-4o-0806': {'context_window': 128000, 'max_output': 16384}, 'gpt-4o-1120': {'context_window': 128000, 'max_output': 16384}, 'gpt-4o-mini-0718': {'context_window': 128000, 'max_output': 16384}, 'o3-mini': {'context_window': 200000, 'max_output': 100000}, 'o3-mini-0131': {'context_window': 200000, 'max_output': 100000}, 'o4-mini': {'context_window': 200000, 'max_output': 100000}, 'o4-mini-0416': {'context_window': 200000, 'max_output': 100000}, 'text-embedding-3-large': {'context_window': 8192, 'max_output': 8192}, 'text-embedding-3-small': {'context_window': 8192, 'max_output': 8192}}[source]¶
- class tooluniverse.agentic_tool.GeminiClient(model_name: str, logger)[source][source]¶
Bases:
BaseLLMClient
- class tooluniverse.agentic_tool.AgenticTool(tool_config: Dict[str, Any])[source][source]¶
Bases:
BaseTool
Generic wrapper around LLM prompting supporting JSON-defined configs with prompts and input arguments.
- static has_any_api_keys() bool [source][source]¶
Check if any API keys are available across all supported API types.
- Returns:
True if at least one API type has all required keys, False otherwise
- Return type:
- run(arguments: Dict[str, Any]) Dict[str, Any] [source][source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- get_availability_status() Dict[str, Any] [source][source]¶
Get detailed availability status of the tool.