{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sandbase-ai/json-schema/sandbase-ai-agent-schema.json",
  "title": "Agent",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sandbase-ai-openapi.json#/components/schemas/Agent",
  "type": "object",
  "required": [
    "id",
    "object",
    "model",
    "name",
    "instructions",
    "tools",
    "text",
    "reasoning",
    "service_tier",
    "multi_agent",
    "visibility",
    "status",
    "version",
    "row_version",
    "projection_status",
    "runtime_profile",
    "description",
    "metadata",
    "mcp_connections",
    "skills",
    "created_at",
    "updated_at",
    "archived_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Agent ID (`agt_` prefix)."
    },
    "object": {
      "type": "string",
      "const": "agent"
    },
    "model": {
      "type": "string"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "instructions": {
      "type": [
        "string",
        "null"
      ]
    },
    "tools": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "text": {
      "$ref": "#/$defs/AgentText"
    },
    "reasoning": {
      "type": "object"
    },
    "service_tier": {
      "type": "string"
    },
    "multi_agent": {
      "type": "object",
      "description": "Always reports enabled false."
    },
    "visibility": {
      "type": "string",
      "enum": [
        "private",
        "public"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ]
    },
    "version": {
      "type": "integer",
      "description": "Current version number."
    },
    "row_version": {
      "type": "integer",
      "description": "Compare-and-set token for PATCH, archive, unarchive, and restore."
    },
    "projection_status": {
      "type": "string",
      "description": "Whether the current version is ready for execution. Sessions require ready."
    },
    "runtime_profile": {
      "type": "string",
      "enum": [
        "codex",
        "claude",
        "mcode"
      ]
    },
    "description": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "mcp_connections": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentMCPConnectionRef"
      }
    },
    "skills": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentSkillRef"
      }
    },
    "created_at": {
      "type": "integer",
      "description": "Unix seconds."
    },
    "updated_at": {
      "type": "integer",
      "description": "Unix seconds."
    },
    "archived_at": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Unix seconds."
    },
    "failure_code": {
      "type": "string"
    }
  },
  "$defs": {
    "AgentMCPConnectionRef": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "connection_id",
        "server_label"
      ],
      "properties": {
        "connection_id": {
          "type": "string",
          "description": "MCP connection ID (`mcp_` prefix), or builtin:sandbase for the built-in SandBase server."
        },
        "server_label": {
          "type": "string",
          "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$",
          "description": "Label unique within the Agent."
        },
        "allowed_tools": {
          "type": [
            "array",
            "null"
          ],
          "maxItems": 256,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "description": "null allows every tool; an empty array allows none."
        },
        "required": {
          "type": "boolean",
          "description": "Whether the Session must load this server."
        }
      }
    },
    "AgentSkillRef": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "skill_id"
      ],
      "properties": {
        "skill_id": {
          "type": "string",
          "description": "Skill ID (`skl_` prefix) owned by your organization or available from the public Skills catalog."
        },
        "version": {
          "type": [
            "string",
            "null"
          ],
          "description": "Pinned Skill version. For a new binding, null resolves the current default when the Agent is saved. For an existing binding, null retains its pinned version; pass an explicit version to upgrade."
        }
      }
    },
    "AgentText": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "format": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "text",
                "json_schema"
              ]
            },
            "schema": {
              "type": "object",
              "description": "Required for json_schema; its type must be object."
            }
          }
        },
        "verbosity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high"
          ]
        }
      }
    }
  }
}