LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    Standard Tests
    Text Splitters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicagentsagent_iteratorAgentExecutorIterator
    Class●Since v1.0

    AgentExecutorIterator

    Copy
    AgentExecutorIterator(
      self,
      agent_executor: AgentExecutor,
      inputs: Any,
      callbacks: Callbacks = 

    Constructors

    Attributes

    Methods

    View source on GitHub
    None
    ,
    *
    ,
    tags
    :
    list
    [
    str
    ]
    |
    None
    =
    None
    ,
    metadata
    :
    dict
    [
    str
    ,
    Any
    ]
    |
    None
    =
    None
    ,
    run_name
    :
    str
    |
    None
    =
    None
    ,
    run_id
    :
    UUID
    |
    None
    =
    None
    ,
    include_run_info
    :
    bool
    =
    False
    ,
    yield_actions
    :
    bool
    =
    False
    )

    Parameters

    NameTypeDescription
    agent_executor*AgentExecutor

    The AgentExecutor to iterate over.

    inputs*Any

    The inputs to the AgentExecutor.

    callbacksCallbacks
    Default:None

    The callbacks to use during iteration.

    tagslist[str] | None
    Default:None
    metadatadict[str, Any] | None
    Default:None
    run_namestr | None
    Default:None
    run_idUUID | None
    Default:None
    include_run_infobool
    Default:False
    yield_actionsbool
    Default:False
    constructor
    __init__
    NameType
    agent_executorAgentExecutor
    inputsAny
    callbacksCallbacks
    tagslist[str] | None
    metadatadict[str, Any] | None
    run_namestr | None
    run_idUUID | None
    include_run_infobool
    yield_actionsbool
    attribute
    inputs: dict[str, str]

    The inputs to the AgentExecutor.

    attribute
    callbacks: Callbacks
    attribute
    tags: list[str] | None
    attribute
    metadata: dict[str, Any] | None
    attribute
    run_name: str | None
    attribute
    run_id: UUID | None
    attribute
    include_run_info: bool
    attribute
    yield_actions: bool
    attribute
    agent_executor: AgentExecutor

    The AgentExecutor to iterate over.

    attribute
    name_to_tool_map: dict[str, BaseTool]

    A mapping of tool names to tools.

    attribute
    color_mapping: dict[str, str]

    A mapping of tool names to colors.

    method
    reset

    Reset the iterator to its initial state.

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

    method
    update_iterations

    Increment the number of iterations and update the time elapsed.

    method
    make_final_outputs

    Make final outputs for the iterator.

    Iterator for AgentExecutor.

    The tags to use during iteration.

    The metadata to use during iteration.

    The name of the run.

    The ID of the run.

    Whether to include run info in the output.

    Whether to yield actions as they are generated.