Skip to main content
A conversation scenario describes a goal instead of scripting every user turn. An ADK user simulator sends the fixed first prompt, generates follow-up messages from the plan, and stops when the task is complete or the turn limit is reached. Text scenarios work with ADK and LangGraph. Audio simulation and liveModelConfig are ADK-only.

Author a conversation scenario

evals/city-facts-simulation.evalset.json
Write the plan as observable user intent. Include completion conditions, allowed follow-ups, and actions the simulator must avoid. The simulator receives conversation history on each turn.

Configure text simulation

evals/test_config.json
A custom instruction template must contain {{ stop_signal }}, {{ conversation_plan }}, and {{ conversation_history }}. Include {{ persona }} if the scenario uses a user persona. Harnest validates this through ADK before running the eval. Model precedence is an explicit userSimulatorConfig.model, then OPENAI_MODEL, then gpt-4.1-mini. For example, add "model": "openai/my-simulator-model" to request another model without changing the agent’s model. Text simulators reuse a compatible agent model transport when available; otherwise they use the provider’s normal configuration, including OPENAI_BASE_URL and OPENAI_API_KEY for OpenAI-compatible models. A native provider model ID requires that provider’s credentials. Harnest also supplies the shared default for scenario suites that omit the entire userSimulatorConfig block. per_turn_user_simulator_quality_v1 is optional, but it is the metric designed to verify that generated user messages followed the scenario. Its stopSignal should match the simulator stop signal; </finished> is the shared default.
Set a finite maxAllowedInvocations. ADK accepts -1 for no limit, but an agent and simulator can otherwise continue indefinitely and spend unbounded model capacity.

Configure audio simulation

ADK 2.8 also exposes the llm_audio simulator. It first generates a text turn, then synthesizes audio through audioModel.
evals/test_config.json
cloud_tts uses Application Default Credentials. GOOGLE_CLOUD_PROJECT is used as its quota project when present. If you select a native model such as a Gemini TTS model, provide that model provider’s credentials and set its response modalities to audio.
Harnest passes audio simulation through to native ADK evaluation. LangGraph evaluation rejects the resulting non-text user content even when includeTextWithAudio is true, so it cannot silently score a text-only projection of an audio test.

Select ADK live inference

liveModelConfig changes the inference path used for the agent under test. Use it for an ADK agent configured with a bidirectional live model.
evals/test_config.json
timeoutSeconds is the wait limit for live model turn completion and defaults to 300.
LangGraph --evals rejects any non-null liveModelConfig. Use text evals for portable behavior and an opted-in smoke test for LangGraph bidirectional media.

Configure models and services

Simulation can involve three independently authenticated components. They all inherit the environment of the Harnest command: These calls are live and may consume paid capacity. Follow the shared model credential process: export credentials before local or CI commands, and use spec.secrets only as a deployment mapping. Harnest does not load .env files. Never place credentials in eval JSON. The OpenAI-compatible key does not authenticate Cloud TTS or native Google evaluation services.