FruxonDocs
ApiAgentdraft

Autosave the draft head.

Writes a new head for the draft, appending an immutable entry to its undo/redo history (an identical payload is a no-op). Creates the draft on first call. Pass the draft `Version` you last saw as `If-Match`; a mismatch returns 409, signalling a concurrent edit from another client — preserve the local edit and reconcile.

PUT
/v1/tenants/{tenant}/agents/{agent}/revisions/{revision}/draft
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 new draft head — the current authoring state.

comment?string|null

A comment describing what was changed or the purpose of this revision.

subAgents?|null

Sub-agents (reusable mini-workflows) referenced within the flow.

flow?

Represents a sequence of steps in a agent flow, supporting versioning and ordered execution.

A valid flow has exactly one ENTRY_POINT step and exactly one EXIT_POINT step in Steps — these are not synthesized for you. The other steps (AGENT, TOOL, CLAUDE_BOX) sit between them, wired by Edges.

integrationSlots?|null

Slots referencing published tenant integration configs. Each slot stores only identity plus a Fruxon.Model.Agents.AgentIntegrationSlot.TenantConfigId pointer; parameters/auth/sandbox/egress are owned by the tenant config and overlaid at plan-build time.

integrationBindings?|null

Agent-wide default slot per integration id. See Fruxon.Model.Agents.AgentRevision.IntegrationBindings.

assets?|null

Assets (uploaded files / knowledge sources) attached to the revision.

slots?|null

Named approver-role declarations for HITL gates in this revision. Validated at save time: every HumanApprovalConfig.SlotName reference must resolve to a slot in this list.

[key: string]?never

Response Body

curl -X PUT "https://api.fruxon.com/v1/tenants/string/agents/string/revisions/string/draft" \  -H "Content-Type: application/json" \  -d '{}'
{
  "agentId": "string",
  "baseRevision": 0,
  "version": 0,
  "historyCursor": 0,
  "canUndo": false,
  "canRedo": false,
  "updatedAt": 0,
  "headData": {
    "comment": "string",
    "subAgents": [
      {
        "id": "string",
        "slug": "string",
        "integrationId": "sub_agent",
        "agentId": "string",
        "displayName": "string",
        "description": "string",
        "toolType": "AGENT_TOOL",
        "actionType": "READ_ONLY",
        "resultType": "STRING",
        "authSettings": {
          "supportsOAuth": true,
          "oAuth": []
        },
        "flow": null,
        "parametersMetadata": [],
        "avatarFileId": "string"
      }
    ],
    "flow": {
      "steps": [],
      "edges": []
    },
    "integrationSlots": [
      {
        "id": "00000000-0000-0000-0000-000000000000",
        "integrationId": "string",
        "displayName": "string",
        "tenantConfigId": "00000000-0000-0000-0000-000000000000"
      }
    ],
    "integrationBindings": {},
    "assets": [
      {
        "id": "string"
      }
    ],
    "slots": [
      {
        "name": "string",
        "displayName": "string",
        "requiredKind": "UNSPECIFIED"
      }
    ]
  },
  "history": [
    {
      "seqNo": 0,
      "contentHash": "string",
      "pinned": false,
      "label": "string",
      "createdAt": 0
    }
  ]
}
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
}