{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/grepr/json-schema/grepr-agent-config-update-schema.json",
  "title": "AgentConfigUpdate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/grepr-agents-api-openapi.yml#/components/schemas/AgentConfigUpdate",
  "properties": {
    "agentMaxTokens": {
      "format": "int64",
      "minimum": 1,
      "type": "integer"
    },
    "automaticSignalMaxQueueAgeMinutes": {
      "format": "int32",
      "minimum": 1,
      "type": "integer"
    },
    "changeApprovalMode": {
      "enum": [
        "REQUIRE_APPROVAL",
        "AUTO_APPLY"
      ],
      "type": "string"
    },
    "concurrencyLimitPolicy": {
      "enum": [
        "QUEUE",
        "DISCARD"
      ],
      "type": "string"
    },
    "description": {
      "description": "What the agent handles, shown to other agents; required, like worksOnIssues, and empty for none.",
      "maxLength": 500,
      "minLength": 0,
      "type": "string"
    },
    "enabledMcpIntegrations": {
      "items": {
        "$ref": "#/$defs/AgentMcpIntegrations"
      },
      "type": "array"
    },
    "enabledSkills": {
      "items": {
        "type": "string"
      },
      "maxItems": 64,
      "minItems": 0,
      "type": "array"
    },
    "enabledTools": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "issueHandoffMode": {
      "description": "Whether the agent may put issues in Ready; required, like worksOnIssues.",
      "enum": [
        "REQUIRE_TRIAGE",
        "ALLOW_READY"
      ],
      "type": "string"
    },
    "issuePickup": {
      "$ref": "#/$defs/AgentIssuePickup"
    },
    "maxConcurrentInvestigations": {
      "format": "int32",
      "minimum": 1,
      "type": "integer"
    },
    "maxTokens": {
      "format": "int32",
      "maximum": 100000000,
      "minimum": 1,
      "type": "integer"
    },
    "maxTurns": {
      "format": "int32",
      "minimum": 1,
      "type": "integer"
    },
    "memoryConfiguration": {
      "$ref": "#/$defs/AgentMemoryConfiguration"
    },
    "modelConfiguration": {
      "$ref": "#/$defs/ModelConfiguration"
    },
    "name": {
      "type": "string"
    },
    "serviceAccountId": {
      "type": "string"
    },
    "systemPrompt": {
      "type": "string"
    },
    "version": {
      "format": "int32",
      "minimum": 0,
      "type": "integer"
    },
    "worksOnIssues": {
      "description": "Whether the agent files and works on issues; required, since an update replaces the agent and an omitted switch would turn issue work off unnoticed.",
      "type": "boolean"
    }
  },
  "required": [
    "changeApprovalMode",
    "description",
    "enabledMcpIntegrations",
    "enabledSkills",
    "enabledTools",
    "issueHandoffMode",
    "issuePickup",
    "modelConfiguration",
    "name",
    "serviceAccountId",
    "systemPrompt",
    "worksOnIssues"
  ],
  "type": "object",
  "$defs": {
    "AgentIssuePickup": {
      "description": "Whether an agent picks up Ready issues on its own, and which: the board's own filters, applied to Ready issues nobody is working on. The server checks the filters' limits and teams when the agent is saved.",
      "properties": {
        "enabled": {
          "description": "Whether the dispatcher starts the agent on Ready issues; it also needs Works on issues.",
          "type": "boolean"
        },
        "entities": {
          "additionalProperties": {
            "description": "Issues with every one of these entity keys, each with any of its values, as the issue search's entity filter; null or empty for any.",
            "items": {
              "description": "Issues with every one of these entity keys, each with any of its values, as the issue search's entity filter; null or empty for any.",
              "type": "string"
            },
            "type": "array"
          },
          "description": "Issues with every one of these entity keys, each with any of its values, as the issue search's entity filter; null or empty for any.",
          "type": "object"
        },
        "labels": {
          "description": "Issues carrying every one of these labels; null or empty for any.",
          "items": {
            "description": "Issues carrying every one of these labels; null or empty for any.",
            "type": "string"
          },
          "type": "array"
        },
        "maxRuns": {
          "description": "Pickup starts no run while the agent has this many runs on issues, queued or running, handed or picked up; people's handoffs aren't held to it, and pickups use the agent's run slots. Null for 1. At most the agent's concurrency limit, and below it when the agent discards work at its limit, so a slot stays free for alerts and handoffs.",
          "format": "int32",
          "minimum": 1,
          "type": "integer"
        },
        "priority": {
          "description": "`P0` to `P3`: issues of this priority or more urgent; null for any.",
          "pattern": "P[0-3]",
          "type": "string"
        },
        "teamIds": {
          "description": "Issues on any of these teams; null or empty for any the agent can reach.",
          "items": {
            "description": "Issues on any of these teams; null or empty for any the agent can reach.",
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "AgentMcpIntegrations": {
      "properties": {
        "allowedTools": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "integrationId": {
          "type": "string"
        }
      },
      "required": [
        "integrationId"
      ],
      "type": "object"
    },
    "AgentMemoryConfiguration": {
      "properties": {
        "digest": {
          "$ref": "#/$defs/AgentMemoryHistoryDigest"
        },
        "embeddingIntegrationId": {
          "type": "string"
        },
        "embeddingModel": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "policy": {
          "$ref": "#/$defs/AgentMemoryPolicy"
        },
        "searchTool": {
          "deprecated": true,
          "description": "Ignored: every agent can search memories.",
          "type": "boolean"
        },
        "signalTagMappings": {
          "additionalProperties": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "object"
          },
          "type": "object"
        },
        "vectorIndexIntegrationId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AgentMemoryHistoryDigest": {
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "maxItems": {
          "format": "int32",
          "maximum": 20,
          "minimum": 1,
          "type": "integer"
        },
        "windowDays": {
          "format": "int32",
          "maximum": 90,
          "minimum": 1,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "AgentMemoryPolicy": {
      "properties": {
        "guidance": {
          "maxLength": 2000,
          "minLength": 0,
          "type": "string"
        },
        "maxSearchesPerInvestigation": {
          "format": "int32",
          "maximum": 10,
          "minimum": 0,
          "type": "integer"
        },
        "recordPolicy": {
          "enum": [
            "ALWAYS",
            "NON_BENIGN_ONLY",
            "REUSABLE_ONLY"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "ModelConfiguration": {
      "properties": {
        "integrationId": {
          "type": "string"
        },
        "maxOutputTokens": {
          "format": "int32",
          "type": "integer"
        },
        "modelName": {
          "type": "string"
        },
        "provider": {
          "enum": [
            "ANTHROPIC",
            "GEMINI",
            "LITELLM"
          ],
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}