ExceptionTool Class — langchain Architecture
Architecture documentation for the ExceptionTool class in agent.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c352750f_06b7_5fd4_1121_2c280ee6834a["ExceptionTool"] 5ebe56ae_0ac8_cb13_b5a9_ee567b924009["BaseTool"] c352750f_06b7_5fd4_1121_2c280ee6834a -->|extends| 5ebe56ae_0ac8_cb13_b5a9_ee567b924009 0faae8c7_2812_be15_1073_b6537539cea8["agent.py"] c352750f_06b7_5fd4_1121_2c280ee6834a -->|defined in| 0faae8c7_2812_be15_1073_b6537539cea8 2b57dc3b_923d_2f26_48ec_9f440b4a0015["_run()"] c352750f_06b7_5fd4_1121_2c280ee6834a -->|method| 2b57dc3b_923d_2f26_48ec_9f440b4a0015 716558a9_cfe3_364e_dfa1_cdd9141f3fe8["_arun()"] c352750f_06b7_5fd4_1121_2c280ee6834a -->|method| 716558a9_cfe3_364e_dfa1_cdd9141f3fe8
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/agent.py lines 983–1005
class ExceptionTool(BaseTool):
"""Tool that just returns the query."""
name: str = "_Exception"
"""Name of the tool."""
description: str = "Exception tool"
"""Description of the tool."""
@override
def _run(
self,
query: str,
run_manager: CallbackManagerForToolRun | None = None,
) -> str:
return query
@override
async def _arun(
self,
query: str,
run_manager: AsyncCallbackManagerForToolRun | None = None,
) -> str:
return query
Extends
Source
Frequently Asked Questions
What is the ExceptionTool class?
ExceptionTool is a class in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent.py.
Where is ExceptionTool defined?
ExceptionTool is defined in libs/langchain/langchain_classic/agents/agent.py at line 983.
What does ExceptionTool extend?
ExceptionTool extends BaseTool.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free