FruxonDocs
ApiAgentdraft

Executes the draft's current head — the studio's "Test" action.

The caller must flush any pending autosave first; the `If-Match` header asserts that the head about to run is the one the caller last saw, so a test can never execute a stale state.

POST
/v1/tenants/{tenant}/agents/{agent}/revisions/{revision}/draft:test
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?|null

Key-value parameters to pass to the agent

attachments?|null

File attachments for the execution

sessionId?string|null

Optional session ID for conversation continuity

mode?string

Selects which integration-config variant an execution uses. Sandbox falls back to production per-config when no sandbox variant is configured. Callers normally send PRODUCTION or SANDBOX; UNSPECIFIED is the zero value and exists only so the field can be omitted on the wire without misrepresenting the user's intent — the host DTO supplies the real default (typically PRODUCTION).

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
[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/agents/string/revisions/string/draft:test" \  -H "Content-Type: application/json" \  -d '{}'
{
  "response": "string",
  "trace": {
    "agentId": "string",
    "agentRevision": 0,
    "createdAt": 0,
    "parameters": {},
    "startTime": 0,
    "endTime": 0,
    "duration": 0,
    "traces": [
      {
        "id": "string",
        "displayName": "string",
        "type": "UNSPECIFIED",
        "llmStepTrace": null,
        "toolTrace": null,
        "hitlTrace": null,
        "steps": [],
        "result": null,
        "status": "UNSPECIFIED",
        "error": "string",
        "startTime": 0,
        "endTime": 0,
        "duration": 0
      }
    ],
    "result": {
      "strValue": "string",
      "jsonValue": null,
      "fileLink": "string"
    },
    "inputCost": 0,
    "outputCost": 0,
    "totalCost": 0
  },
  "sessionId": "string",
  "links": [
    {
      "fileId": "string",
      "fileType": "string",
      "displayName": "string",
      "promptLink": "<string:string/>"
    }
  ],
  "executionRecordId": "00000000-0000-0000-0000-000000000000",
  "status": "COMPLETED",
  "humanApprovalRequestId": "00000000-0000-0000-0000-000000000000",
  "messageBlocks": []
}
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
}