Skip to content

run

Generated reference page for spec/v1/schemas/resources/run.json.

Metadata

  • Type: JSON Schema
  • Source: spec/v1/schemas/resources/run.json
  • Raw: View Raw

Summary

Source

json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agent-service.spec/v1/schemas/resources/run.json",
  "$defs": {
    "ToolDescriptor": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "description"],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string",
          "minLength": 1
        },
        "parametersSchema": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "RunInput": {
      "type": "object",
      "additionalProperties": false,
      "required": ["messages", "tools"],
      "properties": {
        "messages": {
          "type": "array",
          "items": {
            "$ref": "./message-record.json#/$defs/TaskInputMessage"
          }
        },
        "tools": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ToolDescriptor"
          }
        }
      }
    },
    "Attempt": {
      "type": "object",
      "additionalProperties": false,
      "required": ["attemptId", "attemptNo", "status"],
      "properties": {
        "attemptId": {
          "$ref": "../common/identity.json#/$defs/attemptId"
        },
        "attemptNo": {
          "type": "integer",
          "minimum": 1
        },
        "status": {
          "$ref": "../common/enums.json#/$defs/taskStatus"
        },
        "runEnv": {
          "$ref": "../common/enums.json#/$defs/taskRunEnv"
        },
        "providerType": {
          "$ref": "../common/enums.json#/$defs/providerType"
        },
        "runSpaceId": {
          "$ref": "../common/identity.json#/$defs/opaqueId"
        },
        "sessionId": {
          "$ref": "../common/identity.json#/$defs/sessionId"
        },
        "startedAt": {
          "$ref": "../common/identity.json#/$defs/timestamp"
        },
        "finishedAt": {
          "$ref": "../common/identity.json#/$defs/timestamp"
        },
        "lastKeepAliveAt": {
          "$ref": "../common/identity.json#/$defs/timestamp"
        },
        "errorSummary": {
          "type": "string"
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "runId",
    "orgId",
    "resourceType",
    "resourceId",
    "threadId",
    "status",
    "input",
    "attempts",
    "eventSequence",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "runId": {
      "$ref": "../common/identity.json#/$defs/runId"
    },
    "orgId": {
      "$ref": "../common/identity.json#/$defs/orgId"
    },
    "resourceType": {
      "$ref": "../common/enums.json#/$defs/taskResourceType"
    },
    "resourceId": {
      "$ref": "../common/identity.json#/$defs/opaqueId"
    },
    "threadId": {
      "$ref": "../common/identity.json#/$defs/threadId"
    },
    "contextId": {
      "$ref": "../common/identity.json#/$defs/opaqueId"
    },
    "parentRunId": {
      "$ref": "../common/identity.json#/$defs/runId"
    },
    "status": {
      "$ref": "../common/enums.json#/$defs/taskStatus"
    },
    "input": {
      "$ref": "#/$defs/RunInput"
    },
    "actionInputs": {
      "type": "object",
      "additionalProperties": true
    },
    "executionProfileSnapshot": {
      "$ref": "../common/execution-profile.json#/$defs/ExecutionProfile"
    },
    "attempts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Attempt"
      }
    },
    "currentAttemptId": {
      "$ref": "../common/identity.json#/$defs/attemptId"
    },
    "eventSequence": {
      "$ref": "../common/identity.json#/$defs/sequence"
    },
    "version": {
      "$ref": "../common/identity.json#/$defs/version"
    },
    "webhook": {
      "$ref": "./webhook-subscription.json"
    },
    "createdAt": {
      "$ref": "../common/identity.json#/$defs/timestamp"
    },
    "updatedAt": {
      "$ref": "../common/identity.json#/$defs/timestamp"
    },
    "finishedAt": {
      "$ref": "../common/identity.json#/$defs/timestamp"
    },
    "statusMessage": {
      "type": "string"
    }
  }
}

Generated from spec source.