English 繁體中文 简体中文

How does an AI agent answer with no tools (ReAct, version 2, reason only)?

Howard Pong Yuen Lam · AI Notes · November 9, 2026 · 3 min read

The previous note built an agent that thinks, acts and observes. This note removes two of the three steps. No action, no observation — the model can only think, in the style known as chain-of-thought, and then answer from its own memory. Nothing it says is checked against the real world. The question it faces is deliberately awkward: “When did Mark launch Muse?”

The script

This is ReAct02.py as it stands:

# "Reason only" (Chain-of-Thought): NO tool and NO loop.
# The model can only THINK step by step and answer from its own memory.
# Nothing is checked against the real world, so the answer may be wrong (hallucination).
# Compare the result with react03.py (Reason + Act), which searches the web with Tavily.
import os
from openai import OpenAI
from dotenv import load_dotenv
load_dotenv()

client = OpenAI(
    api_key=os.environ.get('DEEPSEEK_API_KEY'),
    base_url="https://api.deepseek.com")

def ask(prompt):
    """Send one prompt to the model and return its text reply."""
    response = client.chat.completions.create(
        model="deepseek-flash",
        messages=[{"role": "user", "content": prompt}],
    )
    return response.choices[0].message.content

task = ("When did Mark launch Muse")

# ---- THINK only (Reasoning) — no Action, no Observation ----
prompt = f"""Task: {task}
You have NO tools. Think step-by-step using only what you already know,
then end with one line: Answer: <your answer>"""
reply = ask(prompt)
print("=== Thought (reasoning trace, no tools) ===")
print(reply)

What each part does

One real run

=== Thought (reasoning trace, no tools) ===
Mark Zuckerberg launched Muse? I don't have knowledge of Mark launching something called Muse. There is a band Muse, but not launched by Mark. Perhaps you mean Meta's AI model? I'm not aware.

Answer: I don't know.

Two things are worth noticing. First, the reasoning is genuinely useful: the model spots the ambiguity (“There is a band Muse, but not launched by Mark”) instead of pretending the question is clear. Second, the final answer is honest — this time. Nothing in the program forces honesty. Ask a question that sounds more ordinary, and the same memory-only reasoning can produce a confident, fluent, wrong answer: a hallucination. There is no observation step to catch it.

Running it on your own computer

Download the demo program (Folder-AI-ReAct02.zip). The zip holds three files: ReAct02.py (the script above), pyproject.toml (the package list) and README.md.

  1. Open the folder in Visual Studio Code.
  2. Create a file named .env in the folder with one line:
    DEEPSEEK_API_KEY=your-key-here
    Get a key from the DeepSeek console; new accounts come with trial credit.
  3. In the Terminal, run:
    uv sync
    uv run ReAct02.py
    uv sync is needed only the first time; it reads pyproject.toml and installs openai and python-dotenv into the project.

Try changing the task to a question with a well-known answer, and then to one about a small local company. The contrast between the two runs is the lesson.

Why this experiment matters

Further reading