Upgrade to a two-tool ReAct agent with human approvals

Overview: what you’re building

You’re going to build a small ReAct-style agent in Python that:

  • Knows about multiple tools via a simple registry
  • Lets the model choose tools dynamically from its own text output
  • Keeps an action / observation history so the model can reason over past steps
  • Asks a human y/n approval before using a risky tool
  • Produces a final summarized answer after it’s done using tools

We’ll assume you’re using an LLM that you can call via a function call_model(prompt: str) -> str. You can adapt this to OpenAI, Anthropic, local models, etc.

At the end you should have something like agent_two_tools_human_gate.py that you can run, type a question into, and watch it think, call tools, ask your permission, and then summarize.

1 / 6