_take_next_step() — langchain Function Reference
Architecture documentation for the _take_next_step() function in agent.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 37c42b3f_8517_1cf2_c825_b42e1f600be2["_take_next_step()"] ec1d7866_e6a8_7cbe_b150_f82463cf2c7f["AgentExecutor"] 37c42b3f_8517_1cf2_c825_b42e1f600be2 -->|defined in| ec1d7866_e6a8_7cbe_b150_f82463cf2c7f 57ca57d7_9f7c_b17a_52ef_4ff0afd3568a["_call()"] 57ca57d7_9f7c_b17a_52ef_4ff0afd3568a -->|calls| 37c42b3f_8517_1cf2_c825_b42e1f600be2 09b83002_e8e5_6087_eb53_02549c07dbb4["_consume_next_step()"] 37c42b3f_8517_1cf2_c825_b42e1f600be2 -->|calls| 09b83002_e8e5_6087_eb53_02549c07dbb4 9dcff3d2_e93f_4d1d_86be_c6326804d56b["_iter_next_step()"] 37c42b3f_8517_1cf2_c825_b42e1f600be2 -->|calls| 9dcff3d2_e93f_4d1d_86be_c6326804d56b style 37c42b3f_8517_1cf2_c825_b42e1f600be2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/agent.py lines 1281–1299
def _take_next_step(
self,
name_to_tool_map: dict[str, BaseTool],
color_mapping: dict[str, str],
inputs: dict[str, str],
intermediate_steps: list[tuple[AgentAction, str]],
run_manager: CallbackManagerForChainRun | None = None,
) -> AgentFinish | list[tuple[AgentAction, str]]:
return self._consume_next_step(
list(
self._iter_next_step(
name_to_tool_map,
color_mapping,
inputs,
intermediate_steps,
run_manager,
),
),
)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _take_next_step() do?
_take_next_step() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent.py.
Where is _take_next_step() defined?
_take_next_step() is defined in libs/langchain/langchain_classic/agents/agent.py at line 1281.
What does _take_next_step() call?
_take_next_step() calls 2 function(s): _consume_next_step, _iter_next_step.
What calls _take_next_step()?
_take_next_step() is called by 1 function(s): _call.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free