ReAct Agents (Legacy)

Agents that reason and call tools in a loop

This documentation covers a legacy agent architecture.

For new projects, use the current Letta architecture which provides better memory management and reasoning capabilities. See Agent Memory & Architecture.

ReAct agents are based on the ReAct research paper and follow a “Reason then Act” pattern. In Letta, agents using the ReAct architecture can reason and call tools in a loop but lack the long-term memory capabilities of standard Letta agents.

Architecture

ReAct agents maintain conversation context through summarization but cannot edit their own memory or access historical messages beyond the context window.

Key differences from MemGPT agents:

  • No read-write memory blocks or memory editing tools
  • No access to evicted conversation history
  • Simple conversation summarization instead of recursive memory management
  • Tool calling without persistent state beyond the current session

When to use ReAct agents:

  • Tool-calling tasks that don’t require long-term memory
  • Stateless interactions where conversation summarization is sufficient

Creating ReAct Agents

To create a ReAct agent, simply use the react_agent agent type when creating your agent. There is no need to pass any memory blocks to the agent, since ReAct agents do not have any long-term memory.

1import { LettaClient } from '@letta-ai/letta-client'
2
3const client = new LettaClient({ token: "LETTA_API_KEY" });
4
5// create the ReAct agent
6const agent = await client.agents.create({
7 agentType: "react_agent",
8 model: "openai/gpt-4.1",
9 embedding: "openai/text-embedding-3-small",
10 tools: ["web_search", "run_code"]
11});