Profiles and environment variables
The project profile for doctor and run accepts required project, optional engine, and optional automation. The latter accepts only target and test. Paths resolve relative to the profile and explicit CLI options take precedence. Unknown keys and empty strings are errors.
{
"project": "MyGame.uproject",
"automation": {
"target": "MyGameEditor",
"test": "MyGame.Smoke"
}
}| Environment variable | Purpose |
|---|---|
UEAGENT_ARTIFACTS | Root for runs and hygiene reports |
UEAGENT_RESERVE_GIB | Minimum free-space reserve, 2 GiB by default |
UEAGENT_TARGET_GIB | Free-space target used for preflight advisories |
See CLI reference and profile parsing.
Playtest Scenario
Scenario decouples input playback, business assertions, video capture, audio capture, and evidence export. All stages remain enabled by default for compatibility, and routine runs can disable unneeded stages:
- Fast PIE assertions (no
ueagentdevkit[media]or ViewportCapture required):ueagent scenario MyGame.uproject --profile Tools/UEAgent/playtest.json --no-record --no-evidence - Reuse an already-verified Monolith endpoint (skip redundant connection discovery): add
--endpoint http://127.0.0.1:<port>/mcp - Toggle individual stages:
--no-video(audio only),--no-audio(video only),--no-assertions(replay/record without assertion checks),--no-evidence(skip extra manifests and remove raw frames after verified MP4 export) - Optional boolean fields
"video","audio", and"evidence"are also supported in Scenario JSON; CLI flags take precedence.
When video capture is enabled, install ueagentdevkit[media], close the target editor, run ueagent setup --capture-project MyGame.uproject, and build its Editor target before the first recording.
ueagent scenario MyGame.uproject --profile Tools/UEAgent/playtest.json --no-record --no-evidence
ueagent scenario MyGame.uproject --profile Tools/UEAgent/playtest.json{
"version": 1,
"map": "/Game/Maps/Playtest",
"seconds": 8,
"min_fps": 12,
"steps": [
{"op": "down", "key": "W"},
{"op": "wait", "seconds": 1},
{"op": "up", "key": "W"},
{"op": "sample", "label": "walk"}
],
"assertions": [
{"sample": "walk", "field": "displacement_cm", "op": "gte", "value": 100}
]
}Omit map to use the current level. The command refuses existing PIE sessions and refuses to switch away from an unsaved level. It stops its own PIE session. When the run cold-started the editor, it asks that PID to exit afterwards and forces it after 30 seconds, recording the outcome under editor; an editor that was already open is always left running. Pass --keep-editor to keep a cold-started editor. Set ready_timeout to override the 45-second wait for a player pawn.
If UE reports an invalid Zen data path on cold launch, use --local-ddc <existing writable directory> to select a filesystem cache for that launch.
Steps support down, up, wait, sample, and axis. Supply an axis value from -1 to 1; MouseX, MouseY, and MouseWheelAxis take raw per-frame counts from -1000 to 1000. An optional hold_seconds (0–60) re-sends the value every frame for that long, then zeroes it, and counts towards the total time — use it to drag a mouse-driven camera. Pair each key press with a release. Assertions support eq, gte, and lte, and refer to after by default. Use before or a named sample to check another point. Fields include actor_class, coordinates cm, displacement_cm from the starting position, and game time seconds. For custom fields, name a local probe script beside the scenario and authorize it with --allow-project-probe. It runs in the editor and prints a JSON object on its last line. Its keys are available with the probe. prefix.
Exit 0 requires both the assertions and the recording to pass. The run collects gameplay.mp4, game.wav, events.jsonl, result.json, raw frames, and artifacts.json. Set allow_silence: true for a silent game. The result still reports audio RMS.