Agent Playground
JSON editor
See and edit any Agent Playground flow as JSON right in the builder, with checks as you type, a list of every step's fields, and import and export.
Every flow is also a JSON document, and the builder can show it. Choose JSON in the builder's toolbar (on smaller screens, it's under More). The text and the canvas stay in step: draw on the canvas and the JSON changes, edit the JSON and the canvas changes.
This is the same document the Flows API takes and gives back. You can draw a flow, copy its JSON into your repository, and send it from CI. Or you can write a flow in code and paste it here to see it drawn.
{
"$schema": "https://api.quietrobot.ai/api/v1/flows/schema",
"name": "Fix until tests pass",
"graph": {
"start": "test",
"nodes": [
{ "id": "test", "label": "Run tests", "kind": "run", "cmd": "pytest -q" },
{ "id": "fix", "label": "Fix the code", "kind": "agent", "goal": "Make the failing tests pass." }
],
"edges": [
{ "from": "test", "to": "fix", "when": "fail" },
{ "from": "fix", "to": "test", "when": "pass" }
]
},
"guards": { "maxLoops": 3, "timeSec": 600, "budgetUsd": 1 }
}guards holds the flow's limits. Every field is listed under Fields in the editor and in Write a flow as JSON.
Edit as you type
Type into the editor. About half a second after you stop, a valid edit goes onto the canvas. It counts as one step you can undo, and it saves like any other change.
If the text isn't a valid flow yet, the editor says Not applied and why, and the canvas keeps what it had. When it can point at the problem, Go to line takes you there. Undo my edits here puts the text back to match the canvas.
The note under the editor shows where things stand:
| Note | What it means |
|---|---|
| In step with the canvas. | The text and the canvas show the same flow. |
| Not applied. | The text has a mistake. The canvas is unchanged. |
| The canvas changed while you were typing. | The flow changed on the canvas, maybe in another tab. Choose Show the canvas's JSON to carry on from the newer flow. |
| Read only while the flow runs. | Wait for the run to finish, or stop it, to edit again. |
Checks under the editor
After an edit lands, the flow is checked on our side, the same checks that Run and POST /flows/validate use. What they find is listed under the editor in three groups:
| Group | What's in it |
|---|---|
| Before it can run | Problems that would stop a run: a step with nothing to do, an arrow to a step that doesn't exist, a missing Claude key, or a limit your plan doesn't allow. |
| Will wait for a person | Steps that will pause for an approval: an Approval block, a step with Ask a person first, or a command your rules will hold. |
| Left out | Fields that aren't part of a flow, so they're ignored. Usually a typo, like comand for cmd. |
Each note has Go to, which jumps to its place in the text, and Show on canvas, which selects its step in the builder.
Fields
Choose Fields to see every field a step can have, grouped by step kind, with a line on what each one does. Every step has an id (arrows use it), a label the canvas shows, and its kind. The rest depends on the kind, like cmd for a command or goal for an agent.
The list comes from the flow's public JSON Schema, at https://api.quietrobot.ai/api/v1/flows/schema. Editors such as VS Code read the $schema line at the top of the document and give you the same completions and checks while you edit the file locally.
Import and export
- Copy JSON copies the whole flow,
$schemaline included. - Download .json saves it as a file named after the flow.
- Import JSON replaces the flow with JSON you paste or a
.jsonfile you choose, up to 1 MB. You'll be asked first, because the flow's steps, arrows and limits are all replaced. If the JSON isn't a valid flow, it says why and nothing changes.
An import can be undone like any other change. To keep a copy you can come back to later, save a version first under History.
From code
The same document works everywhere:
| Where | How |
|---|---|
| REST | POST /flows to save, POST /flows/validate to check, GET /flows/{id}/export to get it back. See Flows API. |
TypeScript, Python, qr | qr flows validate flow.json to check a file, qr flows update <id> flow.json to save it, and the same from the SDKs. See SDK and CLI. |
| AI apps | Ask Claude, ChatGPT or Cursor to write a flow, and it's checked the same way. See MCP tools. |