tools
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
BaseToolConfig llmling_agent.models.tools Base configuration for agent tools. |
||
CrewAIToolConfig llmling_agent.models.tools Configuration for CrewAI-based tools. |
||
ImportToolConfig llmling_agent.models.tools Configuration for importing tools from Python modules. |
||
LangChainToolConfig llmling_agent.models.tools Configuration for LangChain tools. |
||
ToolCallInfo llmling_agent.models.tools Information about an executed tool call. |
||
ToolInfo llmling_agent.tools.base Information about a registered tool. |
🛈 DocStrings¶
Models for tools.
BaseToolConfig
¶
Bases: BaseModel
Base configuration for agent tools.
Source code in src/llmling_agent/models/tools.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
cache_enabled
class-attribute
instance-attribute
¶
cache_enabled: bool = False
Whether to enable result caching.
description
class-attribute
instance-attribute
¶
description: str | None = None
Optional override for the tool description.
enabled
class-attribute
instance-attribute
¶
enabled: bool = True
Whether this tool is initially enabled.
metadata
class-attribute
instance-attribute
¶
Additional tool metadata.
name
class-attribute
instance-attribute
¶
name: str | None = None
Optional override for the tool name.
priority
class-attribute
instance-attribute
¶
priority: int = 100
Execution priority (lower = higher priority).
requires_capability
class-attribute
instance-attribute
¶
requires_capability: str | None = None
Optional capability needed to use the tool.
requires_confirmation
class-attribute
instance-attribute
¶
requires_confirmation: bool = False
Whether tool execution needs confirmation.
CrewAIToolConfig
¶
Bases: BaseToolConfig
Configuration for CrewAI-based tools.
Source code in src/llmling_agent/models/tools.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
params
class-attribute
instance-attribute
¶
Tool-specific parameters.
type
class-attribute
instance-attribute
¶
type: Literal['crewai'] = Field('crewai', init=False)
CrewAI tool configuration.
get_tool
¶
get_tool() -> ToolInfo
Import and create CrewAI tool.
Source code in src/llmling_agent/models/tools.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
ImportToolConfig
¶
Bases: BaseToolConfig
Configuration for importing tools from Python modules.
Source code in src/llmling_agent/models/tools.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
import_path
instance-attribute
¶
Import path to the tool function.
type
class-attribute
instance-attribute
¶
type: Literal['import'] = Field('import', init=False)
Import path based tool.
get_tool
¶
get_tool() -> ToolInfo
Import and create tool from configuration.
Source code in src/llmling_agent/models/tools.py
61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
LangChainToolConfig
¶
Bases: BaseToolConfig
Configuration for LangChain tools.
Source code in src/llmling_agent/models/tools.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
params
class-attribute
instance-attribute
¶
Tool-specific parameters.
type
class-attribute
instance-attribute
¶
type: Literal['langchain'] = Field('langchain', init=False)
LangChain tool configuration.
get_tool
¶
get_tool() -> ToolInfo
Import and create LangChain tool.
Source code in src/llmling_agent/models/tools.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
ToolCallInfo
¶
Bases: BaseModel
Information about an executed tool call.
Source code in src/llmling_agent/models/tools.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
agent_tool_name
class-attribute
instance-attribute
¶
agent_tool_name: str | None = None
If this tool is agent-based, the name of that agent.
context_data
class-attribute
instance-attribute
¶
context_data: Any | None = None
Optional context data that was passed to the agent's run() method.
error
class-attribute
instance-attribute
¶
error: str | None = None
Error message if the tool call failed.
message_id
class-attribute
instance-attribute
¶
message_id: str | None = None
ID of the message that triggered this tool call.
timestamp
class-attribute
instance-attribute
¶
When the tool was called.
timing
class-attribute
instance-attribute
¶
timing: float | None = None
Time taken for this specific tool call in seconds.
tool_call_id
class-attribute
instance-attribute
¶
ID provided by the model (e.g. OpenAI function call ID).