AI Cloud Architect

ToolSimulator: scalable tool testing for AI agents

AWSHow-to by Darren Wang, Smeet Dhakecha, Vinayak Arannil and Xuan QiAWS Artificial Intelligence Blog

You can use ToolSimulator, an LLM-powered tool simulation framework within Strands Evals, to thoroughly and safely test AI agents that rely on external tools, at scale. Instead of risking live API calls that expose personally identifiable information (PII), trigger unintended actions, or settling for static mocks that break with multi-turn workflows, you can use ToolSimulator’s large language model (LLM)-powered simulations to validate your agents. Available today as part of the Strands Evals…

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

ToolSimulator, part of the Strands Evals SDK, uses an LLM to simulate tool responses so agents can be tested without live API calls, with optional shared state and Pydantic output schemas.

Who it is for

Developers building Strands agents that call external tools and need repeatable tests without side effects or exposed PII.

Key points

  • Install with pip install strands-evals; Python 3.10 or later is required.
  • Tools are registered with a decorator; the real function body is never called during simulation.
  • share_state_id links tools to shared state so writes are visible to later reads.
  • output_schema enforces a Pydantic response structure.

Timeline

  1. Read firstEvaluating AI agents for production: A practical guide to Strands Evals · AWS · How-to
  2. This postToolSimulator: scalable tool testing for AI agents

Go deeper