Demo
REFERENCE

testzeus-agent-harness

AUTO-GENERATEDBUILD 2026.12.05

Adversarial testing of AI agents (Agent Harness) in TestZeus.

Category: core · Version: 1.0.0 · Requires: testzeus-auth

Triggers: agent harness, adversarial testing, red team agent, test my agent, adversarial pathway, simulate attack, agent simulation, jailbreak agent, generate pathways, run simulations, simulation report, agentforce agent, cancel simulation, cancel the simulation, stop the simulation, edit pathway, edit the pathway, update pathway, update the pathway, delete pathway, delete the pathway, remove pathway

Overview

The Agent Harness adversarially tests AI agents (Salesforce Agentforce agents). Bugsy runs the whole loop with its tools; at a terminal the same step is the CLI command after the slash.

  1. Find or create the agent. list_agent_harness_agents / testzeus agent-harness list-agents. For a new agent, list_agent_harness_profiles / list-profiles, then create_agent_harness_agent / generate-pathways with a directional prompt. Profiles come from a connected, profiled Salesforce org. If there are none, the user must connect the org in Integrations: Bugsy asks with ask_user (kind user_action) and continues once they say it is done.
  2. Pathways. list_agent_harness_pathways / list-pathways, get_agent_harness_pathway / get-pathway, generate_agent_harness_pathways / generate-more (more for an existing agent), update_agent_harness_pathway / update-pathway, delete_agent_harness_pathway / delete-pathway; list_agent_harness_generation_runs / generation-runs shows generation progress.
  3. Run. run_agent_harness_simulations / run with chosen pathway IDs, optionally as a Salesforce profile from list_agent_harness_run_as_profiles / sf-profiles; follow it with get_agent_harness_run_status / status; cancel_agent_harness_run / cancel stops it.
  4. Results. list_agent_harness_simulations / list-simulations, get_agent_harness_simulation / get-simulation (verdict, scores, transcript), list_agent_harness_reports / list-reports, get_agent_harness_report / get-report, compare_agent_harness_pathways / pathway-trends or pathway-history, and prepare_download (kind agent_harness_report) / download-report for a PDF, CSV, ZIP or CTRF file.

Availability in Bugsy

Only the Overview, Capabilities and Best Practices sections are injected into the active-skill prompt (SkillsEngine.parseSkillMarkdown). Every step above has a Bugsy tool. The Quick Reference and Commands sections below are for a human at a terminal and cover the same surface through the CLI.

Quick Reference

bash
# 1. Find the agent to test
testzeus agent-harness list-agents
testzeus agent-harness get-agent AGENT_ID

# 2. Generate adversarial pathways for a Salesforce agent profile
testzeus agent-harness generate-pathways AGENT_PROFILE \
  --prompt "Try to make the agent leak PII or bypass RBAC" \
  --num 10

# 3. Review generated pathways
testzeus agent-harness list-pathways AGENT_ID
testzeus agent-harness get-pathway PATHWAY_ID

# 4. Run adversarial simulations for chosen pathways
testzeus agent-harness run AGENT_ID \
  --pathway PATHWAY_ID_1 --pathway PATHWAY_ID_2 \
  --name "Nightly red-team" --wait

# 5. Monitor / inspect the run group
testzeus agent-harness status GROUP_ID
testzeus agent-harness list-simulations GROUP_ID
testzeus agent-harness get-simulation SIMULATION_ID

# Cancel a running group
testzeus agent-harness cancel GROUP_ID

Commands

Agents

bash
# List available agents
testzeus agent-harness list-agents \
  --page 1 --per-page 20 --status active --search "sales"

# Full detail for one agent
testzeus agent-harness get-agent AGENT_ID

Pathways

bash
# Start an AI pathway-generation job for a Salesforce agent profile
testzeus agent-harness generate-pathways AGENT_PROFILE \
  --prompt "Directional prompt for what to probe" \  # required
  --name "Generation job name" \
  --agent-name "Agent display name" \
  --num 10 \                # number of pathways to generate
  --allow-destructive       # allow destructive scenarios

# List / inspect / delete pathways
testzeus agent-harness list-pathways AGENT_ID --page 1 --per-page 20
testzeus agent-harness get-pathway PATHWAY_ID
testzeus agent-harness delete-pathway PATHWAY_ID   # soft-delete

Profiles, more pathways and edits

bash
testzeus agent-harness list-profiles --search "sales"
testzeus agent-harness sf-profiles CONNECTION_ID          # Run-as profiles (RBAC)
testzeus agent-harness generate-more AGENT_ID --prompt "..." --num 5
testzeus agent-harness generation-runs AGENT_ID
testzeus agent-harness update-pathway PATHWAY_ID --max-turns 8 --risk-level HIGH

Reports and comparison

bash
testzeus agent-harness list-reports --agent AGENT_ID
testzeus agent-harness get-report REPORT_ID
testzeus agent-harness download-report REPORT_ID --format pdf --output-dir out
testzeus agent-harness pathway-trends AGENT_ID
testzeus agent-harness pathway-history AGENT_ID PATHWAY_ID

Simulation runs

bash
# Run adversarial simulations for the given pathways
testzeus agent-harness run AGENT_ID \
  --pathway PATHWAY_ID \          # required, repeatable
  --name "Run name" \             # auto-generated if omitted
  --agent-name "Agent display name" \
  --run-as-profile PROFILE \      # Salesforce profile to run as (RBAC)
  --wait \                        # poll until the run finishes
  --timeout 900                   # max seconds to wait when --wait set

# Status / results of a run group
testzeus agent-harness status GROUP_ID

# List the simulations of a run group
testzeus agent-harness list-simulations GROUP_ID --page 1 --per-page 20

# Full detail for a single simulation
testzeus agent-harness get-simulation SIMULATION_ID

# Cancel a running simulation group
testzeus agent-harness cancel GROUP_ID

Best Practices

  1. Confirm the target agent with get_agent_harness_agent before acting on it — agent names repeat across profiles.
  2. Distinguish IDs by resource: agent tools take an agent ID; get_agent_harness_run_status, list_agent_harness_simulations and cancel_agent_harness_run take a run-group ID; create_agent_harness_agent takes an agent profile ID. Never pass one kind for another.
  3. Generation and runs are asynchronous. After starting one, say so, give the ID, and check progress with list_agent_harness_generation_runs or get_agent_harness_run_status; offer to run it in the background for long waits.
  4. Before a run, list the pathways and run the ones the user chose (all of them only when they said so). Mention destructive pathways before running them.
  5. Keep it to what was asked. Creating an agent needs only the profile ID (from list_agent_harness_profiles) and a directional prompt: one lookup, one create. Running needs the agent ID and pathway IDs. Look up run-as profiles only when the user asks to run as a specific Salesforce user or profile (RBAC); never as a prerequisite.
  6. For "check simulations for these agents", call list_agent_harness_agent_simulations with all agent IDs and the requested perAgent.
  7. Explain a failed simulation from get_agent_harness_simulation: the verdict, the weakest dimensions, and the turn where the agent went wrong.
  8. For regressions or "what changed", use compare_agent_harness_pathways; for a shareable summary, list_agent_harness_reports then prepare_download with kind agent_harness_report.
  9. Connecting an org or an agent needs credentials and is done by the user in the product. Use ask_user (kind user_action) with where to do it; never ask for secrets in chat.
  • testzeus user-integrations (CLI) - Salesforce / integration connections agents run against
  • testzeus-reports - Reporting on run outcomes