{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/AgentFileAttachment",
  "title": "AgentFileAttachment",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Unique identifier of the file-agent relationship"
    },
    "file_id": {
      "type": "string",
      "title": "File Id",
      "description": "Unique identifier of the file"
    },
    "file_name": {
      "type": "string",
      "title": "File Name",
      "description": "Name of the file"
    },
    "folder_id": {
      "type": "string",
      "title": "Folder Id",
      "description": "Unique identifier of the folder/source"
    },
    "folder_name": {
      "type": "string",
      "title": "Folder Name",
      "description": "Name of the folder/source"
    },
    "is_open": {
      "type": "boolean",
      "title": "Is Open",
      "description": "Whether the file is currently open in the agent's context"
    },
    "last_accessed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Accessed At",
      "description": "Timestamp of last access by the agent"
    },
    "visible_content": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Visible Content",
      "description": "Portion of the file visible to the agent if open"
    },
    "start_line": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Line",
      "description": "Starting line number if file was opened with line range"
    },
    "end_line": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "End Line",
      "description": "Ending line number if file was opened with line range"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id",
    "file_id",
    "file_name",
    "folder_id",
    "folder_name",
    "is_open"
  ],
  "description": "Response model for agent file attachments showing file status in agent context"
}