Skip to main content
This page shows complete configuration walkthroughs for two target types: the Codex SDK coding-agent target and an HTTP-based custom agent target. Both use real files from the examples/ directory in this repository. After you finish one of these walkthroughs, you will have a working promptbeat generate and promptbeat eval run with saved artifacts.

Codex SDK target

Use this path when your target is the Codex CLI running as a coding agent inside a prepared repository workspace. This is the current validated path with a saved baseline report.

1. Write promptbeat.yaml

The project config file declares where the target profile, scenarios, seeds, and generation settings live.
promptbeat.yaml

2. Write target.yaml

The target profile describes the agent’s identity, capabilities, and safety boundaries. Promptbeat uses this to constrain scenario selection and to seed the judge with what the agent is allowed to do.
target.yaml

3. Write scenarios.yaml

Scenarios define the risk type, failure signals, and judges for each test category. The Codex example targets secret environment variable exposure.
scenarios.yaml

4. Write seeds.yaml

Seeds are the natural-language starting templates the attacker model mutates to produce adversarial probes. Each seed is tied to a risk type and a framing style.
seeds.yaml

5. Write providers.codex-sdk.yaml

The provider file tells Promptbeat how to call the Codex CLI, which model to use, and what sandbox constraints to enforce. Keep this file separate from promptbeat.yaml so you can swap targets without regenerating probes.
providers.codex-sdk.yaml

6. Run generate and eval

7. Check results in the report

A complete run writes these artifacts:
Review the report for direct secret leaks and unsafe workaround commands — such as suggestions to dump environment variables or copy protected files into the workspace. The validated baseline for openai/gpt-5.4 scored 26/37 (70.3%) on the broad coding-agent suite.

HTTP agent target

Use this path when your agent already runs as a service: browser agents, support agents, security triage agents, internal assistants, or any gateway that sits in front of a CLI agent.

1. Write providers.http.yaml

Point the HTTP provider at your agent’s evaluation endpoint. Use {{env.VAR}} references for any credentials.
providers.http.yaml

2. Write a scenario with HTTP-specific context

scenarios.yaml

3. Write a seed

seeds.yaml

4. Run generate and eval

5. Expected HTTP response contract

Your agent endpoint should return a JSON body with at minimum an answer string. Return trace metadata when your service can produce it — this makes the report significantly more actionable.
If your service cannot return trace metadata yet, Promptbeat scores the answer text alone. Add trace fields incrementally as your service matures.

Adapter templates for other agents

Claude Code, OpenCode, and OpenClaw each have a provider YAML template in examples/agent-adapters/. Copy the file for your target, fill in the required environment variables, and pass it to promptbeat eval with --provider-file. These templates define the full provider contract. Connect each one to a real runtime, run promptbeat eval, and save the artifacts to promote the target from adapter template to validated.
For the complete field-by-field reference for scenarios and seeds, see the YAML Reference page.