langchain.agents.agent_iterator.AgentExecutorIterator¶

class langchain.agents.agent_iterator.AgentExecutorIterator(agent_executor: AgentExecutor, inputs: Any, callbacks: Callbacks = None, *, tags: Optional[list[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, include_run_info: bool = False, yield_actions: bool = False)[source]¶

Iterator for AgentExecutor.

Initialize the AgentExecutorIterator with the given AgentExecutor, inputs, and optional callbacks.

Attributes

agent_executor

color_mapping

inputs

name_to_tool_map

callbacks

tags

metadata

run_name

include_run_info

yield_actions

Methods

__init__(agent_executor, inputs[, ...])

Initialize the AgentExecutorIterator with the given AgentExecutor, inputs, and optional callbacks.

make_final_outputs(outputs, run_manager)

reset()

Reset the iterator to its initial state, clearing intermediate steps, iterations, and time elapsed.

update_iterations()

Increment the number of iterations and update the time elapsed.

__init__(agent_executor: AgentExecutor, inputs: Any, callbacks: Callbacks = None, *, tags: Optional[list[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, include_run_info: bool = False, yield_actions: bool = False)[source]¶

Initialize the AgentExecutorIterator with the given AgentExecutor, inputs, and optional callbacks.

make_final_outputs(outputs: Dict[str, Any], run_manager: Union[CallbackManagerForChainRun, AsyncCallbackManagerForChainRun]) AddableDict[source]¶
reset() None[source]¶

Reset the iterator to its initial state, clearing intermediate steps, iterations, and time elapsed.

update_iterations() None[source]¶

Increment the number of iterations and update the time elapsed.