tools
#
Tools are classes that an Agent uses to interact with the world.
Each tool has a description. Agent uses the description to choose the right tool for the job.
Class hierarchy:
RunnableSerializable --> BaseTool --> <name>Tool # Examples: AIPluginTool, BaseGraphQLTool
<name> # Examples: BraveSearch, HumanInputRun
Main helpers:
CallbackManagerForToolRun, AsyncCallbackManagerForToolRun
Classes
Base class for all LangChain tools. |
|
Base class for toolkits containing related tools. |
|
Annotation for tool arguments that are injected at runtime. |
|
Annotation for injecting the tool call ID. |
|
Raised when args_schema is missing or has an incorrect type annotation. |
|
Exception thrown when a tool execution error occurs. |
|
Input to the retriever. |
|
Tool that takes in function or coroutine directly. |
|
Tool that can operate on any number of inputs. |
Functions
Create a pydantic schema from a function's signature. |
|
Get all annotations from a Pydantic BaseModel and its parents. |
|
|
Convert a Runnable into a BaseTool. |
Make tools out of functions, can be used with or without arguments. |
|
Render the tool name and description in plain text. |
|
Render the tool name, description, and args in plain text. |
|
|
Create a tool to do retrieval of documents. |