{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zeronoise-ai/json-schema/zeronoise-ai-agent-schema.json",
  "title": "Agent",
  "description": "Another organization's Agent is returned in a reader form without workspace_id, readiness, configuration, pending and rejected Source counts, or configuration and Chat links.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zeronoise-ai-openapi.yaml#/components/schemas/Agent",
  "type": "object",
  "required": [
    "id",
    "object",
    "organization_id",
    "lifecycle",
    "access_policy",
    "source_summary",
    "links"
  ],
  "properties": {
    "id": {
      "$ref": "#/$defs/OpaqueId"
    },
    "object": {
      "type": "string",
      "enum": [
        "agent"
      ]
    },
    "organization_id": {
      "$ref": "#/$defs/OpaqueId"
    },
    "workspace_id": {
      "allOf": [
        {
          "$ref": "#/$defs/OpaqueId"
        }
      ],
      "description": "Omitted for another organization's Agent."
    },
    "created_by": {
      "$ref": "#/$defs/ActorReference"
    },
    "configuration": {
      "$ref": "#/$defs/AgentConfiguration"
    },
    "configuration_etag": {
      "type": [
        "string",
        "null"
      ]
    },
    "access_policy": {
      "type": "string",
      "x-extensible-enum": [
        "private",
        "workspace",
        "anyone_with_link",
        "public"
      ]
    },
    "lifecycle": {
      "type": "string",
      "x-extensible-enum": [
        "draft",
        "inactive",
        "active",
        "paused"
      ]
    },
    "source_summary": {
      "$ref": "#/$defs/SourceSummary"
    },
    "readiness": {
      "type": "object",
      "description": "Omitted for another organization's Agent.",
      "required": [
        "finalization",
        "activation"
      ],
      "properties": {
        "finalization": {
          "$ref": "#/$defs/AgentReadiness"
        },
        "activation": {
          "$ref": "#/$defs/AgentReadiness"
        }
      }
    },
    "created_at": {
      "$ref": "#/$defs/Timestamp"
    },
    "updated_at": {
      "$ref": "#/$defs/Timestamp"
    },
    "links": {
      "$ref": "#/$defs/Links"
    }
  },
  "$defs": {
    "ActorReference": {
      "type": "object",
      "required": [
        "object",
        "id"
      ],
      "properties": {
        "object": {
          "type": "string",
          "x-extensible-enum": [
            "user",
            "service_account",
            "system"
          ]
        },
        "id": {
          "$ref": "#/$defs/OpaqueId"
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "AgentConfiguration": {
      "type": "object",
      "required": [
        "name",
        "description",
        "goal",
        "instructions",
        "discovery_instructions",
        "output",
        "tasks",
        "schedule",
        "transcription_mode",
        "briefing_preset",
        "evidence_capabilities"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 120
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 2000
        },
        "goal": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 4000
        },
        "instructions": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 16000
        },
        "discovery_instructions": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 16000,
          "description": "The Agent's standing source discovery instructions (\"Source discovery instructions\" in the web app). Discovery requests over the API pass their own."
        },
        "output": {
          "$ref": "#/$defs/AgentOutput"
        },
        "tasks": {
          "$ref": "#/$defs/AgentTasks"
        },
        "schedule": {
          "$ref": "#/$defs/AgentSchedule"
        },
        "transcription_mode": {
          "type": "string",
          "enum": [
            "budget",
            "premium"
          ],
          "default": "budget"
        },
        "briefing_preset": {
          "type": "string",
          "enum": [
            "economy",
            "standard",
            "advanced",
            "expert"
          ],
          "default": "standard"
        },
        "evidence_capabilities": {
          "$ref": "#/$defs/AgentEvidenceCapabilities"
        }
      }
    },
    "AgentEvidenceCapabilities": {
      "type": "object",
      "description": "Agent preferences for optional external evidence. Runtime availability may further narrow them.",
      "required": [
        "external_web",
        "image_analysis"
      ],
      "properties": {
        "external_web": {
          "type": "string",
          "enum": [
            "disabled",
            "on_demand"
          ]
        },
        "image_analysis": {
          "type": "string",
          "enum": [
            "disabled",
            "on_demand"
          ]
        }
      }
    },
    "AgentOutput": {
      "type": "object",
      "required": [
        "style",
        "language"
      ],
      "properties": {
        "style": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 4000
        },
        "language": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[a-z]{2}$"
        }
      }
    },
    "AgentReadiness": {
      "type": "object",
      "required": [
        "ready",
        "blockers"
      ],
      "properties": {
        "ready": {
          "type": "boolean"
        },
        "blockers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReadinessBlocker"
          }
        }
      }
    },
    "AgentSchedule": {
      "type": "object",
      "required": [
        "frequency",
        "time",
        "weekday",
        "timezone"
      ],
      "properties": {
        "frequency": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "daily",
            "weekly"
          ]
        },
        "time": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
        },
        "weekday": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ]
        },
        "timezone": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 255
        }
      }
    },
    "AgentTask": {
      "type": "object",
      "required": [
        "instructions"
      ],
      "properties": {
        "instructions": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 16000
        }
      }
    },
    "AgentTasks": {
      "type": "object",
      "required": [
        "extract_information",
        "generate_brief"
      ],
      "properties": {
        "extract_information": {
          "$ref": "#/$defs/AgentTask"
        },
        "generate_brief": {
          "$ref": "#/$defs/AgentTask"
        }
      }
    },
    "Link": {
      "type": "object",
      "required": [
        "href"
      ],
      "properties": {
        "href": {
          "type": "string"
        }
      }
    },
    "Links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Link"
      }
    },
    "OpaqueId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Opaque identifier; clients must not parse its format."
    },
    "ReadinessBlocker": {
      "type": "object",
      "required": [
        "code"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "path": {
          "type": [
            "string",
            "null"
          ]
        },
        "actual": {
          "type": [
            "integer",
            "null"
          ]
        },
        "minimum": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "SourceSummary": {
      "type": "object",
      "required": [
        "approved"
      ],
      "properties": {
        "approved": {
          "type": "integer",
          "minimum": 0
        },
        "pending": {
          "type": "integer",
          "minimum": 0,
          "description": "Omitted for another organization's Agent."
        },
        "rejected": {
          "type": "integer",
          "minimum": 0,
          "description": "Omitted for another organization's Agent."
        }
      }
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time"
    }
  }
}