# What Are the Agent Types Available in Hello-Agents? A Complete Guide to Simple, Reflection, ReAct, and Plan-and-Solve Agents

> Explore Hello-Agents' four main agent types: Simple, Reflection, ReAct, and Plan-and-Solve. Understand their unique LLM interaction patterns for advanced AI applications. Learn how to select the right agent for your needs.

- Repository: [Datawhale/hello-agents](https://github.com/datawhalechina/hello-agents)
- Tags: deep-dive
- Published: 2026-05-09

---

**Hello-Agents ships with four core agent types—SimpleAgent, ReflectionAgent, ReActAgent, and PlanAndSolveAgent—all inheriting from the abstract base `Agent` class defined in [`core/agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/core/agent.py) to provide distinct LLM interaction patterns ranging from basic conversation to iterative self-reflection and strategic planning.**

The hello-agents repository by Datawhale China provides a lightweight, extensible toolkit for building language model applications. Understanding the specific **agent types available in hello-agents** is essential for selecting the right architecture for your task, whether you need straightforward question answering or complex multi-step reasoning workflows.

## SimpleAgent: Direct Conversational Interface

**SimpleAgent** implements the most straightforward interaction pattern: a conversational agent that optionally invokes registered tools while maintaining message history.

Located in [`agents/simple_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/agents/simple_agent.py), this agent type is ideal for quick Q&A tasks, customer support chatbots, or scenarios requiring minimal tool usage like calculator or search calls. It accepts a `system_prompt`, an `llm` instance (`HelloAgentsLLM`), and exposes the standard `run(input_text, **kwargs) → str` interface that returns the final assistant response.

```python
from agents.simple_agent import SimpleAgent
from core.llm import HelloAgentsLLM

llm = HelloAgentsLLM(provider="openai", model="gpt-4")
simple = SimpleAgent(name="ChatBot", llm=llm, system_prompt="You are a helpful assistant.")
response = simple.run("What is the capital of France?")
print(response)

```

## ReflectionAgent: Iterative Self-Correction

**ReflectionAgent** implements a self-reflective workflow where the LLM critiques its own output and iteratively refines the answer until reaching satisfactory quality or exhausting the maximum iteration limit.

Defined in [`agents/reflection_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/agents/reflection_agent.py), this pattern excels at tasks requiring progressive improvement such as code generation, report writing, or complex analysis. The agent runs an initial pass, requests a critique from the LLM, then refines the response, repeating this cycle up to `max_iterations` times.

```python
from agents.reflection_agent import ReflectionAgent

reflex = ReflectionAgent(name="Reflex", llm=llm, max_iterations=3)
final = reflex.run("Write a short summary of the novel *Dune*.")
print(final)

```

## ReActAgent: Interleaved Reasoning and Action

**ReActAgent** realizes the **ReAct** (Reason → Act) paradigm, where the LLM produces explicit reasoning steps and tool calls within the same response stream, observing results before continuing.

Implemented in [`agents/react_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/agents/react_agent.py), this agent type suits scenarios requiring interleaved reasoning and external tool execution, such as multi-step web research or data retrieval tasks. The agent parses its own reasoning, executes actions via the tool registry, and incorporates observations back into the context before proceeding to the next thought.

```python
from agents.react_agent import ReActAgent

react = ReActAgent(name="ReActBot", llm=llm, system_prompt="You can browse the web.")
result = react.run("Find the latest COVID-19 statistics for Italy.")
print(result)

```

## PlanAndSolveAgent: Strategy Before Execution

**PlanAndSolveAgent** (also referenced as Plan-and-Solve) first prompts the LLM to generate a high-level plan, then executes that plan step-by-step with optional tool invocation.

Found in [`agents/plan_solve_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/agents/plan_solve_agent.py), this approach benefits problems where strategic overview improves execution quality, such as project planning, workflow automation, or multi-stage data processing pipelines. The separation between planning and execution phases helps maintain coherence in complex, multi-step tasks.

```python
from agents.plan_solve_agent import PlanAndSolveAgent

planner = PlanAndSolveAgent(name="Planner", llm=llm)
plan_result = planner.run("Create a weekly workout schedule for a beginner.")
print(plan_result)

```

## Core Architecture and Shared Behavior

All four agent types inherit from the abstract `Agent` base class in [`core/agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/core/agent.py) and share consistent interfaces:

- **Initialization**: Each accepts `name`, `llm` (a `HelloAgentsLLM` instance), and optional `system_prompt` parameters
- **Execution**: All implement `run(input_text, **kwargs) → str` to process inputs and return string responses
- **State management**: They maintain internal message history via [`core/message.py`](https://github.com/datawhalechina/hello-agents/blob/main/core/message.py) data structures, accessible via `agent.get_history()`
- **Extensibility**: Agents can be composed (e.g., a `ReflectionAgent` can embed a `SimpleAgent` for the initial generation pass)

Additional example implementations (such as `FashionAgent`, `MultiAgentCoordinator`, and `WriterAgent`) reside in the `Co-creation-projects` directories, demonstrating how to assemble custom behaviors atop these four foundational types.

## Summary

- **SimpleAgent** provides direct conversational capability with optional tool calling for quick Q&A tasks.
- **ReflectionAgent** implements iterative self-critique and refinement loops, ideal for quality-sensitive content generation.
- **ReActAgent** combines reasoning and action in a single workflow, enabling dynamic multi-step tool usage.
- **PlanAndSolveAgent** separates strategic planning from execution, improving coherence in complex, multi-stage workflows.

## Frequently Asked Questions

### How do I choose between the agent types available in hello-agents?

Select **SimpleAgent** for straightforward conversations with minimal tool usage, **ReflectionAgent** when output quality requires multiple revision passes, **ReActAgent** for tasks requiring dynamic decision-making between reasoning steps and tool calls, and **PlanAndSolveAgent** when a structured plan should precede execution.

### Can I combine different hello-agents agent types in a single application?

Yes. Since all agents inherit from the common `Agent` base class in [`core/agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/core/agent.py), they share compatible interfaces. You can compose agents hierarchically—for example, using a `ReflectionAgent` to refine outputs generated by an embedded `SimpleAgent` instance.

### Where are the agent classes defined in the hello-agents repository?

The base `Agent` abstract class is located in [`Co-creation-projects/YYHDBL-HelloCodeAgentCli/core/agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/Co-creation-projects/YYHDBL-HelloCodeAgentCli/core/agent.py). Concrete implementations reside in the `agents/` subdirectory: [`simple_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/simple_agent.py), [`reflection_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/reflection_agent.py), [`react_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/react_agent.py), and [`plan_solve_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/plan_solve_agent.py).

### How do I access the conversation history in hello-agents?

All agent instances automatically record dialogue turns in their internal message history. Retrieve past messages by calling `agent.get_history()`, which returns the message objects defined in [`core/message.py`](https://github.com/datawhalechina/hello-agents/blob/main/core/message.py).