Skip to main content
The agent implementations in llamaindex/agent are deprecated. Use @llamaindex/workflow for building agentic workflows.

Migration Guide

Instead of using ReActAgent, migrate to workflow-based agents:

Before (Deprecated)

Legacy Documentation

ReActAgent

Reasoning and Acting agent that uses tools to solve problems.

Constructor Options

LLM
Language model (defaults to Settings.llm)
BaseTool[]
required
Array of tools the agent can use
boolean
default:false
Whether to log reasoning steps
number
default:10
Maximum reasoning iterations

Methods

method
Chat with the agent
method
Reset agent memory

Why Migrate?

  1. More Flexible: Workflows provide fine-grained control over agent behavior
  2. Better Streaming: Built-in support for streaming events
  3. Composable: Easily combine multiple workflows
  4. State Management: Explicit state handling with Context
  5. Active Development: Workflows are actively maintained

See Also