How do you evaluate Google ADK agents with promptfoo?
You evaluate a Google ADK Python agent with promptfoo by writing test cases that run the agent, then checking its traces, session behavior, tool calls, callbacks, plugins, artifacts and workflow-agent steps against expected results. promptfoo documents this approach for ADK Python agents, which gives a team repeatable evidence about how the agent behaves before release instead of relying on a few manual conversations. The evaluation runs on your own machine, and promptfoo talks directly with the model you configure, so the test traffic does not pass through a promptfoo-hosted service.
This work matters most to the platform and AI teams that build and ship the agent, and to the security reviewers who must sign off on it. Platform teams need to know whether a change to a prompt, a tool or a sub-agent altered behavior. Security reviewers need to see which tools the agent can call, how it handles session state and whether its callbacks and plugins run as designed. Both groups benefit from the same test suite, which can be rerun after each change. Before you start, confirm which ADK version and model provider your agent uses, and whether the agent exposes the trace data promptfoo needs.
The promptfoo Google ADK guide is the next read for setup details and examples. This page covers the evaluation approach and the decisions behind it: what each check is meant to prove, how the agent is connected to promptfoo, and what to plan for when the agent includes workflow agents. Treat the guide as the source for exact configuration, and confirm any version-specific behavior against the release you deploy.
How promptfoo connects to an ADK agent under test
The run starts in the promptfoo CLI or a CI job, which sends test cases to a Python provider that wraps the ADK agent. The agent calls its model and its tools, and the trace and session data it produces come back to promptfoo for assertions. Check the trust boundary: the model provider and any tool the agent can reach sit outside the test runner, so the agent's permissions and the data sent to the model must be reviewed before results are trusted. Results are written to promptfoo output files on the runner.
Test flow from promptfoo into an ADK agent, with the trust boundaries marked.
Which checks fit which ADK agent pattern
A single LLM agent with tools is the simplest shape to test. The model receives a request, chooses a tool, supplies arguments and turns the tool result into an answer. Most failures here show up at the boundary between the model and the tool, so the checks should look at both the final output and the call that produced it.
- Final output: Confirm the answer is correct and grounded in the tool result, not in the model's guesses.
- Tool selection: Check that the agent calls the expected tool for each request and does not call tools it should not use.
- Tool arguments: Verify the arguments match the user's intent, including identifiers, amounts and dates.
- Refusal paths: Include requests the agent should decline, and confirm no tool call happens.
- Evidence to keep: Store the trace showing each tool call, its arguments and its result, alongside the output.
Before you rely on a test, confirm in the promptfoo ADK guide how tool calls and their arguments are exposed to assertions in your version.
Callbacks and plugins run code around model and tool calls. They can modify requests, block actions, log data or change results. A test that only checks the final answer can miss a callback that silently altered an input or skipped a check, so this shape needs tests that observe what the hooks did.
- Callback effects: Confirm that a callback fires when expected and produces the change it is designed to make.
- Blocking behavior: Check that a guard blocks a disallowed tool call and that the agent handles the block gracefully.
- Modified inputs: Compare what the model received with what the user sent, where the trace makes that visible.
- Plugin ordering: Where several plugins run, test whether the order changes the outcome.
- Evidence to keep: Record the trace entries for each hook, along with the configuration version of the plugins under test.
Confirm which callback and plugin events the guide documents for your ADK version, because support for specific hooks can differ.
Session-based agents keep state across turns. The risk is not a single bad answer but a later turn that depends on something stored earlier, such as a user preference, a confirmed identity or a pending action. Tests need multi-turn scripts and checks on what persists between sessions.
- State across turns: Script conversations where a later answer depends on an earlier fact, and check that the agent uses it correctly.
- Session isolation: Confirm that one user's session data does not appear in another session.
- Context correction: Test whether a user can correct stored information and whether the correction replaces the old value.
- Resumption: Check behavior when a session is resumed after a gap.
- Evidence to keep: Save the full conversation transcript and session state snapshots at each checkpoint.
Identify with your team which session fields are authoritative before writing expectations, since the agent's stored state may differ from what the user believes.
Workflow agents coordinate sub-agents in a defined order, such as running steps in sequence, in parallel or in a loop. Correctness depends on the path, not only the result. A workflow can reach a plausible answer while skipping a required step, so the checks should confirm the order and the handoffs.
- Step order: Confirm each sub-agent runs in the sequence the design requires.
- Handoffs: Check that each step receives the output it needs from the previous step.
- Parallel branches: Test that parallel steps do not overwrite each other's results.
- Loop termination: Confirm loops stop under the intended conditions and cannot run indefinitely.
- Evidence to keep: Retain the trace that shows step sequence, timing and the data passed between steps.
Write the expected step order down as part of the design so the test has a reference that does not depend on the agent's own output.
Configuration choices and when each fits
This table compares the main configuration choices for evaluating a Google ADK agent with promptfoo: local runs versus CI, tracing on versus off, single-turn versus session tests, and direct tests versus red team scans. Read each row as a decision that changes what you see, how often it runs and what evidence it produces. Confirm the exact trace and session settings against the promptfoo Google ADK guide for your promptfoo version before standardizing on them.
| Option | What it changes | When it fits | Trade-off |
|---|---|---|---|
| Local CLI run | Evals run on your machine and talk directly with the model, so results stay in your local environment | Writing and debugging test cases while the agent is still changing | Results are not shared with the team unless you export them, and runs depend on each developer's setup |
| CI pipeline run | The same promptfoo configuration runs on each change in your pipeline, with results kept as pipeline output | Catching regressions in tool calls or agent behavior before a merge | Requires pipeline credentials for the model and agent, and longer runs add to pipeline time |
| Tracing on | The run records agent, tool and model steps so you can inspect how an answer was reached | Debugging failures and checking that the right tools were called in the right order | Traces can contain prompts, tool arguments and user data, so confirm retention and access rules first |
| Tracing off | Tests check only the final output and assertions on it | Fast smoke tests where only the answer matters | Failures are harder to diagnose and trace-based evidence is not produced |
| Single-turn tests | Each test sends one input and grades one response with a fresh agent state | Checking a single tool behavior, a grounded answer or a refusal | Misses problems that appear only after several turns or across sessions |
| Multi-turn session tests | Tests carry session state across turns so memory and context effects can be checked | Agents that keep state, ask follow-up questions or depend on earlier tool results | More setup and slower runs, and results are harder to reproduce if session state is not reset consistently |
| Direct agent tests | Your own assertions check expected behavior on defined inputs, including tool and callback checks | Verifying functional behavior, workflow agent routing and expected tool use | Covers only the cases you wrote, so it does not discover unknown attack paths |
| Red team scans | Generated adversarial inputs probe the agent for injection, authorization and data exposure failures | Testing agents with tools, sensitive data or external content before release | Generated probes consume model calls, and findings need review before they are treated as confirmed issues |
How to set up an ADK evaluation with promptfoo
This sequence takes a team from a clean machine to a first promptfoo run against a Google ADK Python agent, covering tool calls, session turns, tracing and a workflow-agent case. Each step ends with a check so the team knows whether to move on.
Confirm the Node.js runtime version
The engineer who will run evals checks that Node.js 22.22.0 or newer is installed on the workstation or CI runner, since the promptfoo npm release 0.124.1 requires that version or later. Run
node --versionin the same shell that will run promptfoo, because a different shell or container image often resolves to an older runtime. The step is done when the command prints v22.22.0 or a later version and the team has recorded the version in its setup notes.Install promptfoo and confirm the CLI
Install promptfoo globally or as a project dependency using the npm package, and pin the version so later runs produce comparable results. promptfoo is MIT licensed and runs locally, so evals execute on the machine that calls the model. The step is done when
promptfoo --versionreturns the pinned release andpromptfoo --helplists the eval and redteam commands.Prepare the Python environment for the agent
Create a virtual environment that contains the Google ADK package and the agent's own dependencies, then confirm the agent module imports without errors from the project root. The platform or agent owner usually does this step, because the environment must match what runs in production, including model credentials and any tool libraries. The step is done when a short Python command imports the root agent object and prints its name without raising an exception.
Point the provider at the ADK agent
Configure promptfoo to call the agent through a Python provider, which loads the agent module and passes each test prompt into it. Set the agent's session and user identifiers in the provider configuration so turns can be replayed in the same session. Confirm the provider path and function names against the promptfoo Google ADK guide before relying on them. The step is done when a single prompt sent with
promptfoo evalreturns a text response from the agent and no provider error appears in the output.Write first tests for a tool call and a session turn
Create a small YAML configuration with two tests: one prompt that should cause the agent to call a named tool, and a two-turn exchange in which the second turn depends on context from the first. Use assertions that check the tool was invoked and that the answer uses the earlier value. Keep the test data in version control so the expected behavior is reviewed like code. The step is done when the eval reports both tests with clear pass or fail results and the team can explain why each assertion passed.
Enable tracing and run the eval
Turn on tracing in the configuration so promptfoo records the agent's model calls, tool calls and callbacks for each test case. Run the full eval, then open the web viewer or the saved output to inspect the trace for the tool test. The trace is the evidence that the agent reached the tool through the expected path, not just that the final text looked right. The step is done when the team can open one trace and identify the tool call, its arguments and the response it returned.
Read results and add a workflow-agent case
Review the pass rate and failed assertions, then add one test for a workflow agent, such as a sequential or parallel step, to confirm that each sub-agent runs in the intended order. Check that the trace shows the sub-agents in sequence and that the final output reflects every step. Record which failures are agent defects and which are test defects before changing either. The step is done when the workflow test runs in the same eval, its trace shows each sub-agent, and the team has a short list of follow-up fixes.
Security and operational considerations
An ADK agent with real tools can act on systems, not only generate text, so every test run carries risk to credentials, data and live systems. The six cards below cover the decisions to settle before the first evaluation, and each one names the check to make.
Model provider credentials
Evaluations call the same model provider the agent uses, so the API key in the test environment can spend budget and expose prompts. Keep the key in a secret store or environment variable, never in the promptfoo config file committed to the repository. Use a dedicated key with a spending limit for test runs, and confirm which provider account, region and data terms apply to each evaluation.
Tool permissions during tests
A test run exercises the same tool functions the agent would call in production, including any that write files, send messages or change records. Give the test agent a scoped identity and only the tools each suite needs, and review which functions are registered before a red team scan. Any tool that can change state should point at a sandbox.
Personal and regulated test data
Test cases copied from real customer conversations, support tickets or records can carry personal, health or financial information into prompts, logs and reports. Use synthetic records for functional tests and mask any data taken from production. Confirm with your privacy and compliance owners which data categories may be sent to the model provider.
Storage of traces and session logs
ADK traces and session histories record prompts, tool arguments and tool results, which may include secrets or personal data the agent retrieved. Decide where these files are written, who can read them and how long they remain on disk. The self-hosted promptfoo app stores data in a local SQLite database that cannot be shared across replicas, so plan persistence and access control before using it for a team.
Running against production tools
Pointing a test agent at production APIs, mailboxes or databases turns an evaluation into live actions that cannot be undone. Use staging services, test accounts and read-only credentials wherever possible, and block outbound calls from the test environment to production hosts. Treat any red team scan as capable of triggering the tools the agent is allowed to call.
Retaining evidence for reviewers
Security reviewers and auditors will ask what was tested, with which configuration, and what the results were. Keep the promptfoo config, the version of the agent and ADK under test, the test data set and the result exports together, under a retention period your policy defines. Confirm the retention rules with your compliance lead before the first formal review.
Where promptfoo runs and what the self-hosted server adds
A local CLI run keeps the entire ADK evaluation on the tester's machine. promptfoo's documentation states that evals run on your machine and talk directly with the LLM, so the agent under test, its prompts, traces and tool responses stay with the person running the suite unless you choose to send them elsewhere. For an ADK agent this is the right starting point: you point the provider at the Python agent in your own environment, run the tests, and read the results locally. Before you move any run to a shared place, confirm which model endpoints your agent calls and whether trace data or session content from those calls is stored by any service you add, since the local run only controls what promptfoo itself does.
The self-hosted promptfoo app is an Express server that serves the web UI and API, and it can be deployed with Docker, Docker Compose or Kubernetes with Helm. That makes it a way to give a team a shared view of ADK eval results. The limits matter, though. Self-hosted promptfoo stores data in a local SQLite database that cannot be shared across replicas, and it has no RBAC, horizontal scaling, built-in authentication or SSO. The documentation does not recommend it for production use. Plan for a single instance with persistent storage, put access control in front of it with your own identity layer, and treat it as a team reporting tool rather than a governed platform.
If your team needs shared access controls, SSO and role-based permissions for ADK evaluation results, look at the promptfoo Enterprise and On-Premise editions as options to evaluate. Enterprise adds team sharing, teams-based access control, SSO and custom roles, and On-Premise runs that functionality on your own infrastructure with complete data isolation. Ask the vendor to confirm which of these features apply to your deployment, how the On-Premise deployment is supported, and what the commercial terms are in writing. Compare that against the effort of running a multi-instance setup yourself before you decide.
Limits and what to confirm in your environment
The promptfoo Google ADK guide gives a starting point, but several behaviors depend on your agent, your ADK version and your infrastructure. The cards below list the items to confirm before you treat an ADK eval suite as evidence, so the results reflect the system you actually run.
Confirm ADK version and provider wiring
Check the ADK version your agent pins and the Python provider wiring against the current promptfoo Google ADK guide before copying any example. A provider that loads your agent differently from production can pass tests that would fail in the deployed runner. Record the versions used for each run so a later result can be reproduced.
ADK guideConfirm available trace fields
Trace assertions only work on fields your agent actually emits. Confirm which events, tool calls, model requests and session identifiers appear in the trace for your agent configuration, and whether they are present under your logging settings. Missing fields can make an assertion pass silently or fail for reasons unrelated to agent behavior.
Confirm tool mocking or live calls
Decide whether each tool in a test runs against a mock or a live backend, and write that choice down per test. Live calls exercise real authorization and data paths but add cost, side effects and variability. Mocks are repeatable but can hide permission failures that only appear with real services. Confirm which tools any security test touches live.
Confirm model costs and rate limits
Each eval case and red team probe calls a model, so cost and throughput depend on your provider contract, not on promptfoo. Ask your provider for current pricing and rate limits for the models your agent uses, and size suites against them. Set retry and concurrency settings so a rate-limited run is reported as a failure you can investigate, not a false pass.
Confirm session storage backend
ADK agents keep session state in a storage backend that you choose or configure. Confirm which backend the agent uses in each environment, and whether tests reset or isolate sessions between cases. If test runs share a session store with other workloads, state from one case can leak into another and distort results.
Confirm workflow checks match orchestration
Workflow-agent checks assume a particular orchestration pattern, such as sequential, parallel or loop composition. Confirm that the checks you write match how your workflow actually routes control and passes state between sub-agents. A check written for one pattern can pass on a workflow that has quietly changed its structure, so review these tests whenever the agent graph changes.
Questions teams ask before testing ADK agents
What does it cost to test a Google ADK agent with promptfoo?
The cost has four parts: engineer time, model usage, infrastructure and any outside help. promptfoo's Community edition is free, so the software itself adds no license fee, but every eval and red team run sends requests to a model, and those requests are billed by your model provider. Engineering time is the largest item. It covers wiring the agent into promptfoo, writing assertions for tracing, sessions, tools and callbacks, and reviewing failures. Setup is one-time work, while CI runs, model tokens and suite maintenance recur. Costs rise with the number of agents, tools, workflow agents, sessions per test, LLM-as-a-judge grading and the size of red team scans. When you request a quote from a partner, ask for the fixed scope, the deliverables, the assumptions about your environment and what is excluded, including retesting and retainer support.
How long does a first ADK test suite take to build?
The time depends on how much of the agent is already testable, so ask for an estimate tied to a written scope rather than a generic duration. The main drivers are the number of agents and sub-agents, how many tools and callbacks need checks, whether the workflow agents (sequential, parallel or loop) have defined expected paths, and whether the team already has a stable way to invoke the agent from a script. Each external tool that has side effects needs a mock or a sandbox, which adds work. Test data is another driver: if expected answers and approved behavior already exist, drafting cases goes quickly; if owners must be found and interviewed, scheduling dominates. Teams new to promptfoo usually spend extra time on YAML structure and provider configuration. A first suite is normally scoped to one or two agents so the pattern can be reviewed before it is copied across the rest.
What does the work need from our team?
Three things are needed before any test is written. First, access to the agent code, including the Python package, its dependencies, configuration files and the entry point used to start a session. Second, model API keys for a test environment, with spending limits set, because evals call the model directly and graders may call a second model. Third, named owners for test data and expected behavior. These people decide what a correct answer looks like, which tools a user may call, and which data an agent may return. Teams also need a reviewer who can read failing traces and decide whether a failure is a defect or a bad test. If tests run in CI, the team must provide repository and pipeline access. For tools that change records or send messages, the team should supply sandbox credentials so tests never touch production systems. Confirm each of these items in the first planning session, because missing access is the most common cause of delay.
Can an internal team build an ADK test suite on its own?
Yes, an internal team can build a suite on its own if it has Python developers who know the agent, comfort with YAML-based test configuration and someone who understands how the agent makes decisions. The promptfoo documentation for Google ADK covers tracing, sessions, tools, callbacks, plugins, artifacts and workflow agents, so the skills gap is mostly in tool mocking, trace assertions and interpreting results. The harder part is ongoing ownership. Models change, agent prompts evolve and new tools appear, so the suite needs maintenance after the first build. A practical approach is to pilot one agent internally, then decide whether to extend the work across the rest. Bring in outside help when the agent handles regulated data, when the security team needs evidence for a review, or when the team lacks time to read red team findings. Ask any partner to separate what they build from what your team must keep running.
Is promptfoo free to use for testing ADK agents?
The promptfoo software is licensed under the MIT license, and its Community edition is free. According to the promptfoo pricing page, the Community edition includes all LLM evaluation features, all model providers and integrations, and red teaming with 10k probes per month, with community support. This covers testing ADK agents through the CLI, library or CI pipelines. Paid tiers are different. promptfoo Enterprise adds team sharing, teams-based access control and SSO, custom roles, continuous monitoring and priority support with SLAs, at custom pricing. promptfoo On-Premise runs the Enterprise functionality inside your infrastructure with a dedicated deployment engineer. Remember that free software does not make testing free, because model calls, grader calls and engineering time still cost money. Check the current pricing page and your license terms before you decide which edition fits your team.
Which ADK features can promptfoo tests cover?
According to the promptfoo guide for evaluating Google ADK, its checks cover Python ADK agents across tracing, sessions, tools, callbacks, plugins, artifacts and workflow-agent behavior. Tracing lets you assert on the sequence of model and tool calls, which is useful when an answer looks correct but the agent reached it through an unexpected path. Session checks confirm that context carries across turns and that one user's state does not leak into another's. Tool checks verify arguments, permissions and results, while callback checks confirm that hooks run in the order your design expects. Workflow-agent checks test whether sequential, parallel or loop structures produce the intended outputs. Artifact checks confirm that generated files are saved and read correctly. Before you commit, confirm with the guide which checks your ADK version supports and which need custom Python providers in your setup.
What does a partner deliver for ADK agent evaluation?
A partner delivers the work described in the written scope, which is agreed before any work starts. For ADK agents, a typical scope lists the agents covered, the test plan, the promptfoo configuration and provider wiring, the assertions for tracing, sessions, tools, callbacks and workflow agents, and the test data and mocks used. Where red teaming is in scope, the scope also names the attack categories, the scan size and how results are graded. Deliverables usually include the runnable suite, a short operating guide for your team, a findings report with recommended fixes and a retest after fixes are made. DeployOpen plans, implements, integrates and documents work inside your own infrastructure, and it runs security testing for AI agents. It does not issue audit reports or certifications. Ongoing suite upkeep, upgrades and continuous testing can be covered by a retainer.
How DeployOpen works on this
DeployOpen plans and delivers promptfoo evaluations for Google ADK Python agents inside your own infrastructure, starting from a written scope. We set up tracing, sessions, tool and callback checks and workflow-agent tests, then document and hand them over so your team can run them.
How we scope
- Agree in writing which ADK agents, tools, callbacks and workflow agents are in scope
- Confirm where the agent runs and which model providers and data sources it calls
- Define pass criteria and evidence your security or compliance reviewers expect from the results
How we build
- Wrap the ADK agent as a promptfoo provider and connect tracing and session handling
- Write tests for tool calls, callback behavior and workflow-agent steps against your agreed criteria
- Run promptfoo red team checks against the agent and record findings with reproducible inputs
How we hand over
- Deliver the eval configuration, test data and run instructions as versioned project files
- Document how each test maps to the agreed scope and how to read traces and results
- Walk your engineers through running the suite locally and in your pipeline
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed before work starts
- Ongoing support, upgrades and continuous testing are available as a retainer
- Retesting after fixes is included in the written scope, so changes to agents are re-checked

