# AgentExecutorIterator

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/agents/agent_iterator/AgentExecutorIterator)

Iterator for AgentExecutor.

## Signature

```python
AgentExecutorIterator(
    self,
    agent_executor: AgentExecutor,
    inputs: Any,
    callbacks: Callbacks = 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

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `agent_executor` | `AgentExecutor` | Yes | The `AgentExecutor` to iterate over. |
| `inputs` | `Any` | Yes | The inputs to the `AgentExecutor`. |
| `callbacks` | `Callbacks` | No | The callbacks to use during iteration. (default: `None`) |
| `tags` | `list[str] \| None` | No | The tags to use during iteration. (default: `None`) |
| `metadata` | `dict[str, Any] \| None` | No | The metadata to use during iteration. (default: `None`) |
| `run_name` | `str \| None` | No | The name of the run. (default: `None`) |
| `run_id` | `UUID \| None` | No | The ID of the run. (default: `None`) |
| `include_run_info` | `bool` | No | Whether to include run info in the output. (default: `False`) |
| `yield_actions` | `bool` | No | Whether to yield actions as they are generated. (default: `False`) |

## Constructors

```python
__init__(
    self,
    agent_executor: AgentExecutor,
    inputs: Any,
    callbacks: Callbacks = 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,
)
```

| Name | Type |
|------|------|
| `agent_executor` | `AgentExecutor` |
| `inputs` | `Any` |
| `callbacks` | `Callbacks` |
| `tags` | `list[str] \| None` |
| `metadata` | `dict[str, Any] \| None` |
| `run_name` | `str \| None` |
| `run_id` | `UUID \| None` |
| `include_run_info` | `bool` |
| `yield_actions` | `bool` |


## Properties

- `inputs`
- `callbacks`
- `tags`
- `metadata`
- `run_name`
- `run_id`
- `include_run_info`
- `yield_actions`
- `agent_executor`
- `name_to_tool_map`
- `color_mapping`

## Methods

- [`reset()`](https://reference.langchain.com/python/langchain-classic/agents/agent_iterator/AgentExecutorIterator/reset)
- [`update_iterations()`](https://reference.langchain.com/python/langchain-classic/agents/agent_iterator/AgentExecutorIterator/update_iterations)
- [`make_final_outputs()`](https://reference.langchain.com/python/langchain-classic/agents/agent_iterator/AgentExecutorIterator/make_final_outputs)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/311675a517f51ec6c77454124293c58df517e952/libs/langchain/langchain_classic/agents/agent_iterator.py#L40)