Skip to content

Validate, sandbox, and publish

The runtime validator refuses what will not run; the sandbox actually executes the draft; publish promotes the version that goes live.

Updated on Aug 10, 2026

Between creating and going to production there are three steps — all over the API:

  1. Validate: the workflow is checked by the runtime itself (graph, fields of each node, models in the catalogue).
  2. Sandbox: the draft actually runs, with "version": "draft" on /run — without touching the published version.
  3. Publish: the valid draft becomes the version that /run, the widget, and A2A serve.

Validate without saving

POSThttps://agents.hinow.ai/v1/agents/validateBearer hi_YOUR_API_KEY

Validates a standalone workflow (dry run). Nothing is created or changed — ideal for CI, or for validating while the user edits.

Parâmetros

  • workflowobject· bodyobrigatório

    The `{nodes, edges}` graph to validate.

Respostas

200The report — even when invalid (the response is 200; the verdict is in `valid`).
{
  "valid": false,
  "errors": [
    {"code": "missing_start", "message": "workflow needs exactly one 'start' node"},
    {"code": "unknown_model", "message": "model 'gpt-4-fake' not found in the catalog (see GET https://api.hinow.ai/v1/models)"}
  ],
  "warnings": [
    {"code": "missing_end", "message": "no 'end' node: the run finishes at the first node without outgoing edges"}
  ]
}

Errors prevent saving and publishing; warnings do not block — they point at behaviour that is probably unintended (an unreachable node, a tool with no slot, an if with no false branch). Each item carries a stable code, the message and, where it makes sense, the node_id.

Some error codesCause
missing_start / multiple_startThe flow needs exactly one start node.
unknown_node_typeA node type the runtime does not know — the full list is in Builder cards.
edge_source_missing / edge_target_missingAn edge pointing at an id that does not exist in nodes.
tool_needs_slot / flow_into_toolA tool wired as if it were flow — it connects to the agent's targetHandle: "slot-N".
if_no_condition / while_no_conditionA control node without the condition that drives it.
participants_missingDebate/voting/sequential with no participants (static, dynamic, or connected).
unknown_modelA model slug outside the catalogue — check it at GET https://api.hinow.ai/v1/models.

Sandbox: running the draft

The same /run as always, with one extra field. The draft runs for real — same tools, same events, normal billing per inference — but the published version stays untouched, serving production.

curl -X POST https://agents.hinow.ai/v1/agents/SEU_AGENT_ID/run \
  -H "Authorization: Bearer hi_SUA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "teste do rascunho", "version": "draft", "stream": false}'

The sandbox validates the draft on the spot: if it was broken afterwards (by editing in the builder, for instance), /run with version: "draft" answers 422 with the report — instead of executing something that would fail halfway.

Publish

POSThttps://agents.hinow.ai/v1/agents/{agent_id}/publishBearer hi_YOUR_API_KEY

Revalidates the draft and promotes it to the published version. The switch is atomic: runs in progress finish on the old version; the next ones pick up the new one.

Parâmetros

  • agent_iduuid· pathobrigatório

    The agent to publish.

Respostas

200Published — `published_version` increments on every publish.
{
  "agent": {
    "id": "ddfe14bd-4bfb-4d6a-83a0-4e907278ad10",
    "name": "Pesquisador Web",
    "status": "published",
    "published_version": 2,
    "published_at": "2026-08-10T10:24:13Z",
    "has_unpublished_changes": false
  }
}
400The agent has no draft workflow to publish.
422The draft does not pass the validator — the body carries the report. Nothing changes live.

Once published, the draft stays free: edit at will (has_unpublished_changes turns true), test in the sandbox, and publish again when it is ready. Production only changes on publish.

Was this page helpful?