{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tale-dev/json-schema/tale-dev-project-agent-update-schema.json",
  "title": "ProjectAgentUpdate",
  "description": "The full configuration a `PUT` replaces — `ProjectAgentInput` plus the optional `expectedUpdatedAt` precondition.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tale-dev-agents-api-openapi.yml#/components/schemas/ProjectAgentUpdate",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "harness": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "A model id `GET /api/v1/models` lists for this organization — with `modelProvider`, the exact (provider, model) pair"
    },
    "modelProvider": {
      "type": "string",
      "maxLength": 200,
      "description": "The provider slug serving `model`, from `GET /api/v1/models`; omitted, any provider serving the id is accepted"
    },
    "skills": {
      "type": "array",
      "maxItems": 25,
      "items": {
        "type": "string"
      },
      "description": "Skill slugs the project can see (`GET /api/v1/skills`); an unknown slug is refused"
    },
    "connectors": {
      "type": "array",
      "maxItems": 25,
      "items": {
        "type": "string"
      },
      "description": "Connector slugs the organization has connected; an unknown or unconnected one is refused"
    },
    "tools": {
      "type": "array",
      "maxItems": 25,
      "items": {
        "type": "string",
        "enum": [
          "task_find",
          "task_get",
          "task_create",
          "task_comment",
          "task_update_status",
          "task_update_metadata",
          "task_review",
          "task_delegate_review",
          "task_start_agent",
          "task_upsert_by_external_ref",
          "document_find",
          "document_create",
          "knowledge_entry_find",
          "knowledge_entry_write",
          "contact_find",
          "product_find",
          "website_find"
        ]
      },
      "description": "Workspace tool grants, from the catalog above; omitted resets to none"
    },
    "secrets": {
      "maxItems": 25,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "instructions": {
      "type": "string",
      "maxLength": 20000
    },
    "expectedUpdatedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8640000000000000,
      "description": "The `updatedAt` last read; a save against an agent that changed since answers 409 `PROJECT_AGENT_STALE` and writes nothing. Omitted, the save is unconditional."
    }
  },
  "required": [
    "name",
    "harness",
    "model",
    "skills",
    "connectors"
  ],
  "additionalProperties": false
}