Tools are what make agents capable of real-world action. While LLMs alone can only generate text, agents equipped with tools can search the web, run queries, send emails, call APIs, and perform any action you define.Documentation Index
Fetch the complete documentation index at: https://docs.definable.ai/llms.txt
Use this file to discover all available pages before exploring further.
How Tools Work
- The agent sends tool definitions (JSON Schema) to the model.
- The model decides which tools to call based on the user’s message.
- Tools execute and results are returned to the model.
- The model processes results and continues (or returns a final response).
- The loop repeats until the model responds without tool calls.
When using
arun(), multiple tool calls from the same model response execute concurrently.Guides
Create Tools
Write custom Python functions as tools.
Parameters
Type hints, descriptions, and JSON Schema.
Hooks
Run logic before and after execution.
Caching
Cache results for identical arguments.
Async Tools
Async tool functions for concurrent execution.
Dependencies
Inject services and state into tools.