FruxonDocs
ApiAgentdraft

Streams the draft's current head as Server-Sent Events — the studio's streaming "Test" action.

Streams a test of the current draft using Server-Sent Events. Requires the same If-Match draft-version assertion as the synchronous draft test. Events include text, tool_call, tool_result, step_trace and done/error.

POST
/v1/tenants/{tenant}/agents/{agent}/revisions/{revision}/draft:streamTest
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

agent*string

The unique identifier of the agent.

revision*string

The base revision the draft forks from.

tenant*string

The tenant identifier

The execution parameters and inputs for the test run.

parameters?

Key-value parameters to pass to the agent

attachments?

File attachments for the execution. Each entry references a file already uploaded through POST /storage; they are attached to the run's user turn, so a vision-capable model receives the images directly and every file stays addressable by its <fileType:fileId/> link. Maximum 20.

sessionId?string|null

Optional session ID for conversation continuity

mode?string

Integration-config variant this execution resolves against. Honoured on the draft-test endpoints; :execute / :stream run a deployed revision and always resolve Production configs, so the value is ignored there.

Value in"UNSPECIFIED" | "PRODUCTION" | "SANDBOX"
environmentSlug?string|null

Optional environment slug for per-end-customer cost tracking and analytics. Auto-creates the environment on first use (subject to the per-tenant environment cap).

Lengthlength <= 64
sandboxRouting?|null

How to route a connection the agent uses during this test, by connection id: SIMULATED, READ_THROUGH, or NONE — shown as Live, which reaches the connection with its production credentials. Honoured on the draft-test endpoints only, and it makes the test a sandbox run. A sandbox test simulates every connection left out that has no sandbox saved; nothing is saved on the connection.

replyStyle?

The reply style to test with instead of the agent's active one: {"version": 3} for a particular version (a draft under review, say), or {"off": true} for none — send the same message both ways to compare. Honoured on the draft-test endpoints only; a deployed run always gets the active reply style.

[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/agents/string/revisions/string/draft:streamTest" \  -H "Content-Type: application/json" \  -d '{}'
"string"
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}