Skip to content

Update ADK doc according to issue #1256 - 1 - Agent Simulator - #1257

Closed
adk-bot wants to merge 1 commit into
mainfrom
agent-changes-20260206-190441
Closed

Update ADK doc according to issue #1256 - 1 - Agent Simulator#1257
adk-bot wants to merge 1 commit into
mainfrom
agent-changes-20260206-190441

Conversation

@adk-bot

@adk-bot adk-bot commented Feb 6, 2026

Copy link
Copy Markdown
Collaborator

1. Summary of the change

Doc file: docs/evaluate/agent-simulator.md

Current state:

File does not exist.

Proposed Change:

Create a new documentation page for the Agent Simulator.

Content outline:

Agent Simulator

The Agent Simulator allows you to simulate and test agent behaviors by mocking tool outputs and injecting faults (latency, errors) without invoking real tools.

Key Features

  • Tool Mocking: Define mock strategies (Tool Spec or Tracing) to generate tool responses.
  • Fault Injection: Inject latency, errors, or custom responses with defined probabilities.
  • Connection Analysis: Automatically analyze tool connections using an LLM.

Automatic Connection Analysis

The Agent Simulator uses an LLM to analyze the schemas of your tools and identify "stateful parameters" (e.g., IDs created by one tool and used by another). This allows the simulator to maintain a consistent state across tool calls.

  • Creating Tools: Tools that generate new resources (e.g., create_ticket) will have their output captured.
  • Consuming Tools: Tools that operate on resources (e.g., get_ticket) will be validated against the captured state.

Configuration

Explain AgentSimulatorConfig, ToolSimulationConfig, and InjectionConfig.

Example Configuration

from google.adk.tools.agent_simulator.agent_simulator_config import AgentSimulatorConfig, ToolSimulationConfig, InjectionConfig, MockStrategy

config = AgentSimulatorConfig(
    tool_simulation_configs=[
        ToolSimulationConfig(
            tool_name="my_tool",
            injection_configs=[
                InjectionConfig(
                    injection_probability=0.5,
                    injected_error=InjectedError(
                        injected_http_error_code=500,
                        error_message="Internal Server Error"
                    )
                )
            ],
            mock_strategy_type=MockStrategy.MOCK_STRATEGY_TOOL_SPEC
        )
    ]
)

Usage

Explain how to use it as a Plugin or Callback.

Using as a Plugin

from google.adk.tools.agent_simulator.agent_simulator_factory import AgentSimulatorFactory

plugin = AgentSimulatorFactory.create_plugin(config)
runner = InMemoryRunner(agent=agent, plugins=[plugin])

Reasoning:
The v1.24.1 release introduces the Agent Simulator, a major new feature for testing and simulation. A new documentation page is required to explain its configuration, usage, and features like automatic connection analysis and stateful simulation.

Reference: src/google/adk/tools/agent_simulator/agent_simulator_engine.py

@joefernandez joefernandez changed the title Update ADK doc according to issue #1256 - 1 Update ADK doc according to issue #1256 - 1 - Agent Simulator Feb 11, 2026
@joefernandez

Copy link
Copy Markdown
Collaborator

recommend adding this to /adk-docs/docs/integrations/ directory (not /eval), and linking to it from the main Eval page

@jcwriter74

Copy link
Copy Markdown
Contributor
## Using as a Callback
To use the Agent Simulator as a callback, create a callback function using `AgentSimulatorFactory.create_callback(config)`. This can be used as a `before_tool_callback` or `after_tool_callback`.

```python
from google.adk.tools.agent_simulator.agent_simulator_factory import AgentSimulatorFactory

callback = AgentSimulatorFactory.create_callback(config)
# Use the callback in your tool setup

@jcwriter74

Copy link
Copy Markdown
Contributor

recommend adding this to /adk-docs/docs/integrations/ directory (not /eval), and linking to it from the main Eval page

@joefernandez what Eval page? would it be creating a new md in /adk-docs/docs/integrations/ ?

@jcwriter74 jcwriter74 self-assigned this Jun 16, 2026
@jcwriter74

Copy link
Copy Markdown
Contributor

recommend adding this to /adk-docs/docs/integrations/ directory (not /eval), and linking to it from the main Eval page

  • Already added to the /adk-docs/docs/integrations/ -[x]
  • Linking to it from the main Eval page -[]

@zyantw

zyantw commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Closing with: #2174

@zyantw zyantw closed this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants