{
  "openapi": "3.1.0",
  "info": {
    "title": "Compound API",
    "description": "The Compound API gives your software the same agents people use in the Compound app: create an agent, give it files, ask it for analysis, and read what it produces.\n\n## Access\n\nThe API is not self-serve. Compound activates your organization and issues its API keys; [book a demo](https://getcompound.ai/developers) to get started. A key belongs to your organization, not to a person, and can create as many agents as you need, for example one agent for each person you serve. Tag each agent with your own `external_id` and look it up with `GET /v1/agents?external_id=...`.\n\n## Authentication\n\nSend the key as a bearer token on every request:\n\n```\nAuthorization: Bearer cpd_...\n```\n\nCompound stores only a hash of each key. Ask Compound to revoke a key you no longer use. People who sign in with `compound login` can call the API with their session token too.\n\n## Quick start\n\nThis walk-through creates an agent for one of your users, gives it a spreadsheet, asks it for analysis and downloads what it writes. It uses `curl` and `jq`. Set your key and the base URL first:\n\n```\nexport COMPOUND_API_KEY=cpd_...\nexport COMPOUND=https://ws.getcompound.ai\n```\n\n### 1. Check your key\n\n```\ncurl $COMPOUND/v1/me -H \"Authorization: Bearer $COMPOUND_API_KEY\"\n```\n\n```\n{\"id\": \"...\", \"name\": \"Acme Research\", \"type\": \"api_account\", ...}\n```\n\n`type` is `api_account` for an organization API key. A 401 means the key is wrong or revoked.\n\n### 2. Create an agent for one of your users\n\n```\ncurl -X POST $COMPOUND/v1/agents \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"Jane Doe research\", \"external_id\": \"user_8412\"}'\n```\n\nThe response is 201 with the new agent:\n\n```\n{\n  \"id\": \"6ae0d8ec959b7360cad98668\",\n  \"name\": \"Jane Doe research\",\n  \"external_id\": \"user_8412\",\n  \"role\": \"owner\",\n  \"time_zone\": \"UTC\",\n  \"capabilities\": {\"web\": true, \"public_data\": true, \"email\": true, ...},\n  ...\n}\n```\n\n`external_id` is your own id for the person the agent works for. Creating a second live agent with the same `external_id` returns 409 `{\"detail\": \"An agent with external_id 'user_8412' already exists\"}`.\n\n### 3. Find the agent again\n\n```\nAGENT_ID=$(curl -s \"$COMPOUND/v1/agents?external_id=user_8412\" \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\" | jq -r '.data[0].id')\n```\n\n`GET /v1/agents?external_id=...` returns `{\"data\": [...]}` with at most one agent, since `external_id` is unique among your live agents. `data` is empty when you have not created one for that user yet.\n\n### 4. Give it a file\n\nFile bytes go to storage through a signed URL, never through this API: start an upload, PUT the bytes to the URL it returns, then create the file. The upload needs the file's size and its CRC32C checksum as 8 hex digits; the PUT sends the same 4 bytes in base64. With Python's `google-crc32c` package:\n\n```\nCHECKSUM=$(python3 -c 'import google_crc32c; \\\nprint(google_crc32c.Checksum(open(\"revenue.csv\", \"rb\").read()).digest().hex())')\nCHECKSUM_BASE64=$(echo $CHECKSUM | xxd -r -p | base64)\nSIZE=$(wc -c < revenue.csv)\n\nUPLOAD=$(curl -s -X POST $COMPOUND/v1/agents/$AGENT_ID/files/uploads \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"path\\\": \\\"revenue.csv\\\", \\\"size_bytes\\\": $SIZE, \\\"checksum\\\": \\\"$CHECKSUM\\\"}\")\n```\n\n```\n{\"upload_url\": \"https://storage.googleapis.com/...\", \"file_id\": \"2d3d1b47-...\", \"version_id\": \"f2986aed-...\"}\n```\n\n```\ncurl -T revenue.csv \"$(echo \"$UPLOAD\" | jq -r .upload_url)\" \\\n  -H \"x-goog-hash: crc32c=$CHECKSUM_BASE64\"\n\ncurl -X POST $COMPOUND/v1/agents/$AGENT_ID/files \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"$(echo \"$UPLOAD\" | jq --argjson size $SIZE \\\n    '{file_id, version_id, path: \"revenue.csv\", size_bytes: $size}')\"\n```\n\nThe last call returns 201 with the file: its `id`, `path` and `version_number` 1. It returns 409 when the bytes have not arrived or another file already has the path. Put a file in a folder by giving a path such as `deals/acme/revenue.csv`.\n\n### 5. Ask for analysis\n\n```\nMESSAGE=$(curl -s -X POST $COMPOUND/v1/agents/$AGENT_ID/messages \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Using revenue.csv, chart revenue by ticker and save it as revenue.xlsx.\",\n       \"client_message_id\": \"user_8412-request-1\"}')\nSHORT_ID=$(echo \"$MESSAGE\" | jq -r .short_id)\n```\n\nThe 201 response is your message as stored, not the answer: the agent works in the background. Keep its `short_id` to find the work it starts. Sending the same `client_message_id` again returns the stored message instead of asking twice, so a retry is safe.\n\n```\n{\"id\": \"...\", \"author_type\": \"user\", \"short_id\": \"l6kgcwyd\", \"task_number\": null, \"opened_task_numbers\": [], ...}\n```\n\nPoll the conversation every few seconds. Messages come newest first; the agent's have `author_type` `agent`:\n\n```\ncurl \"$COMPOUND/v1/agents/$AGENT_ID/messages?limit=10\" \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\"\n```\n\nThe agent answers a quick question in the main chat (`task_number` null). For longer work it opens a task: the task's `request_message_ids` holds your message's `short_id`, and the agent's messages about that work carry the task's `task_number`. Tasks come newest first. Wait for the task to appear, wait for it to finish, then read it:\n\n```\nuntil TASK_NUMBER=$(curl -s $COMPOUND/v1/agents/$AGENT_ID/tasks \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\" \\\n  | jq -e --arg id \"$SHORT_ID\" '.data[] | select(.request_message_ids | index($id)) | .number')\ndo sleep 5; done\n\nuntil curl -s $COMPOUND/v1/agents/$AGENT_ID/tasks/$TASK_NUMBER \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\" \\\n  | jq -e '.state == \"completed\" or .state == \"needs_input\" or .state == \"paused\"' > /dev/null\ndo sleep 10; done\n\ncurl $COMPOUND/v1/agents/$AGENT_ID/tasks/$TASK_NUMBER \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\"\n```\n\n```\n{\n  \"number\": 1,\n  \"title\": \"Chart revenue by ticker\",\n  \"state\": \"completed\",\n  \"files\": [{\"file_id\": \"97342150-...\", \"filename\": \"revenue.xlsx\", \"version_number\": 1}],\n  \"comments\": [{\"author_type\": \"agent\", \"body\": {\"markdown\": \"Done. revenue.xlsx has ...\"}, ...}],\n  ...\n}\n```\n\n`state` is `running` while the agent works and `completed` when it is done. `needs_input` means the agent asked you a question: answer with `POST /v1/agents/{agent_id}/messages` and that `task_number`. `paused` means the task stopped: someone paused it with `POST /v1/agents/{agent_id}/tasks/{number}/pause` (continue it with `.../resume`), or your organization ran out of credits or reached a daily credit limit (see `GET /v1/usage/credits`). The first loop waits only for a task, so stop it if the agent answers in the main chat instead. `comments` holds the agent's messages on the task and `files` the files it wrote.\n\nTo be told instead of polling, stream `GET /v1/agents/{agent_id}/events`: a `message` or `task` event arrives each time a message is posted or a task changes. When nothing happens, check `GET /v1/usage/credits`: `out_of_credits` true means your agents are paused until credits are added.\n\n### 6. Download what it wrote\n\n`GET /v1/agents/{agent_id}/files` lists every file, with `author_type` `agent` and the task's number in `task_id` on the files the agent wrote. Ask for a download link and fetch the bytes from it:\n\n```\nOUTPUT_FILE_ID=$(curl -s $COMPOUND/v1/agents/$AGENT_ID/tasks/$TASK_NUMBER \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\" | jq -r '.files[0].file_id')\nDOWNLOAD=$(curl -s -X POST $COMPOUND/v1/agents/$AGENT_ID/files/$OUTPUT_FILE_ID/download \\\n  -H \"Authorization: Bearer $COMPOUND_API_KEY\")\ncurl -o revenue.xlsx \"$(echo \"$DOWNLOAD\" | jq -r .download_url)\"\n```\n\nThe link is short-lived; ask for a new one each time. Send `{\"citation_links\": true}` as the body to download a copy whose citations link to their sources, or use `POST /v1/agents/{agent_id}/files/{file_id}/export` for a PDF.\n\n### Next\n\n- Recurring work: `POST /v1/agents/{agent_id}/schedules` with a `name`, an `instruction`, a five-field `cron` and a `time_zone`. Each run opens a task.\n- All the agent's work: `GET /v1/agents/{agent_id}/tasks`, newest first.\n- Email the agent received: `GET /v1/agents/{agent_id}/emails`.\n- Failures: see Errors below. A duplicate `external_id` is a 409; retry a 429 after `Retry-After` seconds.\n\n## Errors\n\nErrors return a JSON body `{\"detail\": \"...\"}` with a 4xx or 5xx status. Request validation errors return 422 with FastAPI's `detail` list.\n\n## Rate limits\n\nEvery response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. A 429 response carries `Retry-After` in seconds.\n",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://ws.getcompound.ai"
    }
  ],
  "paths": {
    "/v1/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get the caller",
        "description": "Returns the account the request is authenticated as. Use it to check that an API key works.",
        "operationId": "get_me",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List your agents",
        "description": "Lists the agents the caller owns, newest first. Without `external_id`, the caller's default agent is left out. Filter by `external_id` to find the agent you created for one of your users.",
        "operationId": "list_agents",
        "parameters": [
          {
            "name": "external_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return only the agent with this external_id.",
              "title": "External Id"
            },
            "description": "Return only the agent with this external_id."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            },
            "description": "The `next_cursor` of the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPage"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "summary": "Create an agent",
        "description": "Creates an agent with no files, owned by the caller. An organization API key can create one agent per person it serves; tag each with `external_id`. Needs a paid plan or contract.",
        "operationId": "create_agent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/shared": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List agents shared with you",
        "description": "Lists agents other accounts have shared with the caller, directly or through a team or group.",
        "operationId": "list_shared_agents",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/trash": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List deleted agents",
        "description": "Lists the caller's deleted agents that can still be restored, most recently deleted first.",
        "operationId": "list_deleted_agents",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedAgentList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/restore": {
      "post": {
        "tags": [
          "Agents"
        ],
        "summary": "Restore a deleted agent",
        "description": "Brings back one of the caller's deleted agents, with its files, within 30 days of its deletion.",
        "operationId": "restore_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The deleted agent's id.",
              "title": "Agent Id"
            },
            "description": "The deleted agent's id."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/trash/{agent_id}": {
      "delete": {
        "tags": [
          "Agents"
        ],
        "summary": "Permanently delete a deleted agent",
        "description": "Deletes one of the caller's deleted agents and all its data for good, without waiting 30 days. This cannot be undone.",
        "operationId": "purge_deleted_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The deleted agent's id.",
              "title": "Agent Id"
            },
            "description": "The deleted agent's id."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get an agent",
        "operationId": "get_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agents"
        ],
        "summary": "Update an agent",
        "description": "Changes only the fields sent. Only the agent's owner may update it.",
        "operationId": "update_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agents"
        ],
        "summary": "Delete an agent",
        "description": "Deletes the agent and its files. The owner can restore it in the Compound app for 30 days.",
        "operationId": "delete_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List an agent's projects",
        "operationId": "list_projects",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "description": "Creates a project and its folder in the agent's files. Needs edit access to the agent. A name another project of the agent already has returns 409.",
        "operationId": "create_project",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/projects/{project_id}": {
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "description": "Changes only the fields sent. Needs edit access to the agent.",
        "operationId": "update_project",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "description": "Deletes the project and archives its tasks, including any still running. Its files stay in the agent's files. Needs edit access to the agent.",
        "operationId": "delete_project",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/schedules": {
      "get": {
        "tags": [
          "Schedules"
        ],
        "summary": "List an agent's schedules",
        "operationId": "list_schedules",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Schedules"
        ],
        "summary": "Create a schedule",
        "description": "Creates a live schedule. At each run the agent opens a task with the instruction. Needs edit access to the agent.",
        "operationId": "create_schedule",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/schedules/{schedule_number}": {
      "patch": {
        "tags": [
          "Schedules"
        ],
        "summary": "Update a schedule",
        "description": "Changes only the fields sent; send `is_live` to pause or resume it. Needs edit access to the agent.",
        "operationId": "update_schedule",
        "parameters": [
          {
            "name": "schedule_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The schedule's number on its agent.",
              "title": "Schedule Number"
            },
            "description": "The schedule's number on its agent."
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Schedules"
        ],
        "summary": "Delete a schedule",
        "description": "Deletes the schedule. Tasks its runs opened stay. Needs edit access to the agent.",
        "operationId": "delete_schedule",
        "parameters": [
          {
            "name": "schedule_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The schedule's number on its agent.",
              "title": "Schedule Number"
            },
            "description": "The schedule's number on its agent."
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "List an agent's tasks",
        "description": "Lists the agent's tasks, highest number (newest) first. Read finished work most recently finished first with `GET /v1/agents/{agent_id}/tasks/finished`.",
        "operationId": "list_tasks",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaskState"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only tasks in these states. Repeat to give several.",
              "title": "State"
            },
            "description": "Only tasks in these states. Repeat to give several."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's tasks.",
              "title": "Project Id"
            },
            "description": "Only this project's tasks."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            },
            "description": "The `next_cursor` of the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPage"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/finished": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "List an agent's finished tasks",
        "description": "Lists done and archived tasks, most recently finished first.",
        "operationId": "list_finished_tasks",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "completed",
                    "archived"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only done (`completed`) or only `archived` tasks.",
              "title": "State"
            },
            "description": "Only done (`completed`) or only `archived` tasks."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's tasks.",
              "title": "Project Id"
            },
            "description": "Only this project's tasks."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            },
            "description": "The `next_cursor` of the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPage"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Get a task",
        "description": "Returns the task with its steps, the files it wrote and its comments.",
        "operationId": "get_task",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "comment_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "description": "How many of the newest comments to return.",
              "default": 50,
              "title": "Comment Limit"
            },
            "description": "How many of the newest comments to return."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/accept": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Accept a proposed task",
        "description": "Starts a proposed task now, or plans it to run at its schedule's next firing.",
        "operationId": "accept_task",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptTaskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/dismiss": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Dismiss a proposed task",
        "description": "Deletes a proposed task the agent should not do.",
        "operationId": "dismiss_task",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/pause": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Pause a task",
        "description": "Pauses a running task or one that needs input.",
        "operationId": "pause_task",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/resume": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Resume a paused task",
        "operationId": "resume_task",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/archive": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Archive a task",
        "operationId": "archive_task",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/unarchive": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Unarchive a task",
        "description": "Moves an archived task back to done.",
        "operationId": "unarchive_task",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/project": {
      "put": {
        "tags": [
          "Tasks"
        ],
        "summary": "Set a task's project",
        "description": "Puts the task, and the tasks it opened, in a project or takes them out of one.",
        "operationId": "set_task_project",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTaskProjectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/cited-files": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "List the files a task cites",
        "description": "Lists the agent's files the task's comments and workbooks cite that the task did not write. Share them with the task through `include_cited_file_ids`.",
        "operationId": "list_task_cited_files",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCitedFileList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/share": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Get a task's share",
        "description": "Returns the task's share link and who it is shared with, or null when the task is not shared. Needs edit access to the agent.",
        "operationId": "get_task_share",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TaskShare"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Task Share"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Share a task",
        "description": "Shares the task, read-only, with the targets. A task has one share: sharing it again replaces the share, its kind (live or snapshot) and who it is shared with.",
        "operationId": "create_task_share",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskShareRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskShare"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tasks"
        ],
        "summary": "Stop sharing a task",
        "description": "Deletes the task's share link; nobody it was shared with can open it any more.",
        "operationId": "delete_task_share",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/share/entries": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Add someone to a task's share",
        "description": "Adds a person, your team, a group or a public link to the task's existing share. A live share cannot be public.",
        "operationId": "add_task_share_entry",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskShareTarget"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskShareEntry"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/tasks/{number}/share/entries/{entry_id}": {
      "delete": {
        "tags": [
          "Tasks"
        ],
        "summary": "Remove someone from a task's share",
        "description": "Removing the last entry leaves the share with nobody; delete the share to stop sharing.",
        "operationId": "remove_task_share_entry",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Number"
            }
          },
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Entry Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/emails": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "summary": "List an agent's emails",
        "description": "Lists the emails in the agent's inbox, with its address. To send or reply, ask the agent in a message.",
        "operationId": "list_agent_emails",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            },
            "description": "The `next_cursor` of the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailPage"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/emails/{email_id}": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "summary": "Get an email",
        "description": "Returns one email with all its messages.",
        "operationId": "get_agent_email",
        "parameters": [
          {
            "name": "email_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Email Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Email"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List your notifications",
        "description": "Lists the caller's notifications from every agent they can open: mentions, comments, access requests and task updates.",
        "operationId": "list_notifications",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/dismiss-all": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Dismiss all notifications",
        "description": "Dismisses every notification waiting on the caller, or only one agent's when `agent_id` is given, and returns the ones it dismissed.",
        "operationId": "dismiss_all_notifications",
        "parameters": [
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Dismiss only this agent's notifications. `default` names the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "Dismiss only this agent's notifications. `default` names the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/{notification_id}/dismiss": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Dismiss a notification",
        "operationId": "dismiss_notification",
        "parameters": [
          {
            "name": "notification_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Notification Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies/search": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Search companies",
        "description": "Searches companies by name, ticker or identifier.",
        "operationId": "search_companies",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "A name, ticker or identifier.",
              "title": "Q"
            },
            "description": "A name, ticker or identifier."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only companies in this ISO 3166 country.",
              "title": "Country"
            },
            "description": "Only companies in this ISO 3166 country."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent.",
              "default": "default",
              "title": "Agent Id"
            },
            "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanySearchResults"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies/data-sources": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get the company data sources",
        "description": "Says which licensed sources company reads through the agent may use.",
        "operationId": "get_company_data_sources",
        "parameters": [
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent.",
              "default": "default",
              "title": "Agent Id"
            },
            "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDataSources"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies/{company_id}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get a company",
        "operationId": "get_company",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The company's id, a UUID that search returns.",
              "title": "Company Id"
            },
            "description": "The company's id, a UUID that search returns."
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent.",
              "default": "default",
              "title": "Agent Id"
            },
            "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies/{company_id}/financials": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get a company's financial statements",
        "description": "Returns one financial statement over the periods the source reports.",
        "operationId": "get_company_financials",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The company's id, a UUID that search returns.",
              "title": "Company Id"
            },
            "description": "The company's id, a UUID that search returns."
          },
          {
            "name": "statement",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "income-statement",
                "balance-sheet",
                "cash-flow-statement"
              ],
              "type": "string",
              "default": "income-statement",
              "title": "Statement"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "Annual",
                "Quarterly",
                "Semi-Annual",
                "LTM",
                "YTD"
              ],
              "type": "string",
              "default": "Annual",
              "title": "Period"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent.",
              "default": "default",
              "title": "Agent Id"
            },
            "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFinancials"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies/{company_id}/news": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get a company's news",
        "description": "Returns news headlines from one feed: `free` (every company) or `factset` (FactSet StreetAccount, when the data sources include FactSet).",
        "operationId": "get_company_news",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The company's id, a UUID that search returns.",
              "title": "Company Id"
            },
            "description": "The company's id, a UUID that search returns."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 365,
              "minimum": 1,
              "default": 30,
              "title": "Days"
            }
          },
          {
            "name": "feed",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "free",
                "factset"
              ],
              "type": "string",
              "default": "free",
              "title": "Feed"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent.",
              "default": "default",
              "title": "Agent Id"
            },
            "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyNews"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies/{company_id}/events": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "List a company's events",
        "description": "Lists the company's earnings, filings and other events, newest first.",
        "operationId": "list_company_events",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The company's id, a UUID that search returns.",
              "title": "Company Id"
            },
            "description": "The company's id, a UUID that search returns."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            },
            "description": "The `next_cursor` of the previous page."
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent.",
              "default": "default",
              "title": "Agent Id"
            },
            "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyEvents"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies/{company_id}/estimates": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get a company's analyst estimates",
        "description": "Returns analyst consensus for the company's next fiscal periods. FactSet data: needs FactSet in the data sources.",
        "operationId": "get_company_estimates",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The company's id, a UUID that search returns.",
              "title": "Company Id"
            },
            "description": "The company's id, a UUID that search returns."
          },
          {
            "name": "periodicity",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "ANN",
                "QTR",
                "SEMI",
                "NTMA",
                "LTMA"
              ],
              "type": "string",
              "default": "ANN",
              "title": "Periodicity"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 8,
              "minimum": 0,
              "description": "How many periods; 0 returns every period available.",
              "default": 0,
              "title": "Limit"
            },
            "description": "How many periods; 0 returns every period available."
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent.",
              "default": "default",
              "title": "Agent Id"
            },
            "description": "The agent whose owner's data subscriptions decide which sources the read may use, for example FactSet. Defaults to the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyEstimates"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/watched-companies": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "List the companies an agent watches",
        "description": "Lists the companies whose earnings, filings and news the agent hears of, and how often it hears.",
        "operationId": "list_watched_companies",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchedCompanies"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Watch a company",
        "description": "The agent starts hearing of the company's events. A company the agent already watches is a conflict; change its triggers with PATCH instead.",
        "operationId": "watch_company",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatchCompanyRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchedCompany"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/watched-companies/{company_id}": {
      "patch": {
        "tags": [
          "Companies"
        ],
        "summary": "Change a watched company's triggers",
        "description": "Changes only the fields sent.",
        "operationId": "update_watched_company",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The company's id, a UUID that search returns.",
              "title": "Company Id"
            },
            "description": "The company's id, a UUID that search returns."
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWatchedCompanyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchedCompany"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Companies"
        ],
        "summary": "Stop watching a company",
        "operationId": "unwatch_company",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The company's id, a UUID that search returns.",
              "title": "Company Id"
            },
            "description": "The company's id, a UUID that search returns."
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/company-alerts": {
      "patch": {
        "tags": [
          "Companies"
        ],
        "summary": "Change how an agent hears of company events",
        "description": "Changes only the fields sent. Returns 404 until the agent watches its first company.",
        "operationId": "update_company_alerts",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCompanyAlertsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyAlerts"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage/credits": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Get your credits",
        "description": "Returns your plan's credits for the current period: the allotment, what is used and what is left.",
        "operationId": "get_usage_credits",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credits"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage/agents": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "List your credits by agent",
        "description": "Lists the credits you spent on each agent between `after` and `before`, by default over the last 30 days. Spans longer than a year are cut to a year.",
        "operationId": "list_agent_usage",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start of the window.",
              "title": "After"
            },
            "description": "Start of the window."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End of the window, not included.",
              "title": "Before"
            },
            "description": "End of the window, not included."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentUsageList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage/billing-portal": {
      "post": {
        "tags": [
          "Usage"
        ],
        "summary": "Open your billing portal",
        "description": "Creates a billing portal session and returns its link. A member of a team plan buys credits on the team's billing page in the Compound app instead.",
        "operationId": "create_billing_portal_session",
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingPortalSession"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/support/requests": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Contact Support",
        "description": "Sends a question, a problem report or an idea to the Compound team, from the caller's account. A caller may send a few requests per hour.",
        "operationId": "create_support_request",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportRequest"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/properties": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get an agent's properties",
        "description": "Returns the values of your team's custom agent properties on this agent. Only the owner and members of the owner's team can read them.",
        "operationId": "get_agent_properties",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentProperties"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agents"
        ],
        "summary": "Set an agent's properties",
        "description": "Sets the properties sent and keeps the rest. Needs edit access to the agent and membership of the owner's team.",
        "operationId": "update_agent_properties",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentPropertiesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentProperties"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/email-allowlist": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get an agent's email allowlist",
        "description": "Lists whom the agent's inbox may write to and hear from besides the people the agent is shared with. Only the owner can read it.",
        "operationId": "get_agent_email_allowlist",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAllowlist"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Agents"
        ],
        "summary": "Replace an agent's email allowlist",
        "description": "Replaces both lists and returns what was stored: entries come back lowercased, deduplicated and sorted. An entry outside your organization's allowed domains is a 422. Returns 409 while the agent has no email address yet. Only the owner can change it.",
        "operationId": "update_agent_email_allowlist",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmailAllowlistRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAllowlist"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/shares": {
      "get": {
        "tags": [
          "Sharing"
        ],
        "summary": "List an agent's shares",
        "description": "Lists who the agent is shared with. Only the owner can read them.",
        "operationId": "list_agent_shares",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentShareList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Sharing"
        ],
        "summary": "Share an agent",
        "description": "Shares the agent with a person (who gets an email), your team, a group, or anyone with the link. If the share already exists it is returned unchanged; change its role with `PATCH`. Only the owner can share an agent, and the default agent cannot be shared.",
        "operationId": "create_agent_share",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentShareRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentShare"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/shares/{share_id}": {
      "patch": {
        "tags": [
          "Sharing"
        ],
        "summary": "Change a share's role",
        "description": "Only the owner can change a share. A public link stays `read`.",
        "operationId": "update_agent_share",
        "parameters": [
          {
            "name": "share_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The share's id.",
              "title": "Share Id"
            },
            "description": "The share's id."
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentShareRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentShare"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sharing"
        ],
        "summary": "Remove a share",
        "description": "Takes the access away. Only the owner can remove a share.",
        "operationId": "delete_agent_share",
        "parameters": [
          {
            "name": "share_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The share's id.",
              "title": "Share Id"
            },
            "description": "The share's id."
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/members": {
      "get": {
        "tags": [
          "Sharing"
        ],
        "summary": "List an agent's members",
        "description": "Lists everyone who can open the agent, directly or through a team or group, owner first.",
        "operationId": "list_agent_members",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentMemberList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/edit-access-requests": {
      "post": {
        "tags": [
          "Sharing"
        ],
        "summary": "Ask for edit access",
        "description": "Asks the owner of an agent you can only view to make you an Editor. Returns 400 when you can already edit it.",
        "operationId": "request_agent_edit_access",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EditAccessRequest"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/shared-items": {
      "get": {
        "tags": [
          "Sharing"
        ],
        "summary": "List shared items",
        "description": "Lists the agents, files and tasks shared with you (`with_me`), or the ones you shared (`by_me`), newest first.",
        "operationId": "list_shared_with_or_by_you",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": true,
            "schema": {
              "enum": [
                "with_me",
                "by_me"
              ],
              "type": "string",
              "description": "`with_me`: shared with you; `by_me`: what you shared.",
              "title": "Direction"
            },
            "description": "`with_me`: shared with you; `by_me`: what you shared."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedItemList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/team": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get your team",
        "description": "Returns the team the caller belongs to, or null when the caller is on no team.",
        "operationId": "get_your_team",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Team"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Your Team"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/team/members": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "List your team's members",
        "operationId": "list_your_team_members",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/team/agent-properties": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "List your team's agent properties",
        "description": "Lists the custom properties your team's admins defined for agents. Set their values with `PATCH /v1/agents/{agent_id}/properties`.",
        "operationId": "list_agent_property_definitions",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPropertyDefinitionList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List your connections",
        "description": "Lists the apps you can connect, and whether each is connected. Connections belong to you, not to an agent.",
        "operationId": "list_connections",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{connection_id}/connect-url": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Start connecting an app",
        "description": "Returns the sign-in link that connects the app to your account. Connecting finishes in the browser.",
        "operationId": "create_connection_url",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The app's id.",
              "title": "Connection Id"
            },
            "description": "The app's id."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectUrl"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{connection_id}": {
      "delete": {
        "tags": [
          "Connections"
        ],
        "summary": "Disconnect an app",
        "operationId": "delete_connection",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The app's id.",
              "title": "Connection Id"
            },
            "description": "The app's id."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/messages": {
      "post": {
        "tags": [
          "Conversation"
        ],
        "summary": "Send a message to an agent",
        "description": "Sends a message to the agent's main chat, or with `task_number` to one task. The agent answers in the chat or opens a task for the work; read both with `GET /v1/agents/{agent_id}/messages` or follow them on `GET /v1/agents/{agent_id}/events`. Needs edit access to the agent.",
        "operationId": "send_message",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Conversation"
        ],
        "summary": "List an agent's messages",
        "description": "Lists the agent's conversation, newest first: the main chat and every task's messages, or with `task_number` one task's.",
        "operationId": "list_messages",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            },
            "description": "The `next_cursor` of the previous page."
          },
          {
            "name": "task_number",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this task's conversation.",
              "title": "Task Number"
            },
            "description": "Only this task's conversation."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagePage"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/activity": {
      "get": {
        "tags": [
          "Conversation"
        ],
        "summary": "List an agent's recent operations",
        "description": "What the agent read, searched and wrote, oldest first: the newest `limit` operations. Operations are kept until the agent has been quiet for two hours.",
        "operationId": "list_activity",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "task_number",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this task's operations.",
              "title": "Task Number"
            },
            "description": "Only this task's operations."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/proposals": {
      "get": {
        "tags": [
          "Conversation"
        ],
        "summary": "List an agent's proposals",
        "description": "Lists the changes the agent asks you to approve. Accept or decline each one.",
        "operationId": "list_proposals",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/proposals/{proposal_id}": {
      "get": {
        "tags": [
          "Conversation"
        ],
        "summary": "Get a proposal",
        "operationId": "get_proposal",
        "parameters": [
          {
            "name": "proposal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Proposal Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Proposal"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/proposals/{proposal_id}/accept": {
      "post": {
        "tags": [
          "Conversation"
        ],
        "summary": "Accept a proposal",
        "description": "Applies every action of the proposal and removes it. When an action fails the response is 409 with the reason, and the proposal stays with that action and the ones after it.",
        "operationId": "accept_proposal",
        "parameters": [
          {
            "name": "proposal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Proposal Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptProposalRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/proposals/{proposal_id}/decline": {
      "post": {
        "tags": [
          "Conversation"
        ],
        "summary": "Decline a proposal",
        "description": "Removes the proposal without applying it.",
        "operationId": "decline_proposal",
        "parameters": [
          {
            "name": "proposal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Proposal Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/citations/{key}": {
      "get": {
        "tags": [
          "Conversation"
        ],
        "summary": "Get a citation",
        "description": "Reads one citation by the key a message's `sources` gives, asking the data provider for details the message leaves out.",
        "operationId": "get_citation",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CitationDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/events": {
      "get": {
        "tags": [
          "Conversation"
        ],
        "summary": "Stream an agent's events",
        "description": "Server-sent events of what happens on the agent. The first frame is `snapshot`, carrying an `AgentSnapshot` of its current state; each later `event` frame carries an `AgentEvent`. The server ends the stream with a `bye` frame (data `{}`) after about 40 minutes, and may close it without one. Reconnect with the `cursor` of the last frame you read: you then receive what happened in between, or a fresh `snapshot` when that is too old to replay. Comment lines (`:`) keep the connection open; ignore them.",
        "operationId": "stream_agent_events",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `cursor` of the last frame you read, to continue after it.",
              "title": "Cursor"
            },
            "description": "The `cursor` of the last frame you read, to continue after it."
          }
        ],
        "responses": {
          "200": {
            "description": "A `text/event-stream` of `snapshot`, `event` and `bye` frames.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AgentSnapshot"
                    },
                    {
                      "$ref": "#/components/schemas/AgentEvent"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List an agent's files",
        "description": "Lists every file the agent holds, at its latest version. Folders exist only as the paths of their files.",
        "operationId": "list_agent_files",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListedAgentFileList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Create a file from an upload",
        "description": "Saves uploaded bytes as a file. Returns 409 when the bytes have not arrived or another file already has the path.",
        "operationId": "create_file",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFileRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFile"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/search": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Search an agent's files by name",
        "operationId": "search_agent_files",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Words in the file's path.",
              "title": "Query"
            },
            "description": "Words in the file's path."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileSearchHitList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/search": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Search files in every agent by name",
        "description": "Searches every agent the caller owns or that is shared with the caller.",
        "operationId": "search_all_files",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Words in the file's path.",
              "title": "Query"
            },
            "description": "Words in the file's path."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileSearchHitList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/trash": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List deleted files",
        "description": "Lists the agent's deleted files, most recently deleted first. Each row is the deletion, so its `version_id` is null.",
        "operationId": "list_deleted_files",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFileList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/trash/restore": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Restore deleted files",
        "description": "Brings deleted files back at their last saved content.",
        "operationId": "restore_deleted_files",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileIdsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFileList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/uploads": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Start a file upload",
        "description": "Returns a signed URL to PUT the file's bytes to. Once the bytes are uploaded, create the file with `POST /v1/agents/{agent_id}/files`.",
        "operationId": "create_file_upload",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUploadRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUpload"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/copy": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Copy files to another agent",
        "description": "Copies files, and folders with everything inside them, into another agent the caller can edit. Returns the copies.",
        "operationId": "copy_files",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyFilesRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFileList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/delete": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Delete files",
        "description": "Moves files to the agent's trash, where they can be restored. Returns the deletions.",
        "operationId": "delete_files",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileIdsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFileList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/folders/rename": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Rename or move a folder",
        "description": "Moves every file under the folder to the new folder path.",
        "operationId": "rename_agent_folder",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FolderRename"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenamedFolder"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get a file",
        "operationId": "get_agent_file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFile"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Files"
        ],
        "summary": "Rename or move a file",
        "operationId": "update_agent_file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFileRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFile"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/versions": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List a file's versions",
        "description": "Lists every saved version of the file, oldest first, including the versions that record a deletion.",
        "operationId": "list_file_versions",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFileList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/download": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Get a download link",
        "description": "Returns a short-lived URL for the file's bytes. File bytes never pass through this API.",
        "operationId": "download_agent_file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/DownloadRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadLink"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/export": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Export a file to another format",
        "description": "Converts a Word, Excel or PowerPoint file to PDF, or an `.xlsb` or `.xls` workbook to `.xlsx`, and returns a short-lived URL for the result.",
        "operationId": "export_agent_file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportLink"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/open-in-excel": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Get a link that opens a workbook in desktop Excel",
        "description": "Returns 403 when the organization has turned off opening files in desktop apps.",
        "operationId": "open_agent_file_in_excel",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenInDesktopLink"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/open-in-powerpoint": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Get a link that opens a deck in desktop PowerPoint",
        "description": "Returns 403 when the organization has turned off opening files in desktop apps.",
        "operationId": "open_agent_file_in_powerpoint",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenInDesktopLink"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/links": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List a file's read-only links",
        "description": "Lists the file's links, each with the version it shows and who can open it. Needs edit access to the agent.",
        "operationId": "list_file_links",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileLinkList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Create a read-only link to a file",
        "description": "Creates a link that opens the file read-only for the recipients, and emails each person. A public link must pin a version.",
        "operationId": "create_file_link",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFileLinkRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileLink"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/file-links/{link_id}/recipients": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Add a recipient to a file link",
        "description": "Gives one more person, or the public, read access through the link. Adding a recipient the link already has returns that recipient.",
        "operationId": "add_file_link_recipient",
        "parameters": [
          {
            "name": "link_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Link Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecipientRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkRecipient"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/file-links/{link_id}/recipients/{recipient_id}": {
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Remove a recipient from a file link",
        "operationId": "remove_file_link_recipient",
        "parameters": [
          {
            "name": "link_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Link Id"
            }
          },
          {
            "name": "recipient_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Recipient Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/file-links/{link_id}": {
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Delete a file link",
        "description": "Deletes the link; nobody can open the file through it any more.",
        "operationId": "delete_file_link",
        "parameters": [
          {
            "name": "link_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Link Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/signatures": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List a PDF's signatures",
        "operationId": "list_file_signatures",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignatureList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/signing-requests": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List a PDF's open signing requests",
        "operationId": "list_file_signing_requests",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigningRequestList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/sign": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Sign a PDF",
        "description": "Signs the boxes as the caller and saves the signed copy as the file's new version.",
        "operationId": "sign_file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignFileRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFile"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/signing-requests/{signing_request_id}/cancel": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Cancel a signing request",
        "operationId": "cancel_file_signing_request",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "signing_request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Signing Request Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigningRequest"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/files/{file_id}/comments": {
      "get": {
        "tags": [
          "Comments"
        ],
        "summary": "List the comments on a file",
        "operationId": "list_file_comments",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "open",
                "resolved",
                "all"
              ],
              "type": "string",
              "description": "Which comments to list.",
              "default": "open",
              "title": "Status"
            },
            "description": "Which comments to list."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentList"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Comments"
        ],
        "summary": "Comment on a file",
        "description": "Opens a comment on the file as a whole. The agent picks it up.",
        "operationId": "create_file_comment",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentText"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/comments/{comment_id}/replies": {
      "post": {
        "tags": [
          "Comments"
        ],
        "summary": "Reply to a comment",
        "description": "Adds a reply at the end of the comment's entries. The agent picks it up. Returns 409 when the comment has no room for more replies.",
        "operationId": "reply_to_file_comment",
        "parameters": [
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Comment Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentText"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/comments/{comment_id}/resolve": {
      "post": {
        "tags": [
          "Comments"
        ],
        "summary": "Resolve a comment",
        "operationId": "resolve_file_comment",
        "parameters": [
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Comment Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/comments/{comment_id}": {
      "delete": {
        "tags": [
          "Comments"
        ],
        "summary": "Delete a comment",
        "description": "Deletes the comment with its replies and returns what was deleted.",
        "operationId": "delete_file_comment",
        "parameters": [
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Comment Id"
            }
          },
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The agent's id, or `default` for the caller's own agent.",
              "title": "Agent Id"
            },
            "description": "The agent's id, or `default` for the caller's own agent."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "400": {
            "description": "The request names an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key or session token is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no access to the resource, or not the access this action needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for the number of seconds in the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AcceptProposalRequest": {
        "properties": {
          "destination_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Destination Agent Id",
            "description": "The agent a `copy_to_agent` action copies into. Needs ownership of this agent and edit access to the destination."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "AcceptProposalRequest"
      },
      "AcceptTaskRequest": {
        "properties": {
          "run_now": {
            "type": "boolean",
            "title": "Run Now",
            "description": "True starts the task now; false plans it, to run at its schedule's next firing."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "run_now"
        ],
        "title": "AcceptTaskRequest"
      },
      "Activity": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The operation's position in the agent's activity."
          },
          "verb": {
            "type": "string",
            "title": "Verb",
            "description": "What the agent did, for example `read` or `wrote`."
          },
          "subject": {
            "type": "string",
            "title": "Subject",
            "description": "What it did it to: a path, a range, a ticker. Empty when it named nothing readable."
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope",
            "description": "What kind of thing the subject is, for example `workbook` or `company research`."
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "title": "At"
          },
          "task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Number"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "step": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step",
            "description": "The step of the task the operation was for."
          },
          "to_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Path",
            "description": "Where a move or copy put the file at `path`."
          },
          "sheet": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sheet",
            "description": "The worksheet the operation touched."
          },
          "a1": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "A1",
            "description": "The cell range the operation touched."
          },
          "slide": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slide"
          },
          "chart": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chart"
          },
          "page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query",
            "description": "What the agent searched for."
          },
          "count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Count",
            "description": "How many results, rows or items the operation returned."
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company",
            "description": "The company the operation was about."
          },
          "form": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form",
            "description": "The filing form, for example `10-K`."
          },
          "reports": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reports",
            "description": "The reports the operation read."
          },
          "concerns": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Concerns",
            "description": "What the operation looked into, in the agent's words."
          }
        },
        "type": "object",
        "required": [
          "id",
          "verb",
          "subject",
          "scope",
          "at",
          "task_number",
          "file_id",
          "path",
          "url",
          "step",
          "to_path",
          "sheet",
          "a1",
          "slide",
          "chart",
          "page",
          "query",
          "count",
          "company",
          "form",
          "reports",
          "concerns"
        ],
        "title": "Activity"
      },
      "ActivityList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Activity"
            },
            "type": "array",
            "title": "Data",
            "description": "Oldest first."
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ActivityList"
      },
      "Agent": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Null for an agent that was never named."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "Your own identifier for this agent, for example the id of the person in your system it works for. Unique among your live agents."
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "write",
              "read"
            ],
            "title": "Role",
            "description": "The caller's access to this agent."
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "description": "True for the caller's own default agent, the one `default` names. It cannot be shared or deleted."
          },
          "time_zone": {
            "type": "string",
            "title": "Time Zone",
            "description": "IANA time zone the agent schedules work in."
          },
          "capabilities": {
            "$ref": "#/components/schemas/AgentCapabilities"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id",
            "description": "The user id of the agent's owner."
          },
          "file_system_version": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FileSystemVersion"
              },
              {
                "type": "null"
              }
            ],
            "description": "The storage format of the agent's files."
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility",
            "description": "`private`: only the owner can open it; `shared`: shared with people, a team or a group; `public`: anyone with the link can open it."
          },
          "properties": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Properties",
            "description": "Your team's agent properties by property id, as `GET /v1/agents/{agent_id}/properties` returns them; null when you are neither the owner nor on the owner's team."
          },
          "email_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Address",
            "description": "The agent's email address, the `address` that `GET /v1/agents/{agent_id}/emails` returns. Null when the agent has no address yet or email is not available."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "external_id",
          "role",
          "is_default",
          "time_zone",
          "capabilities",
          "created_at",
          "updated_at",
          "owner_id",
          "file_system_version",
          "visibility",
          "properties",
          "email_address"
        ],
        "title": "Agent"
      },
      "AgentCapabilities": {
        "properties": {
          "org_conventions": {
            "type": "boolean",
            "title": "Org Conventions",
            "description": "Follow the organization's standards and conventions."
          },
          "email": {
            "type": "boolean",
            "title": "Email",
            "description": "Read and send email from the agent's inbox."
          },
          "connectors": {
            "type": "boolean",
            "title": "Connectors",
            "description": "Use connected apps."
          },
          "proposals": {
            "type": "boolean",
            "title": "Proposals",
            "description": "Propose new work."
          },
          "questions": {
            "type": "boolean",
            "title": "Questions",
            "description": "Ask questions while it works."
          },
          "web": {
            "type": "boolean",
            "title": "Web",
            "description": "Search and read the web."
          },
          "public_data": {
            "type": "boolean",
            "title": "Public Data",
            "description": "Read company and market data."
          }
        },
        "type": "object",
        "required": [
          "org_conventions",
          "email",
          "connectors",
          "proposals",
          "questions",
          "web",
          "public_data"
        ],
        "title": "AgentCapabilities"
      },
      "AgentFile": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "path": {
            "type": "string",
            "title": "Path",
            "description": "The file's path from the top of the agent's files, with `/` between folders, for example `deals/acme/model.xlsx`."
          },
          "version_number": {
            "type": "integer",
            "title": "Version Number",
            "description": "The version this row describes, counted from 1."
          },
          "version_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Id",
            "description": "Identifies this version's content. Signing requests name the version they were made for by it. Null when the version records a deletion."
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When this version was saved."
          },
          "author_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "user",
                  "agent"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Type",
            "description": "Whether a person or the agent saved this version."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id",
            "description": "The agent that holds the file."
          },
          "internal_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InternalFileType"
              },
              {
                "type": "null"
              }
            ],
            "description": "The format Compound keeps the file in when it differs from its extension: `sfdt` is a Word file kept in the format of Compound's Word editor."
          },
          "author_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author User Id",
            "description": "The person who saved this version, or on whose behalf the agent saved it. Null when the caller is not a member of the agent."
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "The conversation the agent saved this version from."
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id",
            "description": "The message the agent saved this version for."
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id",
            "description": "The task the agent saved this version for."
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url",
            "description": "The web page the file was saved from."
          },
          "expansion_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExpansionStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "For an archive or mail file: whether Compound has unpacked its contents into the agent's files."
          },
          "to_revision": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Revision",
            "description": "The edit revision this version was saved at, for a file edited live in Compound."
          },
          "change_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VersionChangeKind"
              },
              {
                "type": "null"
              }
            ],
            "description": "What made this version, for a file edited live in Compound."
          },
          "version_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Name",
            "description": "The name someone gave this version."
          },
          "restored_from_version_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Restored From Version Number",
            "description": "The version this one restored."
          },
          "author_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Ids",
            "description": "Everyone who edited the file in this version, for a file edited live in Compound. Null when the caller is not a member of the agent."
          }
        },
        "type": "object",
        "required": [
          "id",
          "path",
          "version_number",
          "version_id",
          "size_bytes",
          "created_at",
          "author_type",
          "agent_id",
          "internal_type",
          "author_user_id",
          "conversation_id",
          "message_id",
          "task_id",
          "source_url",
          "expansion_status",
          "to_revision",
          "change_kind",
          "version_name",
          "restored_from_version_number",
          "author_ids"
        ],
        "title": "AgentFile"
      },
      "AgentFileList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AgentFile"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AgentFileList"
      },
      "AgentList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Agent"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AgentList"
      },
      "AgentMember": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "owner",
                  "write",
                  "read"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Role",
            "description": "The member's access. The owner sees everyone's; anyone else sees only the owner's and their own, and null for the rest."
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "email",
          "name",
          "role"
        ],
        "title": "AgentMember"
      },
      "AgentMemberList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AgentMember"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AgentMemberList"
      },
      "AgentPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Agent"
            },
            "type": "array",
            "title": "Data"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Pass as `cursor` to read the next page; null on the last page."
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "AgentPage"
      },
      "AgentProperties": {
        "properties": {
          "properties": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Properties",
            "description": "Values by property id. A select property holds option ids, a person property a team member's `user_id`; see `GET /v1/team/agent-properties`."
          }
        },
        "type": "object",
        "required": [
          "properties"
        ],
        "title": "AgentProperties"
      },
      "AgentPropertyDefinition": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The key of this property in an agent's properties."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "type": {
            "$ref": "#/components/schemas/PropertyType"
          },
          "options": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentPropertyOption"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Options",
            "description": "The choices of a single_select or multi_select property."
          },
          "currency_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency Code",
            "description": "ISO 4217 code of a currency property."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "options",
          "currency_code"
        ],
        "title": "AgentPropertyDefinition"
      },
      "AgentPropertyDefinitionList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AgentPropertyDefinition"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AgentPropertyDefinitionList"
      },
      "AgentPropertyOption": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The value a select property stores."
          },
          "label": {
            "type": "string",
            "title": "Label"
          }
        },
        "type": "object",
        "required": [
          "id",
          "label"
        ],
        "title": "AgentPropertyOption"
      },
      "AgentShare": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "$ref": "#/components/schemas/SharePrincipalType",
            "description": "Who the share is for: `public` (anyone with the link), `user`, `team`, or a `group`. `group_manager` and `team_manager` are grants your organization manages."
          },
          "principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principal Id",
            "description": "The user, team or group id the share is for; null for a public link."
          },
          "role": {
            "type": "string",
            "enum": [
              "read",
              "write"
            ],
            "title": "Role",
            "description": "`write`: Editor; `read`: Viewer."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The person's, team's or group's name."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The person's email, for a user share."
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "principal_id",
          "role",
          "name",
          "email"
        ],
        "title": "AgentShare"
      },
      "AgentShareList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AgentShare"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AgentShareList"
      },
      "AgentUsage": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id",
            "description": "Null for spend that is on none of your agents."
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name",
            "description": "The name of the agent's owner."
          },
          "owner_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Email",
            "description": "The email of the agent's owner."
          },
          "credits_used": {
            "type": "integer",
            "title": "Credits Used"
          }
        },
        "type": "object",
        "required": [
          "agent_id",
          "agent_name",
          "owner_name",
          "owner_email",
          "credits_used"
        ],
        "title": "AgentUsage"
      },
      "AgentUsageList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AgentUsage"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AgentUsageList"
      },
      "AuthorType": {
        "type": "string",
        "enum": [
          "user",
          "agent"
        ],
        "title": "AuthorType"
      },
      "BillingPortalSession": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "A short-lived link to your billing portal: plan, invoices and payment method."
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "BillingPortalSession"
      },
      "CapabilitiesUpdate": {
        "properties": {
          "org_conventions": {
            "type": "boolean",
            "title": "Org Conventions"
          },
          "email": {
            "type": "boolean",
            "title": "Email"
          },
          "connectors": {
            "type": "boolean",
            "title": "Connectors"
          },
          "proposals": {
            "type": "boolean",
            "title": "Proposals"
          },
          "questions": {
            "type": "boolean",
            "title": "Questions"
          },
          "web": {
            "type": "boolean",
            "title": "Web"
          },
          "public_data": {
            "type": "boolean",
            "title": "Public Data"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "CapabilitiesUpdate"
      },
      "ChartCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "chart",
            "title": "Kind",
            "default": "chart"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "sheet_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sheet Name"
          },
          "chart_number": {
            "type": "integer",
            "title": "Chart Number"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "file_id",
          "filename",
          "sheet_name",
          "chart_number",
          "heading"
        ],
        "title": "ChartCitationView"
      },
      "Citation": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key",
            "description": "The citation's key. A message's text marks it as `[^N]`, N being its position in `sources`."
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id",
            "description": "The agent's file the citation points into, when it cites one."
          },
          "locator": {
            "additionalProperties": true,
            "type": "object",
            "title": "Locator",
            "description": "Where in the source the cited passage is."
          },
          "description": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Description"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind",
            "description": "What the source is, for example `pdf_page`, `sheet_range`, `web_page` or `sec_filing`. Null when Compound cannot read the saved source."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "A short readable name for the source."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "Opens the cited source in the Compound app."
          },
          "web_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Url",
            "description": "The source's own web address, for web pages, posts and other online sources."
          }
        },
        "type": "object",
        "required": [
          "key",
          "file_id",
          "locator",
          "description",
          "kind",
          "name",
          "url",
          "web_url"
        ],
        "title": "Citation"
      },
      "CitationDetail": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key",
            "description": "The citation's key. A message's text marks it as `[^N]`, N being its position in `sources`."
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id",
            "description": "The agent's file the citation points into, when it cites one."
          },
          "locator": {
            "additionalProperties": true,
            "type": "object",
            "title": "Locator",
            "description": "Where in the source the cited passage is."
          },
          "description": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Description"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind",
            "description": "What the source is, for example `pdf_page`, `sheet_range`, `web_page` or `sec_filing`. Null when Compound cannot read the saved source."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "A short readable name for the source."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "Opens the cited source in the Compound app."
          },
          "web_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Url",
            "description": "The source's own web address, for web pages, posts and other online sources."
          },
          "target": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DriveFileCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/SheetRangeCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/DocChunkCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/DeckSlideCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/ChartCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/PdfPageCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/TextLinesCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/WebPageCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/SecFilingCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/EarningsTranscriptCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/FinancialsLineCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/CompanyEventCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/DataValueCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/XPostCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/PredictionMarketCitationView"
                  },
                  {
                    "$ref": "#/components/schemas/ConnectorRecordCitationView"
                  }
                ],
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "chart": "#/components/schemas/ChartCitationView",
                    "company_event": "#/components/schemas/CompanyEventCitationView",
                    "connector_record": "#/components/schemas/ConnectorRecordCitationView",
                    "data_value": "#/components/schemas/DataValueCitationView",
                    "deck_slide": "#/components/schemas/DeckSlideCitationView",
                    "doc_chunk": "#/components/schemas/DocChunkCitationView",
                    "drive_file": "#/components/schemas/DriveFileCitationView",
                    "earnings_transcript": "#/components/schemas/EarningsTranscriptCitationView",
                    "financials_line": "#/components/schemas/FinancialsLineCitationView",
                    "pdf_page": "#/components/schemas/PdfPageCitationView",
                    "prediction_market": "#/components/schemas/PredictionMarketCitationView",
                    "sec_filing": "#/components/schemas/SecFilingCitationView",
                    "sheet_range": "#/components/schemas/SheetRangeCitationView",
                    "text_lines": "#/components/schemas/TextLinesCitationView",
                    "web_page": "#/components/schemas/WebPageCitationView",
                    "x_post": "#/components/schemas/XPostCitationView"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Target",
            "description": "What the source resolves to, with the details the data provider adds. Null when Compound cannot read the saved source."
          }
        },
        "type": "object",
        "required": [
          "key",
          "file_id",
          "locator",
          "description",
          "kind",
          "name",
          "url",
          "web_url",
          "target"
        ],
        "title": "CitationDetail"
      },
      "CitationViewName": {
        "properties": {
          "title": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/VerbatimPhrase"
              },
              {
                "$ref": "#/components/schemas/LabelledPhrase"
              }
            ],
            "title": "Title",
            "discriminator": {
              "propertyName": "kind",
              "mapping": {
                "labelled": "#/components/schemas/LabelledPhrase",
                "verbatim": "#/components/schemas/VerbatimPhrase"
              }
            }
          },
          "where": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/VerbatimPhrase"
                  },
                  {
                    "$ref": "#/components/schemas/LabelledPhrase"
                  }
                ],
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "labelled": "#/components/schemas/LabelledPhrase",
                    "verbatim": "#/components/schemas/VerbatimPhrase"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Where"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          }
        },
        "type": "object",
        "required": [
          "title",
          "where",
          "filename"
        ],
        "title": "CitationViewName"
      },
      "ClientSurface": {
        "type": "string",
        "enum": [
          "unknown",
          "web",
          "cli",
          "excel_addin"
        ],
        "title": "ClientSurface"
      },
      "Comment": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "file_version_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Version Number",
            "description": "The file version the comment was made on."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ],
            "title": "Status"
          },
          "anchor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SheetRangeAnchor"
              },
              {
                "$ref": "#/components/schemas/DocChunkAnchor"
              },
              {
                "$ref": "#/components/schemas/DeckShapeAnchor"
              },
              {
                "$ref": "#/components/schemas/PdfRegionAnchor"
              },
              {
                "$ref": "#/components/schemas/FileAnchor"
              }
            ],
            "title": "Anchor",
            "description": "Where in the file the comment points; `file` is the file as a whole.",
            "discriminator": {
              "propertyName": "kind",
              "mapping": {
                "deck_shape": "#/components/schemas/DeckShapeAnchor",
                "doc_chunk": "#/components/schemas/DocChunkAnchor",
                "file": "#/components/schemas/FileAnchor",
                "pdf_region": "#/components/schemas/PdfRegionAnchor",
                "sheet_range": "#/components/schemas/SheetRangeAnchor"
              }
            }
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/CommentEntry"
            },
            "type": "array",
            "title": "Entries",
            "description": "The comment first, then its replies, oldest first."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id",
            "description": "The agent that holds the file."
          },
          "snapshot": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot",
            "description": "The text the comment pointed at when it was made."
          },
          "resolved_by_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved By User Id",
            "description": "Who resolved the comment. Null when the caller is not a member of the agent."
          },
          "mentions": {
            "items": {
              "$ref": "#/components/schemas/CommentMention"
            },
            "type": "array",
            "title": "Mentions",
            "description": "The people the comment tags."
          },
          "revision": {
            "type": "integer",
            "title": "Revision",
            "description": "Counts the changes made to the comment."
          }
        },
        "type": "object",
        "required": [
          "id",
          "file_id",
          "file_version_number",
          "status",
          "anchor",
          "entries",
          "created_at",
          "updated_at",
          "resolved_at",
          "agent_id",
          "snapshot",
          "resolved_by_user_id",
          "mentions",
          "revision"
        ],
        "title": "Comment"
      },
      "CommentEntry": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "author_type": {
            "type": "string",
            "enum": [
              "user",
              "agent"
            ],
            "title": "Author Type"
          },
          "author_name": {
            "type": "string",
            "title": "Author Name",
            "description": "Empty for a person when the caller is not a member of the agent."
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "Markdown."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "reactions": {
            "items": {
              "$ref": "#/components/schemas/Reaction"
            },
            "type": "array",
            "title": "Reactions"
          },
          "author_id": {
            "type": "string",
            "title": "Author Id",
            "description": "The person's user id, or the agent's id. Empty for a person when the caller is not a member of the agent."
          },
          "mentions": {
            "items": {
              "$ref": "#/components/schemas/CommentMention"
            },
            "type": "array",
            "title": "Mentions",
            "description": "The people this entry tags."
          }
        },
        "type": "object",
        "required": [
          "id",
          "author_type",
          "author_name",
          "text",
          "created_at",
          "reactions",
          "author_id",
          "mentions"
        ],
        "title": "CommentEntry"
      },
      "CommentList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Comment"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "CommentList"
      },
      "CommentMention": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "name"
        ],
        "title": "CommentMention"
      },
      "CommentText": {
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "pattern": "\\S",
            "title": "Text",
            "description": "Markdown. The agent reads new comments and replies and picks up the work."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "text"
        ],
        "title": "CommentText"
      },
      "Company": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "type": {
            "type": "string",
            "title": "Type",
            "description": "The kind of entity, for example `company`."
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "country_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country Code"
          },
          "sector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sector"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "founded_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded On",
            "description": "ISO 8601 date."
          },
          "listings": {
            "items": {
              "$ref": "#/components/schemas/CompanyListing"
            },
            "type": "array",
            "title": "Listings"
          },
          "identifiers": {
            "items": {
              "$ref": "#/components/schemas/CompanyIdentifier"
            },
            "type": "array",
            "title": "Identifiers",
            "description": "Every identifier the company has. Licensed identifiers such as ISIN and CUSIP have a null `value`."
          },
          "subdivision_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subdivision Code",
            "description": "ISO 3166-2 subdivision."
          },
          "legal_form": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Form"
          },
          "company_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Kind"
          },
          "trading_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trading Currency",
            "description": "ISO 4217 code."
          },
          "dissolved_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dissolved On",
            "description": "ISO 8601 date."
          },
          "names": {
            "items": {
              "$ref": "#/components/schemas/CompanyName"
            },
            "type": "array",
            "title": "Names"
          },
          "addresses": {
            "items": {
              "$ref": "#/components/schemas/CompanyAddress"
            },
            "type": "array",
            "title": "Addresses"
          },
          "classifications": {
            "items": {
              "$ref": "#/components/schemas/CompanyClassification"
            },
            "type": "array",
            "title": "Classifications"
          },
          "relationships": {
            "items": {
              "$ref": "#/components/schemas/CompanyRelationship"
            },
            "type": "array",
            "title": "Relationships",
            "description": "At most 100 of each relationship type and direction, oldest first."
          },
          "securities": {
            "items": {
              "$ref": "#/components/schemas/CompanySecurity"
            },
            "type": "array",
            "title": "Securities",
            "description": "The company's securities, each with its own listings; `listings` holds the same listings in one list."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "is_public",
          "status",
          "country_code",
          "sector",
          "industry",
          "website",
          "description",
          "employee_count",
          "founded_on",
          "listings",
          "identifiers",
          "subdivision_code",
          "legal_form",
          "company_kind",
          "trading_currency",
          "dissolved_on",
          "names",
          "addresses",
          "classifications",
          "relationships",
          "securities"
        ],
        "title": "Company"
      },
      "CompanyAddress": {
        "properties": {
          "address_type": {
            "type": "string",
            "title": "Address Type",
            "description": "For example `registered` or `headquarters`."
          },
          "lines": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Lines"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Postal Code"
          },
          "country_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country Code"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "address_type",
          "lines",
          "city",
          "region",
          "postal_code",
          "country_code",
          "source"
        ],
        "title": "CompanyAddress"
      },
      "CompanyAlerts": {
        "properties": {
          "min_delivery_interval_seconds": {
            "type": "integer",
            "title": "Min Delivery Interval Seconds",
            "description": "The agent hears of events at most this often: 0 as they happen, 3600 hourly, 86400 daily, 604800 weekly."
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "False stops delivering events and keeps the companies watched."
          },
          "last_delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivered At"
          },
          "last_delivered_at_ns": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivered At Ns",
            "description": "`last_delivered_at` in nanoseconds since the Unix epoch, as stored."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "created_at_ns": {
            "type": "integer",
            "title": "Created At Ns",
            "description": "When the agent watched its first company, in nanoseconds since the Unix epoch."
          }
        },
        "type": "object",
        "required": [
          "min_delivery_interval_seconds",
          "is_active",
          "last_delivered_at",
          "last_delivered_at_ns",
          "agent_id",
          "created_at_ns"
        ],
        "title": "CompanyAlerts"
      },
      "CompanyClassification": {
        "properties": {
          "scheme": {
            "type": "string",
            "title": "Scheme",
            "description": "For example `gics` or `naics`."
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "is_primary": {
            "type": "boolean",
            "title": "Is Primary"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "scheme",
          "code",
          "label",
          "is_primary",
          "source"
        ],
        "title": "CompanyClassification"
      },
      "CompanyDataSources": {
        "properties": {
          "factset": {
            "type": "boolean",
            "title": "Factset",
            "description": "The agent's owner subscribes to FactSet data, so FactSet news, estimates and financials can be read."
          },
          "factset_connected": {
            "type": "boolean",
            "title": "Factset Connected",
            "description": "The caller has connected their FactSet account in the Compound app, which FactSet reads also need."
          }
        },
        "type": "object",
        "required": [
          "factset",
          "factset_connected"
        ],
        "title": "CompanyDataSources"
      },
      "CompanyEstimate": {
        "properties": {
          "metric": {
            "type": "string",
            "title": "Metric"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "periods": {
            "items": {
              "$ref": "#/components/schemas/CompanyEstimatePeriod"
            },
            "type": "array",
            "title": "Periods",
            "description": "Oldest first by fiscal end date."
          },
          "periodicity": {
            "type": "string",
            "title": "Periodicity"
          },
          "estimate_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimate Currency"
          }
        },
        "type": "object",
        "required": [
          "metric",
          "currency",
          "periods",
          "periodicity",
          "estimate_currency"
        ],
        "title": "CompanyEstimate"
      },
      "CompanyEstimatePeriod": {
        "properties": {
          "fiscal_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Year"
          },
          "fiscal_period": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Period"
          },
          "fiscal_end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal End Date",
            "description": "ISO 8601 date."
          },
          "relative_period": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Relative Period",
            "description": "Periods after the latest reported one: 1 is the next period."
          },
          "estimate_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimate Date",
            "description": "ISO 8601 date of the consensus."
          },
          "mean": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean"
          },
          "median": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Median"
          },
          "high": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "High"
          },
          "low": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Low"
          },
          "standard_deviation": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Standard Deviation"
          },
          "estimate_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimate Count"
          },
          "up": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Up",
            "description": "Estimates revised up."
          },
          "down": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Down",
            "description": "Estimates revised down."
          }
        },
        "type": "object",
        "required": [
          "fiscal_year",
          "fiscal_period",
          "fiscal_end_date",
          "relative_period",
          "estimate_date",
          "mean",
          "median",
          "high",
          "low",
          "standard_deviation",
          "estimate_count",
          "up",
          "down"
        ],
        "title": "CompanyEstimatePeriod"
      },
      "CompanyEstimateSurprise": {
        "properties": {
          "fiscal_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Year"
          },
          "fiscal_period": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Period"
          },
          "fiscal_end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal End Date",
            "description": "ISO 8601 date."
          },
          "surprise_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surprise Date",
            "description": "ISO 8601 date."
          },
          "surprise_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surprise Amount"
          },
          "surprise_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surprise Percent"
          },
          "surprise_before": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surprise Before",
            "description": "The consensus estimate."
          },
          "surprise_after": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surprise After",
            "description": "The reported actual."
          },
          "event_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Description"
          }
        },
        "type": "object",
        "required": [
          "fiscal_year",
          "fiscal_period",
          "fiscal_end_date",
          "surprise_date",
          "surprise_amount",
          "surprise_percent",
          "surprise_before",
          "surprise_after",
          "event_description"
        ],
        "title": "CompanyEstimateSurprise"
      },
      "CompanyEstimateSurprises": {
        "properties": {
          "metric": {
            "type": "string",
            "title": "Metric"
          },
          "statistic": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Statistic"
          },
          "periodicity": {
            "type": "string",
            "title": "Periodicity"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/CompanyEstimateSurprise"
            },
            "type": "array",
            "title": "Events",
            "description": "Oldest first by fiscal end date."
          }
        },
        "type": "object",
        "required": [
          "metric",
          "statistic",
          "periodicity",
          "events"
        ],
        "title": "CompanyEstimateSurprises"
      },
      "CompanyEstimates": {
        "properties": {
          "periodicity": {
            "type": "string",
            "title": "Periodicity"
          },
          "consensus": {
            "items": {
              "$ref": "#/components/schemas/CompanyEstimate"
            },
            "type": "array",
            "title": "Consensus"
          },
          "provider": {
            "type": "string",
            "const": "factset",
            "title": "Provider"
          },
          "surprise": {
            "items": {
              "$ref": "#/components/schemas/CompanyEstimateSurprises"
            },
            "type": "array",
            "title": "Surprise",
            "description": "Reported actuals against the consensus, per metric."
          }
        },
        "type": "object",
        "required": [
          "periodicity",
          "consensus",
          "provider",
          "surprise"
        ],
        "title": "CompanyEstimates"
      },
      "CompanyEvent": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "date": {
            "type": "string",
            "title": "Date",
            "description": "ISO 8601 date."
          },
          "kind": {
            "type": "string",
            "enum": [
              "earnings",
              "other",
              "filing_published",
              "news",
              "prediction_market",
              "government_record"
            ],
            "title": "Kind"
          },
          "fiscal_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Year"
          },
          "fiscal_period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Period"
          },
          "form_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form Type",
            "description": "The filing's form, for filings."
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url",
            "description": "The linked article or post, for news."
          },
          "event_type_id": {
            "type": "integer",
            "title": "Event Type Id"
          },
          "transcript": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyEventDocument"
              },
              {
                "type": "null"
              }
            ]
          },
          "slides": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyEventDocument"
              },
              {
                "type": "null"
              }
            ]
          },
          "report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyEventDocument"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first report; `reports` has them all."
          },
          "reports": {
            "items": {
              "$ref": "#/components/schemas/CompanyEventDocument"
            },
            "type": "array",
            "title": "Reports"
          },
          "external_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Ref",
            "description": "The source's id for the event, for example an EDGAR accession number."
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "occurred_at_ns": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Occurred At Ns",
            "description": "When it happened, in nanoseconds since the Unix epoch."
          },
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author",
            "description": "The posting account, for news."
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "date",
          "kind",
          "fiscal_year",
          "fiscal_period",
          "form_type",
          "url",
          "event_type_id",
          "transcript",
          "slides",
          "report",
          "reports",
          "external_ref",
          "source",
          "occurred_at_ns",
          "author"
        ],
        "title": "CompanyEvent"
      },
      "CompanyEventCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "company_event",
            "title": "Kind",
            "default": "company_event"
          },
          "company_name": {
            "type": "string",
            "title": "Company Name"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "date": {
            "type": "string",
            "title": "Date"
          },
          "event_kind": {
            "type": "string",
            "title": "Event Kind"
          },
          "period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "company_name",
          "title",
          "date",
          "event_kind",
          "period",
          "source",
          "heading"
        ],
        "title": "CompanyEventCitationView"
      },
      "CompanyEventDocument": {
        "properties": {
          "doc_id": {
            "type": "integer",
            "title": "Doc Id"
          },
          "type_id": {
            "type": "integer",
            "title": "Type Id"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "For example `Slides` or `Annual report 10-K`; null when unknown."
          },
          "document_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QuartrDocumentType"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "doc_id",
          "type_id",
          "label",
          "document_type"
        ],
        "title": "CompanyEventDocument"
      },
      "CompanyEvents": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CompanyEvent"
            },
            "type": "array",
            "title": "Data",
            "description": "Newest first."
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Pass as `cursor` to read the next page; null on the last page."
          },
          "quartr_company_id": {
            "type": "integer",
            "title": "Quartr Company Id",
            "description": "The company's id at Quartr, the source of earnings documents."
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticker"
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_cursor",
          "quartr_company_id",
          "ticker"
        ],
        "title": "CompanyEvents"
      },
      "CompanyFinancialPeriod": {
        "properties": {
          "period_id": {
            "type": "string",
            "title": "Period Id"
          },
          "period_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Type"
          },
          "fiscal_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Year"
          },
          "fiscal_quarter": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Quarter"
          },
          "calendar_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Calendar Year"
          },
          "calendar_quarter": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Calendar Quarter"
          },
          "report_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Date",
            "description": "ISO 8601 date."
          }
        },
        "type": "object",
        "required": [
          "period_id",
          "period_type",
          "fiscal_year",
          "fiscal_quarter",
          "calendar_year",
          "calendar_quarter",
          "report_date"
        ],
        "title": "CompanyFinancialPeriod"
      },
      "CompanyFinancialRow": {
        "properties": {
          "metric_id": {
            "type": "string",
            "title": "Metric Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format",
            "description": "`number`, `%` or `ratio`."
          },
          "is_total": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Total"
          },
          "is_currency": {
            "type": "boolean",
            "title": "Is Currency"
          },
          "values": {
            "items": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "array",
            "title": "Values",
            "description": "One value per entry of `periods`, in the same order; null where the period does not report it."
          }
        },
        "type": "object",
        "required": [
          "metric_id",
          "label",
          "format",
          "is_total",
          "is_currency",
          "values"
        ],
        "title": "CompanyFinancialRow"
      },
      "CompanyFinancials": {
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "fiscal",
              "factset"
            ],
            "title": "Provider",
            "description": "`fiscal` states amounts in full units, `factset` in millions."
          },
          "statement": {
            "type": "string",
            "title": "Statement"
          },
          "reporting_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reporting Template",
            "description": "The provider's statement template, for example for a bank or an insurer."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency",
            "description": "ISO 4217 code."
          },
          "periods": {
            "items": {
              "$ref": "#/components/schemas/CompanyFinancialPeriod"
            },
            "type": "array",
            "title": "Periods"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/CompanyFinancialRow"
            },
            "type": "array",
            "title": "Rows"
          }
        },
        "type": "object",
        "required": [
          "provider",
          "statement",
          "reporting_template",
          "currency",
          "periods",
          "rows"
        ],
        "title": "CompanyFinancials"
      },
      "CompanyIdentifier": {
        "properties": {
          "scheme": {
            "type": "string",
            "title": "Scheme",
            "description": "For example `lei` or `cik`."
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value",
            "description": "Null for a licensed identifier such as ISIN or CUSIP, which Compound may not share."
          },
          "country_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country Code"
          },
          "source": {
            "type": "string",
            "title": "Source"
          },
          "redistributable": {
            "type": "boolean",
            "title": "Redistributable",
            "description": "False for a licensed identifier, whose `value` is null."
          }
        },
        "type": "object",
        "required": [
          "scheme",
          "value",
          "country_code",
          "source",
          "redistributable"
        ],
        "title": "CompanyIdentifier"
      },
      "CompanyListing": {
        "properties": {
          "ticker": {
            "type": "string",
            "title": "Ticker"
          },
          "exchange_mic": {
            "type": "string",
            "title": "Exchange Mic"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "is_primary": {
            "type": "boolean",
            "title": "Is Primary"
          },
          "listed_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Listed On",
            "description": "ISO 8601 date."
          },
          "delisted_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delisted On",
            "description": "ISO 8601 date; null while listed."
          }
        },
        "type": "object",
        "required": [
          "ticker",
          "exchange_mic",
          "currency",
          "is_primary",
          "listed_on",
          "delisted_on"
        ],
        "title": "CompanyListing"
      },
      "CompanyName": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "name_type": {
            "type": "string",
            "title": "Name Type",
            "description": "For example `legal` or `trade`."
          },
          "lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lang"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "name",
          "name_type",
          "lang",
          "source"
        ],
        "title": "CompanyName"
      },
      "CompanyNews": {
        "properties": {
          "ticker": {
            "type": "string",
            "title": "Ticker"
          },
          "headlines": {
            "items": {
              "$ref": "#/components/schemas/CompanyNewsHeadline"
            },
            "type": "array",
            "title": "Headlines",
            "description": "Newest first."
          },
          "pending_providers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Pending Providers",
            "description": "Feeds still fetching. When it is not empty the list is partial; read again shortly."
          }
        },
        "type": "object",
        "required": [
          "ticker",
          "headlines",
          "pending_providers"
        ],
        "title": "CompanyNews"
      },
      "CompanyNewsHeadline": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "headline": {
            "type": "string",
            "title": "Headline"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "title": "Published At"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source",
            "description": "The publication."
          },
          "provider": {
            "type": "string",
            "title": "Provider",
            "description": "The news feed it came from."
          },
          "subjects": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Subjects",
            "description": "The feed's subject codes for the story."
          },
          "article_id": {
            "type": "string",
            "title": "Article Id",
            "description": "The feed's own id for the article."
          }
        },
        "type": "object",
        "required": [
          "id",
          "headline",
          "published_at",
          "url",
          "summary",
          "source",
          "provider",
          "subjects",
          "article_id"
        ],
        "title": "CompanyNewsHeadline"
      },
      "CompanyRelationship": {
        "properties": {
          "rel_type": {
            "type": "string",
            "title": "Rel Type",
            "description": "For example `parent` or `subsidiary`."
          },
          "is_outbound": {
            "type": "boolean",
            "title": "Is Outbound",
            "description": "True when this company is the relationship's `from` side."
          },
          "other_company_id": {
            "type": "string",
            "title": "Other Company Id"
          },
          "other_company_name": {
            "type": "string",
            "title": "Other Company Name"
          },
          "ownership_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ownership Pct"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "rel_type",
          "is_outbound",
          "other_company_id",
          "other_company_name",
          "ownership_pct",
          "title",
          "source"
        ],
        "title": "CompanyRelationship"
      },
      "CompanySearchResult": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "country_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country Code"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticker",
            "description": "The primary active listing as `TICKER@MIC`, for example `AAPL@XNAS`."
          },
          "matched_by": {
            "type": "string",
            "title": "Matched By",
            "description": "What the query matched: `ticker`, `identifier` or `name`."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "is_public",
          "country_code",
          "ticker",
          "matched_by"
        ],
        "title": "CompanySearchResult"
      },
      "CompanySearchResults": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CompanySearchResult"
            },
            "type": "array",
            "title": "Data",
            "description": "Public companies first."
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "CompanySearchResults"
      },
      "CompanySecurity": {
        "properties": {
          "security_type": {
            "type": "string",
            "title": "Security Type",
            "description": "For example `common`."
          },
          "share_class_figi": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Share Class Figi"
          },
          "listings": {
            "items": {
              "$ref": "#/components/schemas/CompanyListing"
            },
            "type": "array",
            "title": "Listings"
          }
        },
        "type": "object",
        "required": [
          "security_type",
          "share_class_figi",
          "listings"
        ],
        "title": "CompanySecurity"
      },
      "ConnectUrl": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "Open it in a browser to sign in to the app and finish connecting it."
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "ConnectUrl"
      },
      "Connection": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The app's id, such as `google_drive`."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "connected": {
            "type": "boolean",
            "title": "Connected"
          },
          "disconnect_only": {
            "type": "boolean",
            "title": "Disconnect Only",
            "description": "True for a connected app you can no longer connect: you can only disconnect it."
          },
          "needs_reconnect": {
            "type": "boolean",
            "title": "Needs Reconnect",
            "description": "True when you connected the app but the connection no longer works: connect it again, or disconnect it."
          },
          "team_agent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamAgentUse"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a team admin, whose connection your team's agents use; null otherwise."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "connected",
          "disconnect_only",
          "needs_reconnect",
          "team_agent"
        ],
        "title": "Connection"
      },
      "ConnectionList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Connection"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ConnectionList"
      },
      "ConnectorRecordCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "connector_record",
            "title": "Kind",
            "default": "connector_record"
          },
          "provider_id": {
            "type": "string",
            "title": "Provider Id"
          },
          "source_label": {
            "type": "string",
            "title": "Source Label"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "As Of"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "provider_id",
          "source_label",
          "url",
          "as_of",
          "heading"
        ],
        "title": "ConnectorRecordCitationView"
      },
      "CopyFilesRequest": {
        "properties": {
          "to_agent_id": {
            "type": "string",
            "title": "To Agent Id",
            "description": "The agent to copy into, or `default` for the caller's own agent."
          },
          "file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "File Ids"
          },
          "folders": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Folders",
            "description": "Folder paths to copy with everything inside them."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "to_agent_id"
        ],
        "title": "CopyFilesRequest"
      },
      "CreateAgentRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "At most 100 characters."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "At most 1000 characters."
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9._:@|/-]{1,256}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "Your own identifier for the agent. Creating a second live agent with the same external_id returns 409."
          },
          "time_zone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Zone",
            "description": "IANA time zone. Defaults to the time zone in the account's settings, or UTC when it has none."
          },
          "email_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Name",
            "description": "The start of the agent's email address: 1 to 40 lowercase letters, digits or hyphens, starting and ending with a letter or digit. The server appends a short suffix, so `alice` becomes an address like `alice-3f9a2c@\u2026`. An invalid or reserved name returns 400, and a name with no free address returns 409. Without it, the agent gets an `agent-\u2026` address."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CreateAgentRequest"
      },
      "CreateAgentShareRequest": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "public",
              "team",
              "user",
              "group"
            ],
            "title": "Type",
            "description": "Who to share with."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The person's email; required for `user`."
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id",
            "description": "Your team's id, from `GET /v1/team`; required for `team`."
          },
          "group_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id",
            "description": "A group you belong to; required for `group`."
          },
          "role": {
            "type": "string",
            "enum": [
              "read",
              "write"
            ],
            "title": "Role",
            "description": "`write` makes them an Editor, `read` a Viewer. A public link is always `read`.",
            "default": "read"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CreateAgentShareRequest"
      },
      "CreateFileLinkRequest": {
        "properties": {
          "version_number": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Number",
            "description": "Pin the link to this version. Leave it out for a link that follows the latest version."
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/RecipientRequest"
            },
            "type": "array",
            "minItems": 1,
            "title": "Recipients"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "recipients"
        ],
        "title": "CreateFileLinkRequest"
      },
      "CreateFileRequest": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id",
            "description": "The `file_id` the upload returned."
          },
          "version_id": {
            "type": "string",
            "title": "Version Id",
            "description": "The `version_id` the upload returned."
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "title": "Path",
            "description": "The file's path from the top of the agent's files, with `/` between folders, for example `deals/acme/model.xlsx`."
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Size Bytes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "file_id",
          "version_id",
          "path",
          "size_bytes"
        ],
        "title": "CreateFileRequest"
      },
      "CreateProjectRequest": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Unique among the agent's projects, and without a `/`. It also names the project's folder."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CreateProjectRequest"
      },
      "CreateScheduleRequest": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name"
          },
          "instruction": {
            "type": "string",
            "minLength": 1,
            "title": "Instruction",
            "description": "What the agent does at each run, in Markdown."
          },
          "cron": {
            "type": "string",
            "title": "Cron",
            "description": "A five-field cron expression, read in `time_zone`. A schedule runs at most once an hour."
          },
          "time_zone": {
            "type": "string",
            "title": "Time Zone",
            "description": "IANA time zone the cron is read in."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "instruction",
          "cron",
          "time_zone"
        ],
        "title": "CreateScheduleRequest"
      },
      "CreateSupportRequest": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "general",
              "bug-report",
              "feature-request"
            ],
            "title": "Type",
            "description": "`general` for a question, `bug-report` for a problem with Compound itself, `feature-request` for an idea.",
            "default": "general"
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "title": "Subject"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "title": "Message"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "subject",
          "message"
        ],
        "title": "CreateSupportRequest"
      },
      "CreateTaskShareRequest": {
        "properties": {
          "targets": {
            "items": {
              "$ref": "#/components/schemas/TaskShareTarget"
            },
            "type": "array",
            "maxItems": 50,
            "minItems": 1,
            "title": "Targets"
          },
          "live": {
            "type": "boolean",
            "title": "Live",
            "description": "Share the task as it is now and as it changes. A public link must be a snapshot.",
            "default": false
          },
          "include_cited_file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 2000,
            "title": "Include Cited File Ids",
            "description": "Files the task cites (from `cited-files`) to share with it."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "targets"
        ],
        "title": "CreateTaskShareRequest"
      },
      "CreateUploadRequest": {
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "title": "Path",
            "description": "The file's path from the top of the agent's files, with `/` between folders, for example `deals/acme/model.xlsx`."
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Size Bytes"
          },
          "checksum": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}$",
            "title": "Checksum",
            "description": "The file's CRC32C checksum as 8 lowercase hex digits. The storage service checks the uploaded bytes against it."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "path",
          "size_bytes",
          "checksum"
        ],
        "title": "CreateUploadRequest"
      },
      "Credits": {
        "properties": {
          "plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan",
            "description": "Your plan: `free`, `pro`, `team_plus`, `custom` and so on."
          },
          "credits_quota": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credits Quota",
            "description": "Credits your plan gives you this period. 0 means no allotment of your own, for example when you draw only from a team's shared pool."
          },
          "credits_used": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credits Used",
            "description": "Credits used this period."
          },
          "credits_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credits Remaining",
            "description": "Credits you can still spend, prepaid credits included and a team's shared pool excluded."
          },
          "prepaid_credits_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prepaid Credits Remaining",
            "description": "Credits you bought that are not used yet."
          },
          "period_ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Ends At",
            "description": "When the period ends and the plan's credits reset."
          },
          "billing_interval": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "month",
                  "year"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Interval"
          },
          "can_buy_credits": {
            "type": "boolean",
            "title": "Can Buy Credits",
            "description": "Whether you can buy more credits in the Compound app now."
          },
          "plan_allows_buying_credits": {
            "type": "boolean",
            "title": "Plan Allows Buying Credits",
            "description": "Your plan allows buying credits; `can_buy_credits` also needs the subscription to be paid up."
          },
          "on_shared_pool": {
            "type": "boolean",
            "title": "On Shared Pool",
            "description": "You also draw from a team's shared pool."
          },
          "out_of_credits": {
            "type": "boolean",
            "title": "Out Of Credits",
            "description": "True when nothing is left to spend: your agents are paused until credits are added or reset."
          }
        },
        "type": "object",
        "required": [
          "plan",
          "credits_quota",
          "credits_used",
          "credits_remaining",
          "prepaid_credits_remaining",
          "period_ends_at",
          "billing_interval",
          "can_buy_credits",
          "plan_allows_buying_credits",
          "on_shared_pool",
          "out_of_credits"
        ],
        "title": "Credits"
      },
      "DataValueCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "data_value",
            "title": "Kind",
            "default": "data_value"
          },
          "dataset": {
            "type": "string",
            "title": "Dataset"
          },
          "key": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Key"
          },
          "field": {
            "type": "string",
            "title": "Field"
          },
          "value": {
            "type": "string",
            "title": "Value"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "subject_names_row": {
            "type": "boolean",
            "title": "Subject Names Row",
            "default": false
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticker"
          },
          "source_filing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Filing Id"
          },
          "source_page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Page"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "dataset",
          "key",
          "field",
          "value",
          "provider",
          "subject",
          "url",
          "ticker",
          "source_filing_id",
          "source_page",
          "heading"
        ],
        "title": "DataValueCitationView"
      },
      "DeckShapeAnchor": {
        "properties": {
          "kind": {
            "type": "string",
            "const": "deck_shape",
            "title": "Kind",
            "default": "deck_shape"
          },
          "slide_number": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Slide Number"
          },
          "shape_id": {
            "type": "string",
            "title": "Shape Id",
            "default": ""
          },
          "detail": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "slide_number"
        ],
        "title": "DeckShapeAnchor"
      },
      "DeckSlideCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "deck_slide",
            "title": "Kind",
            "default": "deck_slide"
          },
          "passages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Passages"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "slide": {
            "type": "integer",
            "title": "Slide"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "passages",
          "file_id",
          "filename",
          "slide",
          "heading"
        ],
        "title": "DeckSlideCitationView"
      },
      "DeletedAgent": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "title": "Deleted At"
          },
          "deletion_actor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deletion Actor Id",
            "description": "The user id of whoever deleted the agent."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "description": "When the agent and its files are deleted for good. Restore it before then."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "deleted_at",
          "deletion_actor_id",
          "expires_at"
        ],
        "title": "DeletedAgent"
      },
      "DeletedAgentList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DeletedAgent"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "DeletedAgentList"
      },
      "DocChunkAnchor": {
        "properties": {
          "kind": {
            "type": "string",
            "const": "doc_chunk",
            "title": "Kind",
            "default": "doc_chunk"
          },
          "chunk_id": {
            "type": "string",
            "title": "Chunk Id"
          },
          "quote": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "chunk_id"
        ],
        "title": "DocChunkAnchor"
      },
      "DocChunkCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "doc_chunk",
            "title": "Kind",
            "default": "doc_chunk"
          },
          "passages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Passages"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "chunk_id": {
            "type": "string",
            "title": "Chunk Id"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "passages",
          "file_id",
          "filename",
          "chunk_id",
          "heading"
        ],
        "title": "DocChunkCitationView"
      },
      "DownloadLink": {
        "properties": {
          "download_url": {
            "type": "string",
            "title": "Download Url",
            "description": "A short-lived URL that serves the file's bytes with an HTTP GET."
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "The file's name, without its folders."
          },
          "has_citation_links": {
            "type": "boolean",
            "title": "Has Citation Links",
            "description": "True when the download carries citation links."
          }
        },
        "type": "object",
        "required": [
          "download_url",
          "filename",
          "has_citation_links"
        ],
        "title": "DownloadLink"
      },
      "DownloadRequest": {
        "properties": {
          "version_number": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Number",
            "description": "Download this version instead of the latest."
          },
          "citation_links": {
            "type": "boolean",
            "title": "Citation Links",
            "description": "For a Word, PowerPoint or Excel file, download a copy with each citation linked to its source in Compound (an Excel file gets a note on each cited cell). Other files download as stored.",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DownloadRequest"
      },
      "DriveFileCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "drive_file",
            "title": "Kind",
            "default": "drive_file"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "file_id",
          "filename",
          "heading"
        ],
        "title": "DriveFileCitationView"
      },
      "EarningsTranscriptCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "earnings_transcript",
            "title": "Kind",
            "default": "earnings_transcript"
          },
          "passages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Passages"
          },
          "company": {
            "type": "string",
            "title": "Company"
          },
          "ticker": {
            "type": "string",
            "title": "Ticker"
          },
          "period": {
            "type": "string",
            "title": "Period"
          },
          "date": {
            "type": "string",
            "title": "Date"
          },
          "doc_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doc Ref"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "passages",
          "company",
          "ticker",
          "period",
          "date",
          "doc_ref",
          "heading"
        ],
        "title": "EarningsTranscriptCitationView"
      },
      "EditAccessRequest": {
        "properties": {
          "notified": {
            "type": "boolean",
            "title": "Notified",
            "description": "False when the owner already has an open request from you."
          }
        },
        "type": "object",
        "required": [
          "notified"
        ],
        "title": "EditAccessRequest"
      },
      "Email": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "address": {
            "type": "string",
            "title": "Address",
            "description": "The agent's email address."
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/EmailMessage"
            },
            "type": "array",
            "title": "Messages",
            "description": "Oldest first."
          }
        },
        "type": "object",
        "required": [
          "id",
          "subject",
          "address",
          "messages"
        ],
        "title": "Email"
      },
      "EmailAllowlist": {
        "properties": {
          "addresses": {
            "items": {
              "$ref": "#/components/schemas/EmailAllowlistEntry"
            },
            "type": "array",
            "title": "Addresses"
          },
          "domains": {
            "items": {
              "$ref": "#/components/schemas/EmailAllowlistEntry"
            },
            "type": "array",
            "title": "Domains"
          }
        },
        "type": "object",
        "required": [
          "addresses",
          "domains"
        ],
        "title": "EmailAllowlist"
      },
      "EmailAllowlistEntry": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value",
            "description": "An email address, or a domain such as `bank.com`."
          },
          "direction": {
            "type": "string",
            "enum": [
              "both",
              "inbound",
              "outbound"
            ],
            "title": "Direction",
            "description": "`outbound`: the agent may write to it; `inbound`: the agent accepts mail from it; `both`.",
            "default": "both"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "value"
        ],
        "title": "EmailAllowlistEntry"
      },
      "EmailMessage": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound",
              "unknown"
            ],
            "title": "Direction",
            "description": "`inbound` for mail the agent received, `outbound` for mail it sent."
          },
          "from_address": {
            "type": "string",
            "title": "From Address"
          },
          "to": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "To"
          },
          "cc": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Cc"
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "text_body": {
            "type": "string",
            "title": "Text Body"
          },
          "html_body": {
            "type": "string",
            "title": "Html Body"
          },
          "attachment_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Attachment Names"
          }
        },
        "type": "object",
        "required": [
          "id",
          "direction",
          "from_address",
          "to",
          "cc",
          "sent_at",
          "text_body",
          "html_body",
          "attachment_names"
        ],
        "title": "EmailMessage"
      },
      "EmailPage": {
        "properties": {
          "address": {
            "type": "string",
            "title": "Address",
            "description": "The agent's email address."
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/EmailSummary"
            },
            "type": "array",
            "title": "Data",
            "description": "Newest first."
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Pass as `cursor` to read the next page; null on the last page."
          }
        },
        "type": "object",
        "required": [
          "address",
          "data",
          "next_cursor"
        ],
        "title": "EmailPage"
      },
      "EmailSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The email's id: one conversation of messages."
          },
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "participants": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Participants",
            "description": "The other addresses in it."
          },
          "last_message_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Message At"
          },
          "unread": {
            "type": "boolean",
            "title": "Unread"
          }
        },
        "type": "object",
        "required": [
          "id",
          "subject",
          "participants",
          "last_message_at",
          "unread"
        ],
        "title": "EmailSummary"
      },
      "ErrorResponse": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              }
            ],
            "title": "Detail",
            "description": "A human-readable explanation of the error, or an object with a machine-readable reason, for example `{\"code\": \"...\", \"message\": \"...\"}`."
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ErrorResponse"
      },
      "ExpansionStatus": {
        "type": "string",
        "enum": [
          "pending",
          "complete",
          "failed"
        ],
        "title": "ExpansionStatus"
      },
      "ExportLink": {
        "properties": {
          "download_url": {
            "type": "string",
            "title": "Download Url",
            "description": "A short-lived URL that serves the exported bytes with an HTTP GET."
          },
          "is_lossy": {
            "type": "boolean",
            "title": "Is Lossy",
            "description": "True when the exported workbook may lose content the original holds."
          }
        },
        "type": "object",
        "required": [
          "download_url",
          "is_lossy"
        ],
        "title": "ExportLink"
      },
      "ExportRequest": {
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "pdf",
              "xlsx"
            ],
            "title": "Format",
            "description": "`pdf` for a Word, Excel or PowerPoint file; `xlsx` for an `.xlsb` or `.xls` workbook."
          },
          "version_number": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Number",
            "description": "Export this version instead of the latest."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "format"
        ],
        "title": "ExportRequest"
      },
      "FileAnchor": {
        "properties": {
          "kind": {
            "type": "string",
            "const": "file",
            "title": "Kind",
            "default": "file"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "FileAnchor"
      },
      "FileIdsRequest": {
        "properties": {
          "file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "File Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "file_ids"
        ],
        "title": "FileIdsRequest"
      },
      "FileLink": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "version_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Number",
            "description": "The version the link shows. Null when the link follows the file's latest version."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The link to send. It opens the file read-only."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/LinkRecipient"
            },
            "type": "array",
            "title": "Recipients"
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id",
            "description": "The agent that holds the file."
          },
          "owner_user_id": {
            "type": "string",
            "title": "Owner User Id",
            "description": "The person who made the link."
          },
          "include_citations": {
            "type": "boolean",
            "title": "Include Citations",
            "description": "True when recipients can also open the files the linked file cites."
          },
          "app_path": {
            "type": "string",
            "title": "App Path",
            "description": "The path of `url` within the Compound app."
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path",
            "description": "The file's path at the linked version. Returned when the link is created; null in lists."
          }
        },
        "type": "object",
        "required": [
          "id",
          "file_id",
          "version_number",
          "url",
          "created_at",
          "recipients",
          "agent_id",
          "owner_user_id",
          "include_citations",
          "app_path",
          "path"
        ],
        "title": "FileLink"
      },
      "FileLinkList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/FileLink"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "FileLinkList"
      },
      "FileSearchHit": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "path": {
            "type": "string",
            "title": "Path",
            "description": "The file's path from the top of the agent's files, with `/` between folders, for example `deals/acme/model.xlsx`."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name"
          },
          "is_default_agent": {
            "type": "boolean",
            "title": "Is Default Agent",
            "description": "True when the file is in the caller's default agent."
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "The conversation the agent saved the file's latest version from."
          }
        },
        "type": "object",
        "required": [
          "id",
          "path",
          "agent_id",
          "agent_name",
          "is_default_agent",
          "size_bytes",
          "created_at",
          "conversation_id"
        ],
        "title": "FileSearchHit"
      },
      "FileSearchHitList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/FileSearchHit"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "FileSearchHitList"
      },
      "FileSystemVersion": {
        "type": "string",
        "enum": [
          "v1",
          "v2"
        ],
        "title": "FileSystemVersion"
      },
      "FileUpload": {
        "properties": {
          "upload_url": {
            "type": "string",
            "title": "Upload Url",
            "description": "Send the file's bytes here with an HTTP PUT. When the URL signs `x-goog-hash`, send `x-goog-hash: crc32c=<base64 of the checksum's 4 bytes>`; when it is an S3 URL that signs `x-amz-checksum-crc32c`, send that header with the same base64 value."
          },
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "version_id": {
            "type": "string",
            "title": "Version Id",
            "description": "The id the uploaded content will have. Pass it to create the file."
          }
        },
        "type": "object",
        "required": [
          "upload_url",
          "file_id",
          "version_id"
        ],
        "title": "FileUpload"
      },
      "FinancialsLineCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "financials_line",
            "title": "Kind",
            "default": "financials_line"
          },
          "company_name": {
            "type": "string",
            "title": "Company Name"
          },
          "statement": {
            "type": "string",
            "title": "Statement"
          },
          "metric": {
            "type": "string",
            "title": "Metric"
          },
          "period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticker"
          },
          "filing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filing Id"
          },
          "page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "company_name",
          "statement",
          "metric",
          "period",
          "ticker",
          "filing_id",
          "page",
          "heading"
        ],
        "title": "FinancialsLineCitationView"
      },
      "FolderRename": {
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "title": "Path",
            "description": "The folder to rename, for example `deals/acme`."
          },
          "new_path": {
            "type": "string",
            "minLength": 1,
            "title": "New Path",
            "description": "The folder's new path."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "path",
          "new_path"
        ],
        "title": "FolderRename"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InternalFileType": {
        "type": "string",
        "enum": [
          "sfdt"
        ],
        "title": "InternalFileType"
      },
      "JsonValue": {},
      "LabelledPhrase": {
        "properties": {
          "kind": {
            "type": "string",
            "const": "labelled",
            "title": "Kind",
            "default": "labelled"
          },
          "label": {
            "type": "string",
            "enum": [
              "page",
              "slide",
              "chart",
              "lines",
              "polymarket",
              "fiscal_ai",
              "provided_by"
            ],
            "title": "Label"
          },
          "values": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Values"
          }
        },
        "type": "object",
        "required": [
          "label",
          "values"
        ],
        "title": "LabelledPhrase"
      },
      "LinkRecipient": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Pass to remove this recipient from the link."
          },
          "type": {
            "type": "string",
            "enum": [
              "public",
              "user",
              "team",
              "group"
            ],
            "title": "Type",
            "description": "`public` is anyone with the link; `user` is one person; `team` and `group` are granted in the Compound app."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principal Id",
            "description": "The user, team or group the link is for. Null for `public`."
          },
          "role": {
            "$ref": "#/components/schemas/ShareRole"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "email",
          "name",
          "principal_id",
          "role"
        ],
        "title": "LinkRecipient"
      },
      "ListedAgentFile": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "path": {
            "type": "string",
            "title": "Path",
            "description": "The file's path from the top of the agent's files, with `/` between folders, for example `deals/acme/model.xlsx`."
          },
          "version_number": {
            "type": "integer",
            "title": "Version Number",
            "description": "The version this row describes, counted from 1."
          },
          "version_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Id",
            "description": "Identifies this version's content. Signing requests name the version they were made for by it. Null when the version records a deletion."
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When this version was saved."
          },
          "author_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "user",
                  "agent"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Type",
            "description": "Whether a person or the agent saved this version."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id",
            "description": "The agent that holds the file."
          },
          "internal_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InternalFileType"
              },
              {
                "type": "null"
              }
            ],
            "description": "The format Compound keeps the file in when it differs from its extension: `sfdt` is a Word file kept in the format of Compound's Word editor."
          },
          "author_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author User Id",
            "description": "The person who saved this version, or on whose behalf the agent saved it. Null when the caller is not a member of the agent."
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "The conversation the agent saved this version from."
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id",
            "description": "The message the agent saved this version for."
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id",
            "description": "The task the agent saved this version for."
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url",
            "description": "The web page the file was saved from."
          },
          "expansion_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExpansionStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "For an archive or mail file: whether Compound has unpacked its contents into the agent's files."
          },
          "to_revision": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Revision",
            "description": "The edit revision this version was saved at, for a file edited live in Compound."
          },
          "change_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VersionChangeKind"
              },
              {
                "type": "null"
              }
            ],
            "description": "What made this version, for a file edited live in Compound."
          },
          "version_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Name",
            "description": "The name someone gave this version."
          },
          "restored_from_version_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Restored From Version Number",
            "description": "The version this one restored."
          },
          "author_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Ids",
            "description": "Everyone who edited the file in this version, for a file edited live in Compound. Null when the caller is not a member of the agent."
          },
          "author_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Name",
            "description": "The display name of the person who saved this version. Null for the agent, for a person without a name, and when the caller is not a member of the agent."
          }
        },
        "type": "object",
        "required": [
          "id",
          "path",
          "version_number",
          "version_id",
          "size_bytes",
          "created_at",
          "author_type",
          "agent_id",
          "internal_type",
          "author_user_id",
          "conversation_id",
          "message_id",
          "task_id",
          "source_url",
          "expansion_status",
          "to_revision",
          "change_kind",
          "version_name",
          "restored_from_version_number",
          "author_ids",
          "author_name"
        ],
        "title": "ListedAgentFile"
      },
      "ListedAgentFileList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ListedAgentFile"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ListedAgentFileList"
      },
      "Me": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The caller's principal id."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "type": {
            "type": "string",
            "enum": [
              "api_account",
              "user"
            ],
            "title": "Type",
            "description": "`api_account` for an organization API key, `user` for a person signed in with `compound login`."
          },
          "open_in_desktop_enabled": {
            "type": "boolean",
            "title": "Open In Desktop Enabled",
            "description": "False when your organization has turned off opening files in desktop Excel and PowerPoint."
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "name",
          "type",
          "open_in_desktop_enabled"
        ],
        "title": "Me"
      },
      "Message": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "author_type": {
            "$ref": "#/components/schemas/AuthorType"
          },
          "author_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "step": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step",
            "description": "The step of the task the message is about."
          },
          "body": {
            "$ref": "#/components/schemas/MessageBody"
          },
          "short_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Short Id",
            "description": "The short id the agent quotes for this message. `in_reply_to` holds another message's short_id."
          },
          "answered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At",
            "description": "When someone answered the question this message asks."
          },
          "task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Number",
            "description": "The task whose conversation holds this message; null for the main chat."
          },
          "opened_task_numbers": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Opened Task Numbers",
            "description": "The tasks the agent opened to take on this message."
          },
          "in_reply_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Reply To",
            "description": "The short_id of the message this one answers."
          },
          "client_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Message Id",
            "description": "The client_message_id the sender gave."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "author_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Id",
            "description": "The user id of the person who wrote the message, or the agent's id."
          },
          "mentions": {
            "items": {
              "$ref": "#/components/schemas/MessageMention"
            },
            "type": "array",
            "title": "Mentions",
            "description": "The people the message `@`-mentions."
          },
          "client_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessageClientContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "suggested_next_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessageSuggestion"
              },
              {
                "type": "null"
              }
            ],
            "description": "A follow-up request the agent suggests, shown to the person it is for."
          },
          "reactions": {
            "items": {
              "$ref": "#/components/schemas/MessageReaction"
            },
            "type": "array",
            "title": "Reactions"
          }
        },
        "type": "object",
        "required": [
          "id",
          "author_type",
          "author_name",
          "created_at",
          "step",
          "body",
          "short_id",
          "answered_at",
          "task_number",
          "opened_task_numbers",
          "in_reply_to",
          "client_message_id",
          "agent_id",
          "author_id",
          "mentions",
          "client_context",
          "suggested_next_request",
          "reactions"
        ],
        "title": "Message"
      },
      "MessageBody": {
        "properties": {
          "markdown": {
            "type": "string",
            "title": "Markdown",
            "description": "The message in Markdown."
          },
          "preview": {
            "type": "string",
            "title": "Preview",
            "description": "The first line of the message as plain text, for a list or a notification."
          },
          "options": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Options",
            "description": "The answers the agent offers when the message is a question."
          },
          "is_multi_choice": {
            "type": "boolean",
            "title": "Is Multi Choice",
            "description": "True when more than one of `options` may be chosen."
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/Citation"
            },
            "type": "array",
            "title": "Sources",
            "description": "The sources the message's `[^N]` markers cite, in marker order."
          }
        },
        "type": "object",
        "required": [
          "markdown",
          "preview",
          "options",
          "is_multi_choice",
          "sources"
        ],
        "title": "MessageBody"
      },
      "MessageClientContext": {
        "properties": {
          "viewing": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Viewing",
            "description": "What the sender had open in the app when they sent the message."
          },
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskEffort"
              },
              {
                "type": "null"
              }
            ],
            "description": "The effort the sender chose for the work the message asks for."
          },
          "app": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientSurface"
              },
              {
                "type": "null"
              }
            ],
            "description": "The app the message was sent from."
          }
        },
        "type": "object",
        "required": [
          "viewing",
          "effort",
          "app"
        ],
        "title": "MessageClientContext"
      },
      "MessageMention": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "name"
        ],
        "title": "MessageMention"
      },
      "MessagePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "type": "array",
            "title": "Data",
            "description": "Newest first."
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Pass as `cursor` to read older messages; null on the last page."
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "MessagePage"
      },
      "MessageReaction": {
        "properties": {
          "emoji": {
            "type": "string",
            "title": "Emoji"
          },
          "reactors": {
            "items": {
              "$ref": "#/components/schemas/MessageReactor"
            },
            "type": "array",
            "title": "Reactors"
          }
        },
        "type": "object",
        "required": [
          "emoji",
          "reactors"
        ],
        "title": "MessageReaction"
      },
      "MessageReactor": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AuthorType"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "title": "At"
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "name",
          "at"
        ],
        "title": "MessageReactor"
      },
      "MessageSuggestion": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id",
            "description": "The person the suggestion is for."
          },
          "markdown": {
            "type": "string",
            "title": "Markdown",
            "description": "The request the agent suggests sending next."
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "markdown"
        ],
        "title": "MessageSuggestion"
      },
      "Notification": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "kind": {
            "type": "string",
            "enum": [
              "mention",
              "access_request",
              "comment",
              "task_opened",
              "task_done"
            ],
            "title": "Kind"
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id",
            "description": "The agent the notification is about."
          },
          "task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Number",
            "description": "The task the notification is about, when there is one."
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id",
            "description": "The agent message the notification points at, when there is one."
          },
          "actor_id": {
            "type": "string",
            "title": "Actor Id",
            "description": "The user id of who it is from, or `agent` for the agent itself."
          },
          "actor_name": {
            "type": "string",
            "title": "Actor Name",
            "description": "Who it is from: a person's name, or `agent` for the agent itself."
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At",
            "description": "When it was dismissed or answered; null while it waits on you."
          },
          "resolved_by": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "clicked",
                  "replied",
                  "granted",
                  "viewed",
                  "resolved",
                  "reopened",
                  "dismissed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved By"
          },
          "asks_question": {
            "type": "boolean",
            "title": "Asks Question",
            "description": "True for a mention that asks you to choose an answer."
          },
          "proposes_task": {
            "type": "boolean",
            "title": "Proposes Task",
            "description": "True for a `task_opened` notice about a task the agent proposed and waits for someone to accept."
          },
          "comment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationComment"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set for `comment` notifications."
          },
          "access_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationAccessRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set for `access_request` notifications."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "kind",
          "agent_id",
          "task_number",
          "message_id",
          "actor_id",
          "actor_name",
          "title",
          "body",
          "resolved_at",
          "resolved_by",
          "asks_question",
          "proposes_task",
          "comment",
          "access_request"
        ],
        "title": "Notification"
      },
      "NotificationAccessRequest": {
        "properties": {
          "edit_access": {
            "type": "boolean",
            "title": "Edit Access",
            "description": "True when the requester asks to be made an editor of the agent; false when they ask that the people listed get access so they can be tagged."
          },
          "people": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NotificationPerson"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "People",
            "description": "Who would get access if you grant it; null on a request stored without the people it names."
          },
          "user_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Ids",
            "description": "The user ids of who would get access if you grant it; null on a request stored without them."
          }
        },
        "type": "object",
        "required": [
          "edit_access",
          "people",
          "user_ids"
        ],
        "title": "NotificationAccessRequest"
      },
      "NotificationComment": {
        "properties": {
          "comment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment Id",
            "description": "Null on an older notice stored without it."
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id",
            "description": "Null on an older notice stored without it."
          },
          "replied": {
            "type": "boolean",
            "title": "Replied",
            "description": "True when the notice is a reply in the comment thread, false for a new comment."
          },
          "action": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "commented",
                  "replied",
                  "resolved"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Action",
            "description": "What was done on the comment thread; null on a notice stored before the action was recorded."
          },
          "anchor": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SheetRangeAnchor"
                  },
                  {
                    "$ref": "#/components/schemas/DocChunkAnchor"
                  },
                  {
                    "$ref": "#/components/schemas/DeckShapeAnchor"
                  },
                  {
                    "$ref": "#/components/schemas/PdfRegionAnchor"
                  },
                  {
                    "$ref": "#/components/schemas/FileAnchor"
                  }
                ],
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "deck_shape": "#/components/schemas/DeckShapeAnchor",
                    "doc_chunk": "#/components/schemas/DocChunkAnchor",
                    "file": "#/components/schemas/FileAnchor",
                    "pdf_region": "#/components/schemas/PdfRegionAnchor",
                    "sheet_range": "#/components/schemas/SheetRangeAnchor"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Anchor",
            "description": "Where in the file the comment is."
          }
        },
        "type": "object",
        "required": [
          "comment_id",
          "file_id",
          "replied",
          "action",
          "anchor"
        ],
        "title": "NotificationComment"
      },
      "NotificationList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Notification"
            },
            "type": "array",
            "title": "Data",
            "description": "Notifications waiting on you, newest first, then the most recently resolved ones."
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "NotificationList"
      },
      "NotificationPerson": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Set when the requester asked for edit access for themselves."
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "name",
          "email"
        ],
        "title": "NotificationPerson"
      },
      "OpenInDesktopLink": {
        "properties": {
          "uri": {
            "type": "string",
            "title": "Uri",
            "description": "An `ms-excel:` or `ms-powerpoint:` link that opens the file in the desktop app."
          }
        },
        "type": "object",
        "required": [
          "uri"
        ],
        "title": "OpenInDesktopLink"
      },
      "PdfBounds": {
        "properties": {
          "x": {
            "type": "number",
            "title": "X"
          },
          "y": {
            "type": "number",
            "title": "Y"
          },
          "width": {
            "type": "number",
            "title": "Width"
          },
          "height": {
            "type": "number",
            "title": "Height"
          }
        },
        "type": "object",
        "required": [
          "x",
          "y",
          "width",
          "height"
        ],
        "title": "PdfBounds"
      },
      "PdfPageCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "pdf_page",
            "title": "Kind",
            "default": "pdf_page"
          },
          "passages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Passages"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "passages",
          "file_id",
          "filename",
          "page",
          "heading"
        ],
        "title": "PdfPageCitationView"
      },
      "PdfRegionAnchor": {
        "properties": {
          "kind": {
            "type": "string",
            "const": "pdf_region",
            "title": "Kind",
            "default": "pdf_region"
          },
          "page": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Page"
          },
          "quote": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote"
          },
          "bounds": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PdfBounds"
              },
              {
                "type": "null"
              }
            ]
          },
          "detail": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "page"
        ],
        "title": "PdfRegionAnchor"
      },
      "PlacementKind": {
        "type": "string",
        "enum": [
          "signature",
          "initials",
          "name",
          "date"
        ],
        "title": "PlacementKind"
      },
      "PlacementRect": {
        "properties": {
          "x0": {
            "type": "number",
            "title": "X0"
          },
          "y0": {
            "type": "number",
            "title": "Y0"
          },
          "x1": {
            "type": "number",
            "title": "X1"
          },
          "y1": {
            "type": "number",
            "title": "Y1"
          }
        },
        "type": "object",
        "required": [
          "x0",
          "y0",
          "x1",
          "y1"
        ],
        "title": "PlacementRect"
      },
      "PredictionMarketCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "prediction_market",
            "title": "Kind",
            "default": "prediction_market"
          },
          "market_id": {
            "type": "string",
            "title": "Market Id"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "market_id",
          "url",
          "heading"
        ],
        "title": "PredictionMarketCitationView"
      },
      "Project": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "folder": {
            "type": "string",
            "title": "Folder",
            "description": "The folder in the agent's files that holds the project's files. It keeps its name when the project is renamed."
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon",
            "description": "The icon the app shows for the project."
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color",
            "description": "The color the app shows for the project."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "agent_id",
          "name",
          "description",
          "folder",
          "icon",
          "color",
          "created_at",
          "updated_at"
        ],
        "title": "Project"
      },
      "ProjectList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Project"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ProjectList"
      },
      "PropertyType": {
        "type": "string",
        "enum": [
          "text",
          "single_select",
          "multi_select",
          "date",
          "person",
          "number",
          "currency",
          "url",
          "checkbox"
        ],
        "title": "PropertyType"
      },
      "Proposal": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "proposed_by": {
            "type": "string",
            "title": "Proposed By",
            "description": "Who proposed it, for example `agent`."
          },
          "task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Number",
            "description": "The task the proposal came from."
          },
          "actions": {
            "items": {
              "$ref": "#/components/schemas/ProposalAction"
            },
            "type": "array",
            "title": "Actions",
            "description": "Accepting applies every action in order."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "proposed_by",
          "task_number",
          "actions",
          "created_at",
          "updated_at"
        ],
        "title": "Proposal"
      },
      "ProposalAction": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "kind": {
            "type": "string",
            "enum": [
              "send_feedback",
              "copy_to_agent"
            ],
            "title": "Kind"
          },
          "send_feedback": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProposalFeedback"
              },
              {
                "type": "null"
              }
            ]
          },
          "copy_to_agent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProposalCopy"
              },
              {
                "type": "null"
              }
            ],
            "description": "Accepting copies these into the agent named by `destination_agent_id`."
          }
        },
        "type": "object",
        "required": [
          "index",
          "kind",
          "send_feedback",
          "copy_to_agent"
        ],
        "title": "ProposalAction"
      },
      "ProposalCopy": {
        "properties": {
          "paths": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Paths",
            "description": "The files and folders to copy."
          },
          "tasks": {
            "items": {
              "$ref": "#/components/schemas/ProposalCopyTask"
            },
            "type": "array",
            "title": "Tasks"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ProposalCopyProject"
            },
            "type": "array",
            "title": "Projects"
          }
        },
        "type": "object",
        "required": [
          "paths",
          "tasks",
          "projects"
        ],
        "title": "ProposalCopy"
      },
      "ProposalCopyProject": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "ProposalCopyProject"
      },
      "ProposalCopyTask": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "title": {
            "type": "string",
            "title": "Title"
          }
        },
        "type": "object",
        "required": [
          "number",
          "title"
        ],
        "title": "ProposalCopyTask"
      },
      "ProposalFeedback": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title",
            "description": "The title of the feedback sent to Compound."
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "ProposalFeedback"
      },
      "ProposalList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Proposal"
            },
            "type": "array",
            "title": "Data",
            "description": "Newest first."
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ProposalList"
      },
      "QuartrDocumentType": {
        "type": "string",
        "enum": [
          "UNSPECIFIED",
          "TRANSCRIPT",
          "PRESENTATION",
          "QUARTERLY_REPORT",
          "ANNUAL_REPORT",
          "INTERIM_REPORT",
          "EARNINGS_RELEASE",
          "REPORT"
        ],
        "title": "QuartrDocumentType"
      },
      "Reaction": {
        "properties": {
          "emoji": {
            "type": "string",
            "title": "Emoji"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "reactors": {
            "items": {
              "$ref": "#/components/schemas/Reactor"
            },
            "type": "array",
            "title": "Reactors",
            "description": "Who reacted, in the order they reacted. A caller who is not a member of the agent sees only the agent."
          }
        },
        "type": "object",
        "required": [
          "emoji",
          "count",
          "reactors"
        ],
        "title": "Reaction"
      },
      "Reactor": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "user",
              "agent"
            ],
            "title": "Type"
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The person's user id, or the agent's id."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "title": "At"
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "name",
          "at"
        ],
        "title": "Reactor"
      },
      "RecipientRequest": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "public",
              "user"
            ],
            "title": "Type",
            "description": "`public` for anyone with the link, which needs a pinned `version_number`; `user` for one person."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The person's email. Required for `user`."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type"
        ],
        "title": "RecipientRequest"
      },
      "RenamedFolder": {
        "properties": {
          "renamed_count": {
            "type": "integer",
            "title": "Renamed Count",
            "description": "How many files moved with the folder."
          }
        },
        "type": "object",
        "required": [
          "renamed_count"
        ],
        "title": "RenamedFolder"
      },
      "RequestedPlacement": {
        "properties": {
          "page_index": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Page Index"
          },
          "rect": {
            "$ref": "#/components/schemas/PlacementRect"
          },
          "kind": {
            "$ref": "#/components/schemas/PlacementKind"
          },
          "assignee_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee User Id"
          }
        },
        "type": "object",
        "required": [
          "page_index",
          "rect",
          "kind"
        ],
        "title": "RequestedPlacement"
      },
      "Schedule": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number",
            "description": "The schedule's number on its agent."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "instruction": {
            "type": "string",
            "title": "Instruction",
            "description": "What the agent does at each run, in Markdown. Each run opens a task."
          },
          "instruction_options": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Instruction Options",
            "description": "Choices the instruction offers; empty when it offers none."
          },
          "instruction_is_multi_choice": {
            "type": "boolean",
            "title": "Instruction Is Multi Choice",
            "description": "True when more than one of `instruction_options` can be picked."
          },
          "cron": {
            "type": "string",
            "title": "Cron",
            "description": "A five-field cron expression, read in `time_zone`. A schedule runs at most once an hour."
          },
          "time_zone": {
            "type": "string",
            "title": "Time Zone",
            "description": "IANA time zone the cron is read in."
          },
          "is_live": {
            "type": "boolean",
            "title": "Is Live",
            "description": "False while the schedule is paused."
          },
          "next_run_at": {
            "type": "string",
            "format": "date-time",
            "title": "Next Run At"
          },
          "last_run_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At",
            "description": "When the schedule last ran; null before its first run."
          },
          "created_by": {
            "type": "string",
            "enum": [
              "user",
              "agent",
              "system"
            ],
            "title": "Created By",
            "description": "Who created the schedule: a person, the agent, or Compound."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "number",
          "agent_id",
          "name",
          "instruction",
          "instruction_options",
          "instruction_is_multi_choice",
          "cron",
          "time_zone",
          "is_live",
          "next_run_at",
          "last_run_at",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "Schedule"
      },
      "ScheduleList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Schedule"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ScheduleList"
      },
      "SecFilingCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "sec_filing",
            "title": "Kind",
            "default": "sec_filing"
          },
          "passages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Passages"
          },
          "accession": {
            "type": "string",
            "title": "Accession"
          },
          "document": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document"
          },
          "company": {
            "type": "string",
            "title": "Company"
          },
          "form": {
            "type": "string",
            "title": "Form"
          },
          "period": {
            "type": "string",
            "title": "Period"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "passages",
          "accession",
          "document",
          "company",
          "form",
          "period",
          "heading"
        ],
        "title": "SecFilingCitationView"
      },
      "SendMessageRequest": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text",
            "description": "What to say, in Markdown."
          },
          "task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Number",
            "description": "Say it on this task (a follow-up or correction) instead of the main chat."
          },
          "step": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step",
            "description": "With `task_number`: the step of the task the message is about."
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Say it from this project: the agent files the task it opens in the project. Not with `task_number`."
          },
          "effort": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "fast",
                  "auto",
                  "deep"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Effort",
            "description": "How hard the agent works on what it opens: `fast`, `auto` (the default) or `deep`. Not with `task_number`; ask in words instead."
          },
          "answers_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answers Message Id",
            "description": "The id of the agent's question this message answers; marks it answered."
          },
          "client_message_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,64}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Message Id",
            "description": "Your own id for this message. Sending the same client_message_id again returns the stored message instead of sending it twice."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "text"
        ],
        "title": "SendMessageRequest"
      },
      "SetTaskProjectRequest": {
        "properties": {
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "The project to put the task in; null takes it out of its project."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "project_id"
        ],
        "title": "SetTaskProjectRequest"
      },
      "SharePrincipalType": {
        "type": "string",
        "enum": [
          "public",
          "team",
          "user",
          "group",
          "group_manager",
          "team_manager"
        ],
        "title": "SharePrincipalType"
      },
      "ShareRole": {
        "type": "string",
        "enum": [
          "read",
          "write"
        ],
        "title": "ShareRole"
      },
      "SharedItem": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "agent",
              "file",
              "task"
            ],
            "title": "Type"
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The agent's id for an agent; the share's id for a file or task."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id",
            "description": "The agent the file or task belongs to."
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "version_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Number",
            "description": "The file version a file share is pinned to; null when it follows the latest version."
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name",
            "description": "Who shared it, for items shared with you."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When it was shared."
          },
          "app_path": {
            "type": "string",
            "title": "App Path",
            "description": "The item's path in the Compound app, relative to the app's address."
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Visibility"
              },
              {
                "type": "null"
              }
            ]
          },
          "shared_with_user_count": {
            "type": "integer",
            "title": "Shared With User Count"
          },
          "shared_with_group_count": {
            "type": "integer",
            "title": "Shared With Group Count"
          },
          "shared_with_team": {
            "type": "boolean",
            "title": "Shared With Team"
          },
          "role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "read",
                  "write"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Role",
            "description": "Your access, for items shared with you."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "name",
          "agent_id",
          "file_id",
          "version_number",
          "owner_name",
          "created_at",
          "app_path",
          "visibility",
          "shared_with_user_count",
          "shared_with_group_count",
          "shared_with_team",
          "role"
        ],
        "title": "SharedItem"
      },
      "SharedItemList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SharedItem"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "SharedItemList"
      },
      "SheetRangeAnchor": {
        "properties": {
          "kind": {
            "type": "string",
            "const": "sheet_range",
            "title": "Kind",
            "default": "sheet_range"
          },
          "sheet_name": {
            "type": "string",
            "title": "Sheet Name"
          },
          "a1": {
            "type": "string",
            "pattern": "^[A-Za-z]{1,3}[1-9][0-9]{0,6}(:[A-Za-z]{1,3}[1-9][0-9]{0,6})?$",
            "title": "A1"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "sheet_name",
          "a1"
        ],
        "title": "SheetRangeAnchor"
      },
      "SheetRangeCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "sheet_range",
            "title": "Kind",
            "default": "sheet_range"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "sheet_name": {
            "type": "string",
            "title": "Sheet Name"
          },
          "cell_range": {
            "type": "string",
            "title": "Cell Range"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "file_id",
          "filename",
          "sheet_name",
          "cell_range",
          "heading"
        ],
        "title": "SheetRangeCitationView"
      },
      "SignFileRequest": {
        "properties": {
          "version_id": {
            "type": "string",
            "title": "Version Id",
            "description": "The file's current `version_id`. Signing an older version returns 409."
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/SignaturePlacement"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Fields",
            "description": "The boxes to sign: `page_index` counts pages from 0 and `rect` is in PDF points from the page's bottom-left corner. Signature and initials boxes use the images saved in the signer's Compound settings."
          },
          "signing_request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signing Request Id",
            "description": "The signing request these boxes answer."
          },
          "time_zone": {
            "type": "string",
            "title": "Time Zone",
            "description": "IANA time zone for date boxes."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "version_id",
          "fields",
          "time_zone"
        ],
        "title": "SignFileRequest"
      },
      "Signature": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "signer_name": {
            "type": "string",
            "title": "Signer Name"
          },
          "signed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed At"
          },
          "is_sealed": {
            "type": "boolean",
            "title": "Is Sealed",
            "description": "True when Compound sealed the document with its certificate at this signature."
          },
          "is_intact": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Intact",
            "description": "False when the file changed after this signature; null when it cannot be checked."
          },
          "covers_whole_document": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Covers Whole Document"
          },
          "later_changes_are_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Later Changes Are Allowed"
          },
          "signer_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer User Id",
            "description": "The signer's user id, when the signer signed in Compound."
          },
          "signed_at_ns": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed At Ns",
            "description": "`signed_at` in nanoseconds since the Unix epoch."
          }
        },
        "type": "object",
        "required": [
          "id",
          "signer_name",
          "signed_at",
          "is_sealed",
          "is_intact",
          "covers_whole_document",
          "later_changes_are_allowed",
          "signer_user_id",
          "signed_at_ns"
        ],
        "title": "Signature"
      },
      "SignatureList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Signature"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "SignatureList"
      },
      "SignaturePlacement": {
        "properties": {
          "page_index": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Page Index"
          },
          "rect": {
            "$ref": "#/components/schemas/PlacementRect"
          },
          "kind": {
            "$ref": "#/components/schemas/PlacementKind"
          }
        },
        "type": "object",
        "required": [
          "page_index",
          "rect",
          "kind"
        ],
        "title": "SignaturePlacement"
      },
      "SignedFile": {
        "properties": {
          "version_id": {
            "type": "string",
            "title": "Version Id",
            "description": "The signed copy, saved as the file's new version."
          },
          "signature_id": {
            "type": "string",
            "title": "Signature Id"
          }
        },
        "type": "object",
        "required": [
          "version_id",
          "signature_id"
        ],
        "title": "SignedFile"
      },
      "SigningRequest": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "version_id": {
            "type": "string",
            "title": "Version Id",
            "description": "The file version the request asks to sign; see the file's `version_id`."
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/RequestedPlacement"
            },
            "type": "array",
            "title": "Fields",
            "description": "The boxes to sign. A box with an `assignee_user_id` is for that person only."
          },
          "created_by_user_id": {
            "type": "string",
            "title": "Created By User Id"
          },
          "is_created_by_agent": {
            "type": "boolean",
            "title": "Is Created By Agent"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "status": {
            "$ref": "#/components/schemas/SigningRequestStatus"
          },
          "signed_user_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Signed User Ids",
            "description": "The people who have signed."
          },
          "created_at_ns": {
            "type": "integer",
            "title": "Created At Ns",
            "description": "`created_at` in nanoseconds since the Unix epoch."
          }
        },
        "type": "object",
        "required": [
          "id",
          "file_id",
          "version_id",
          "fields",
          "created_by_user_id",
          "is_created_by_agent",
          "created_at",
          "status",
          "signed_user_ids",
          "created_at_ns"
        ],
        "title": "SigningRequest"
      },
      "SigningRequestList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SigningRequest"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "SigningRequestList"
      },
      "SigningRequestStatus": {
        "type": "string",
        "enum": [
          "open",
          "completed",
          "cancelled"
        ],
        "title": "SigningRequestStatus"
      },
      "SupportRequest": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message",
            "description": "A confirmation to show the person who sent it."
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "SupportRequest"
      },
      "Task": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number",
            "description": "The task's number, unique within its agent."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "What was asked, in Markdown. Lists include it only for proposed tasks; get the task to read it."
          },
          "state": {
            "$ref": "#/components/schemas/TaskState"
          },
          "effort": {
            "$ref": "#/components/schemas/TaskEffort"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/TaskStep"
            },
            "type": "array",
            "title": "Steps"
          },
          "requested_by": {
            "items": {
              "$ref": "#/components/schemas/TaskRequester"
            },
            "type": "array",
            "title": "Requested By",
            "description": "The people who asked for the task. Empty when the caller is not a member of the agent."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "state_changed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "State Changed At",
            "description": "When the task last changed state; a finished task's finish time."
          },
          "description_options": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description Options",
            "description": "The answers the description offers when it is a question. Null when `description` is."
          },
          "description_is_multi_choice": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description Is Multi Choice",
            "description": "True when more than one of `description_options` may be chosen. Null when `description` is."
          },
          "content_digest": {
            "type": "string",
            "title": "Content Digest",
            "description": "A hash of the description and of each step's description, order and kind; it changes when any of them does."
          },
          "schedule_firings": {
            "items": {
              "$ref": "#/components/schemas/TaskScheduleFiring"
            },
            "type": "array",
            "title": "Schedule Firings",
            "description": "The schedule firings that ran this task."
          },
          "shown_file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Shown File Ids",
            "description": "The ids of the files the task presents as its result."
          },
          "request_message_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Request Message Ids",
            "description": "The `short_id` of each message that asked for the task."
          },
          "labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labels",
            "description": "The labels the agent keeps on the task. Lists leave them out; get the task to read them."
          },
          "stalled_noticed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stalled Noticed At",
            "description": "When Compound noticed the task had stalled. Lists leave it out."
          },
          "parent_task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Task Number",
            "description": "The task that opened this one. Lists leave it out."
          }
        },
        "type": "object",
        "required": [
          "number",
          "agent_id",
          "title",
          "description",
          "state",
          "effort",
          "project_id",
          "steps",
          "requested_by",
          "created_at",
          "updated_at",
          "state_changed_at",
          "description_options",
          "description_is_multi_choice",
          "content_digest",
          "schedule_firings",
          "shown_file_ids",
          "request_message_ids",
          "labels",
          "stalled_noticed_at",
          "parent_task_number"
        ],
        "title": "Task"
      },
      "TaskCitedFile": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          }
        },
        "type": "object",
        "required": [
          "file_id",
          "filename"
        ],
        "title": "TaskCitedFile"
      },
      "TaskCitedFileList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TaskCitedFile"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "TaskCitedFileList"
      },
      "TaskClientContext": {
        "properties": {
          "viewing": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Viewing",
            "description": "What the sender's app showed when the message was sent."
          },
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskEffort"
              },
              {
                "type": "null"
              }
            ]
          },
          "app": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientSurface"
              },
              {
                "type": "null"
              }
            ],
            "description": "The app the message was sent from."
          }
        },
        "type": "object",
        "required": [
          "viewing",
          "effort",
          "app"
        ],
        "title": "TaskClientContext"
      },
      "TaskComment": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "author_type": {
            "$ref": "#/components/schemas/AuthorType"
          },
          "author_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "step": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step",
            "description": "The step the comment is about."
          },
          "body": {
            "$ref": "#/components/schemas/TaskCommentBody"
          },
          "short_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Short Id",
            "description": "The short id the agent quotes for this message. `in_reply_to` holds another message's short_id."
          },
          "author_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Id",
            "description": "The user or agent who wrote it; null when the caller may not see who did."
          },
          "task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Number"
          },
          "mentions": {
            "items": {
              "$ref": "#/components/schemas/TaskMention"
            },
            "type": "array",
            "title": "Mentions",
            "description": "The people the message mentions."
          },
          "client_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskClientContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "opened_task_numbers": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Opened Task Numbers",
            "description": "The tasks the agent opened to take on this message."
          },
          "answered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At",
            "description": "When someone answered the question this message asks."
          },
          "suggested_next_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskSuggestedRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "A request the agent suggests someone send next."
          },
          "client_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Message Id",
            "description": "The client_message_id the sender gave."
          },
          "reactions": {
            "items": {
              "$ref": "#/components/schemas/TaskReaction"
            },
            "type": "array",
            "title": "Reactions"
          },
          "in_reply_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Reply To",
            "description": "The short_id of the message this one answers."
          }
        },
        "type": "object",
        "required": [
          "id",
          "author_type",
          "author_name",
          "created_at",
          "step",
          "body",
          "short_id",
          "author_id",
          "task_number",
          "mentions",
          "client_context",
          "opened_task_numbers",
          "answered_at",
          "suggested_next_request",
          "client_message_id",
          "reactions",
          "in_reply_to"
        ],
        "title": "TaskComment"
      },
      "TaskCommentBody": {
        "properties": {
          "markdown": {
            "type": "string",
            "title": "Markdown"
          },
          "preview": {
            "type": "string",
            "title": "Preview",
            "description": "A short plain-text preview of `markdown`."
          },
          "options": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Options",
            "description": "The answers the agent offers when the comment is a question."
          },
          "is_multi_choice": {
            "type": "boolean",
            "title": "Is Multi Choice"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/Citation"
            },
            "type": "array",
            "title": "Sources",
            "description": "The sources the comment's `[^N]` markers cite, in marker order."
          }
        },
        "type": "object",
        "required": [
          "markdown",
          "preview",
          "options",
          "is_multi_choice",
          "sources"
        ],
        "title": "TaskCommentBody"
      },
      "TaskDetail": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number",
            "description": "The task's number, unique within its agent."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "What was asked, in Markdown. Lists include it only for proposed tasks; get the task to read it."
          },
          "state": {
            "$ref": "#/components/schemas/TaskState"
          },
          "effort": {
            "$ref": "#/components/schemas/TaskEffort"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/TaskStep"
            },
            "type": "array",
            "title": "Steps"
          },
          "requested_by": {
            "items": {
              "$ref": "#/components/schemas/TaskRequester"
            },
            "type": "array",
            "title": "Requested By",
            "description": "The people who asked for the task. Empty when the caller is not a member of the agent."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "state_changed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "State Changed At",
            "description": "When the task last changed state; a finished task's finish time."
          },
          "description_options": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description Options",
            "description": "The answers the description offers when it is a question. Null when `description` is."
          },
          "description_is_multi_choice": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description Is Multi Choice",
            "description": "True when more than one of `description_options` may be chosen. Null when `description` is."
          },
          "content_digest": {
            "type": "string",
            "title": "Content Digest",
            "description": "A hash of the description and of each step's description, order and kind; it changes when any of them does."
          },
          "schedule_firings": {
            "items": {
              "$ref": "#/components/schemas/TaskScheduleFiring"
            },
            "type": "array",
            "title": "Schedule Firings",
            "description": "The schedule firings that ran this task."
          },
          "shown_file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Shown File Ids",
            "description": "The ids of the files the task presents as its result."
          },
          "request_message_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Request Message Ids",
            "description": "The `short_id` of each message that asked for the task."
          },
          "labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labels",
            "description": "The labels the agent keeps on the task. Lists leave them out; get the task to read them."
          },
          "stalled_noticed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stalled Noticed At",
            "description": "When Compound noticed the task had stalled. Lists leave it out."
          },
          "parent_task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Task Number",
            "description": "The task that opened this one. Lists leave it out."
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/TaskFile"
            },
            "type": "array",
            "title": "Files",
            "description": "The files the task wrote."
          },
          "shown_files": {
            "items": {
              "$ref": "#/components/schemas/TaskFile"
            },
            "type": "array",
            "title": "Shown Files",
            "description": "The files the task presents as its result, first."
          },
          "comments": {
            "items": {
              "$ref": "#/components/schemas/TaskComment"
            },
            "type": "array",
            "title": "Comments",
            "description": "The task's comments, newest first."
          },
          "requests": {
            "items": {
              "$ref": "#/components/schemas/TaskComment"
            },
            "type": "array",
            "title": "Requests",
            "description": "The messages that asked for the task."
          }
        },
        "type": "object",
        "required": [
          "number",
          "agent_id",
          "title",
          "description",
          "state",
          "effort",
          "project_id",
          "steps",
          "requested_by",
          "created_at",
          "updated_at",
          "state_changed_at",
          "description_options",
          "description_is_multi_choice",
          "content_digest",
          "schedule_firings",
          "shown_file_ids",
          "request_message_ids",
          "labels",
          "stalled_noticed_at",
          "parent_task_number",
          "files",
          "shown_files",
          "comments",
          "requests"
        ],
        "title": "TaskDetail"
      },
      "TaskEffort": {
        "type": "string",
        "enum": [
          "quick",
          "standard",
          "deep"
        ],
        "title": "TaskEffort"
      },
      "TaskFile": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "version_number": {
            "type": "integer",
            "title": "Version Number",
            "description": "The file's current version."
          }
        },
        "type": "object",
        "required": [
          "file_id",
          "filename",
          "version_number"
        ],
        "title": "TaskFile"
      },
      "TaskMention": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "name"
        ],
        "title": "TaskMention"
      },
      "TaskPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Task"
            },
            "type": "array",
            "title": "Data"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Pass as `cursor` to read the next page; null on the last page."
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "TaskPage"
      },
      "TaskReaction": {
        "properties": {
          "emoji": {
            "type": "string",
            "title": "Emoji"
          },
          "reactors": {
            "items": {
              "$ref": "#/components/schemas/TaskReactor"
            },
            "type": "array",
            "title": "Reactors"
          }
        },
        "type": "object",
        "required": [
          "emoji",
          "reactors"
        ],
        "title": "TaskReaction"
      },
      "TaskReactor": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AuthorType"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "title": "At"
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "name",
          "at"
        ],
        "title": "TaskReactor"
      },
      "TaskRequester": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "name"
        ],
        "title": "TaskRequester"
      },
      "TaskScheduleFiring": {
        "properties": {
          "schedule_number": {
            "type": "integer",
            "title": "Schedule Number",
            "description": "The schedule that fired."
          },
          "fired_at": {
            "type": "string",
            "format": "date-time",
            "title": "Fired At"
          },
          "linked_at": {
            "type": "string",
            "format": "date-time",
            "title": "Linked At",
            "description": "When the firing was added to the task."
          }
        },
        "type": "object",
        "required": [
          "schedule_number",
          "fired_at",
          "linked_at"
        ],
        "title": "TaskScheduleFiring"
      },
      "TaskShare": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "link": {
            "type": "string",
            "title": "Link",
            "description": "The link the people it is shared with open."
          },
          "is_live": {
            "type": "boolean",
            "title": "Is Live",
            "description": "True: the link shows the task as it is now. False: a snapshot of the task when it was shared."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/TaskShareEntry"
            },
            "type": "array",
            "title": "Entries",
            "description": "Who the task is shared with."
          },
          "path": {
            "type": "string",
            "title": "Path",
            "description": "`link` without the Compound app's address."
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "task_number": {
            "type": "integer",
            "title": "Task Number"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name"
          },
          "owner_id": {
            "type": "string",
            "title": "Owner Id",
            "description": "The user who shared the task."
          }
        },
        "type": "object",
        "required": [
          "id",
          "link",
          "is_live",
          "created_at",
          "entries",
          "path",
          "agent_id",
          "task_number",
          "agent_name",
          "owner_id"
        ],
        "title": "TaskShare"
      },
      "TaskShareEntry": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "$ref": "#/components/schemas/SharePrincipalType"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "$ref": "#/components/schemas/ShareRole"
          },
          "principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principal Id",
            "description": "The id of the user, team or group; null for a public link."
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "email",
          "name",
          "role",
          "principal_id"
        ],
        "title": "TaskShareEntry"
      },
      "TaskShareTarget": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "user",
              "team",
              "group",
              "public"
            ],
            "title": "Type",
            "description": "`user` (with `email`), `team` (with `team_id`, the id of your own team), `group` (with `group_id`) or `public` (anyone with the link)."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id",
            "description": "Required for a `team` target: the id of your own team."
          },
          "group_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type"
        ],
        "title": "TaskShareTarget"
      },
      "TaskState": {
        "type": "string",
        "enum": [
          "proposed",
          "running",
          "needs_input",
          "paused",
          "completed",
          "archived"
        ],
        "title": "TaskState"
      },
      "TaskStep": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "is_finished": {
            "type": "boolean",
            "title": "Is Finished"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "What the step does, in Markdown. Lists leave it out; get the task to read it."
          },
          "description_options": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description Options",
            "description": "The answers the step's description offers when it is a question. Null when `description` is."
          },
          "description_is_multi_choice": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description Is Multi Choice",
            "description": "True when more than one of `description_options` may be chosen. Null when `description` is."
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind",
            "description": "The kind of step the agent planned; an empty string when it gave none. Lists leave it out."
          },
          "after": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "After",
            "description": "The numbers of the steps this step waits for. Lists leave it out."
          }
        },
        "type": "object",
        "required": [
          "number",
          "title",
          "is_finished",
          "description",
          "description_options",
          "description_is_multi_choice",
          "kind",
          "after"
        ],
        "title": "TaskStep"
      },
      "TaskSuggestedRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id",
            "description": "The person the agent suggests it to."
          },
          "markdown": {
            "type": "string",
            "title": "Markdown"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "markdown"
        ],
        "title": "TaskSuggestedRequest"
      },
      "Team": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "Team"
      },
      "TeamAgent": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The agent's id."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "TeamAgent"
      },
      "TeamAgentUse": {
        "properties": {
          "holder_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Holder Name",
            "description": "The teammate whose connection your team's agents use; null when nobody's is shared."
          },
          "holder_is_you": {
            "type": "boolean",
            "title": "Holder Is You"
          },
          "agents": {
            "items": {
              "$ref": "#/components/schemas/TeamAgent"
            },
            "type": "array",
            "title": "Agents",
            "description": "Your team's agents that use connected apps and that you can open."
          },
          "other_agent_count": {
            "type": "integer",
            "title": "Other Agent Count",
            "description": "How many more of your team's agents use connected apps that you cannot open."
          }
        },
        "type": "object",
        "required": [
          "holder_name",
          "holder_is_you",
          "agents",
          "other_agent_count"
        ],
        "title": "TeamAgentUse"
      },
      "TeamMember": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "$ref": "#/components/schemas/TeamMemberRole"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "email",
          "name",
          "role"
        ],
        "title": "TeamMember"
      },
      "TeamMemberList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TeamMember"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "TeamMemberList"
      },
      "TeamMemberRole": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "manager",
          "member"
        ],
        "title": "TeamMemberRole"
      },
      "TextLinesCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "text_lines",
            "title": "Kind",
            "default": "text_lines"
          },
          "passages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Passages"
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "first_line": {
            "type": "integer",
            "title": "First Line"
          },
          "last_line": {
            "type": "integer",
            "title": "Last Line"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "passages",
          "file_id",
          "filename",
          "first_line",
          "last_line",
          "heading"
        ],
        "title": "TextLinesCitationView"
      },
      "UpdateAgentPropertiesRequest": {
        "properties": {
          "properties": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Properties",
            "description": "Values to set by property id; null clears a property. Properties you leave out keep their values."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "properties"
        ],
        "title": "UpdateAgentPropertiesRequest"
      },
      "UpdateAgentRequest": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "At most 100 characters."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "At most 1000 characters. Set to null to clear it."
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9._:@|/-]{1,256}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "Set to null to clear it."
          },
          "time_zone": {
            "type": "string",
            "title": "Time Zone"
          },
          "capabilities": {
            "$ref": "#/components/schemas/CapabilitiesUpdate",
            "title": "Capabilities",
            "description": "Only the capabilities you send change."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateAgentRequest"
      },
      "UpdateAgentShareRequest": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "read",
              "write"
            ],
            "title": "Role"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "role"
        ],
        "title": "UpdateAgentShareRequest"
      },
      "UpdateCompanyAlertsRequest": {
        "properties": {
          "min_delivery_interval_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Delivery Interval Seconds",
            "description": "0 as they happen, 3600 hourly, 86400 daily, 604800 weekly."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateCompanyAlertsRequest"
      },
      "UpdateEmailAllowlistRequest": {
        "properties": {
          "addresses": {
            "items": {
              "$ref": "#/components/schemas/EmailAllowlistEntry"
            },
            "type": "array",
            "title": "Addresses",
            "description": "The whole address list; an empty list clears it."
          },
          "domains": {
            "items": {
              "$ref": "#/components/schemas/EmailAllowlistEntry"
            },
            "type": "array",
            "title": "Domains",
            "description": "The whole domain list; an empty list clears it."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "addresses",
          "domains"
        ],
        "title": "UpdateEmailAllowlistRequest"
      },
      "UpdateFileRequest": {
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "title": "Path",
            "description": "The new path. A different folder moves the file; a different name renames it."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "path"
        ],
        "title": "UpdateFileRequest"
      },
      "UpdateProjectRequest": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Unique among the agent's projects, and without a `/`. The project's folder keeps its name."
          },
          "description": {
            "type": "string",
            "title": "Description"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateProjectRequest"
      },
      "UpdateScheduleRequest": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name"
          },
          "instruction": {
            "type": "string",
            "minLength": 1,
            "title": "Instruction",
            "description": "What the agent does at each run, in Markdown."
          },
          "cron": {
            "type": "string",
            "title": "Cron",
            "description": "A five-field cron expression, read in `time_zone`. A schedule runs at most once an hour."
          },
          "time_zone": {
            "type": "string",
            "title": "Time Zone",
            "description": "IANA time zone the cron is read in."
          },
          "is_live": {
            "type": "boolean",
            "title": "Is Live",
            "description": "False pauses the schedule; true resumes it."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateScheduleRequest"
      },
      "UpdateWatchedCompanyRequest": {
        "properties": {
          "event_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "earnings",
                    "other",
                    "filing_published",
                    "news",
                    "prediction_market",
                    "government_record"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Types",
            "description": "The kinds of event the agent hears of. An empty list means the default: `earnings`, `filing_published` and `other`."
          },
          "filing_form_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filing Form Types",
            "description": "With `filing_published`: only these filing forms, such as `10-K` and `8-K`. An empty list means every form."
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateWatchedCompanyRequest"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VerbatimPhrase": {
        "properties": {
          "kind": {
            "type": "string",
            "const": "verbatim",
            "title": "Kind",
            "default": "verbatim"
          },
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "VerbatimPhrase"
      },
      "VersionChangeKind": {
        "type": "string",
        "enum": [
          "restore",
          "upload",
          "window",
          "agent_step",
          "rename"
        ],
        "title": "VersionChangeKind"
      },
      "Visibility": {
        "type": "string",
        "enum": [
          "public",
          "shared",
          "private"
        ],
        "title": "Visibility"
      },
      "WatchCompanyRequest": {
        "properties": {
          "company_id": {
            "type": "string",
            "title": "Company Id",
            "description": "The company's id, a UUID that search returns."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The company's name, as search returns it."
          },
          "event_types": {
            "items": {
              "type": "string",
              "enum": [
                "earnings",
                "other",
                "filing_published",
                "news",
                "prediction_market",
                "government_record"
              ]
            },
            "type": "array",
            "title": "Event Types",
            "description": "The kinds of event the agent hears of. An empty list means the default: `earnings`, `filing_published` and `other`."
          },
          "filing_form_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Filing Form Types",
            "description": "With `filing_published`: only these filing forms, such as `10-K` and `8-K`. An empty list means every form."
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "company_id",
          "name"
        ],
        "title": "WatchCompanyRequest"
      },
      "WatchedCompanies": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WatchedCompany"
            },
            "type": "array",
            "title": "Data"
          },
          "alerts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyAlerts"
              },
              {
                "type": "null"
              }
            ],
            "description": "How events are delivered; null until the agent watches its first company."
          }
        },
        "type": "object",
        "required": [
          "data",
          "alerts"
        ],
        "title": "WatchedCompanies"
      },
      "WatchedCompany": {
        "properties": {
          "company_id": {
            "type": "string",
            "title": "Company Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "event_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Event Types",
            "description": "The kinds of event the agent hears of. An empty list means the default: `earnings`, `filing_published` and `other`."
          },
          "filing_form_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Filing Form Types",
            "description": "With `filing_published`: only these filing forms, such as `10-K` and `8-K`. An empty list means every form."
          },
          "note": {
            "type": "string",
            "title": "Note",
            "description": "What you care about in its events; the agent reads it."
          },
          "added_at": {
            "type": "string",
            "format": "date-time",
            "title": "Added At"
          },
          "added_at_ns": {
            "type": "integer",
            "title": "Added At Ns",
            "description": "`added_at` in nanoseconds since the Unix epoch, as stored."
          }
        },
        "type": "object",
        "required": [
          "company_id",
          "name",
          "event_types",
          "filing_form_types",
          "note",
          "added_at",
          "added_at_ns"
        ],
        "title": "WatchedCompany"
      },
      "WebPageCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "web_page",
            "title": "Kind",
            "default": "web_page"
          },
          "passages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Passages"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "passages",
          "url",
          "title",
          "heading"
        ],
        "title": "WebPageCitationView"
      },
      "XPostCitationView": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "compound_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compound Url"
          },
          "kind": {
            "type": "string",
            "const": "x_post",
            "title": "Kind",
            "default": "x_post"
          },
          "passages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Passages"
          },
          "author_handle": {
            "type": "string",
            "title": "Author Handle"
          },
          "posted_at": {
            "type": "string",
            "title": "Posted At"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "heading": {
            "$ref": "#/components/schemas/CitationViewName"
          }
        },
        "type": "object",
        "required": [
          "passages",
          "author_handle",
          "posted_at",
          "url",
          "heading"
        ],
        "title": "XPostCitationView"
      },
      "ProposedTaskBody": {
        "properties": {
          "markdown": {
            "title": "Markdown",
            "type": "string"
          },
          "options": {
            "items": {
              "type": "string"
            },
            "title": "Options",
            "type": "array"
          },
          "is_multi_choice": {
            "title": "Is Multi Choice",
            "type": "boolean"
          }
        },
        "required": [
          "markdown",
          "options",
          "is_multi_choice"
        ],
        "title": "ProposedTaskBody",
        "type": "object"
      },
      "TaskSummary": {
        "properties": {
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/TaskState"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "state_changed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State Changed At"
          },
          "body": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProposedTaskBody"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the task would do, while it is proposed; null in every other state."
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/TaskSummaryStep"
            },
            "title": "Steps",
            "type": "array"
          },
          "bodies_digest": {
            "description": "Changes whenever the task's request or one of its steps is rewritten.",
            "title": "Bodies Digest",
            "type": "string"
          },
          "effort": {
            "$ref": "#/components/schemas/TaskEffort"
          },
          "schedule_firings": {
            "description": "The schedule runs that opened the task or were added to it.",
            "items": {
              "$ref": "#/components/schemas/TaskScheduleFiring"
            },
            "title": "Schedule Firings",
            "type": "array"
          },
          "shown_file_ids": {
            "description": "The files the task shows as its results.",
            "items": {
              "type": "string"
            },
            "title": "Shown File Ids",
            "type": "array"
          },
          "request_message_ids": {
            "description": "The short_ids of the messages the task takes on.",
            "items": {
              "type": "string"
            },
            "title": "Request Message Ids",
            "type": "array"
          }
        },
        "required": [
          "number",
          "title",
          "state",
          "project_id",
          "created_at",
          "updated_at",
          "state_changed_at",
          "body",
          "steps",
          "bodies_digest",
          "effort",
          "schedule_firings",
          "shown_file_ids",
          "request_message_ids"
        ],
        "title": "TaskSummary",
        "type": "object"
      },
      "TaskSummaryStep": {
        "properties": {
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "is_finished": {
            "title": "Is Finished",
            "type": "boolean"
          }
        },
        "required": [
          "number",
          "title",
          "is_finished"
        ],
        "title": "TaskSummaryStep",
        "type": "object"
      },
      "AgentSnapshot": {
        "properties": {
          "cursor": {
            "description": "Pass as `cursor` when you reconnect, to receive what happened since.",
            "title": "Cursor",
            "type": "string"
          },
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "tasks": {
            "description": "Every open task and the most recently finished ones.",
            "items": {
              "$ref": "#/components/schemas/TaskSummary"
            },
            "title": "Tasks",
            "type": "array"
          },
          "proposals": {
            "items": {
              "$ref": "#/components/schemas/Proposal"
            },
            "title": "Proposals",
            "type": "array"
          },
          "messages": {
            "description": "The newest messages, newest first.",
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "title": "Messages",
            "type": "array"
          },
          "activity": {
            "description": "Recent operations, oldest first.",
            "items": {
              "$ref": "#/components/schemas/Activity"
            },
            "title": "Activity",
            "type": "array"
          },
          "out_of_credit": {
            "description": "True while the agent is paused because its account has no credit.",
            "title": "Out Of Credit",
            "type": "boolean"
          },
          "daily_limit_reached_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day the agent reached its daily spending limit, while it is paused for it.",
            "title": "Daily Limit Reached On"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/Project"
            },
            "title": "Projects",
            "type": "array"
          },
          "schedules": {
            "items": {
              "$ref": "#/components/schemas/Schedule"
            },
            "title": "Schedules",
            "type": "array"
          },
          "has_more_messages": {
            "description": "True when the conversation holds older messages than `messages`; read them with `GET /v1/agents/{agent_id}/messages`.",
            "title": "Has More Messages",
            "type": "boolean"
          }
        },
        "required": [
          "cursor",
          "agent_id",
          "tasks",
          "proposals",
          "messages",
          "activity",
          "out_of_credit",
          "daily_limit_reached_on",
          "projects",
          "schedules",
          "has_more_messages"
        ],
        "title": "AgentSnapshot",
        "type": "object"
      },
      "AgentComment": {
        "properties": {
          "comment_id": {
            "title": "Comment Id",
            "type": "string"
          },
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "file_id": {
            "title": "File Id",
            "type": "string"
          },
          "file_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The file version the comment is on.",
            "title": "File Version"
          },
          "anchor": {
            "description": "Where in the file the comment is.",
            "discriminator": {
              "mapping": {
                "deck_shape": "#/components/schemas/DeckShapeAnchor",
                "doc_chunk": "#/components/schemas/DocChunkAnchor",
                "file": "#/components/schemas/FileAnchor",
                "pdf_region": "#/components/schemas/PdfRegionAnchor",
                "sheet_range": "#/components/schemas/SheetRangeAnchor"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/SheetRangeAnchor"
              },
              {
                "$ref": "#/components/schemas/DocChunkAnchor"
              },
              {
                "$ref": "#/components/schemas/DeckShapeAnchor"
              },
              {
                "$ref": "#/components/schemas/PdfRegionAnchor"
              },
              {
                "$ref": "#/components/schemas/FileAnchor"
              }
            ],
            "title": "Anchor"
          },
          "snapshot": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The text the comment was anchored to when it was made.",
            "title": "Snapshot"
          },
          "entries": {
            "description": "The comment and its replies, oldest first.",
            "items": {
              "$ref": "#/components/schemas/AgentCommentEntry"
            },
            "title": "Entries",
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/CommentStatus"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "resolved_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved By"
          },
          "mentions": {
            "items": {
              "$ref": "#/components/schemas/MessageMention"
            },
            "title": "Mentions",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "revision": {
            "title": "Revision",
            "type": "integer"
          }
        },
        "required": [
          "comment_id",
          "agent_id",
          "file_id",
          "file_version",
          "anchor",
          "snapshot",
          "entries",
          "status",
          "resolved_at",
          "resolved_by",
          "mentions",
          "created_at",
          "updated_at",
          "revision"
        ],
        "title": "AgentComment",
        "type": "object"
      },
      "AgentCommentEntry": {
        "properties": {
          "entry_id": {
            "title": "Entry Id",
            "type": "string"
          },
          "author_type": {
            "$ref": "#/components/schemas/AuthorType"
          },
          "author_id": {
            "title": "Author Id",
            "type": "string"
          },
          "author_name": {
            "title": "Author Name",
            "type": "string"
          },
          "markdown": {
            "title": "Markdown",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "reactions": {
            "items": {
              "$ref": "#/components/schemas/MessageReaction"
            },
            "title": "Reactions",
            "type": "array"
          },
          "mentions": {
            "items": {
              "$ref": "#/components/schemas/MessageMention"
            },
            "title": "Mentions",
            "type": "array"
          }
        },
        "required": [
          "entry_id",
          "author_type",
          "author_id",
          "author_name",
          "markdown",
          "created_at",
          "reactions",
          "mentions"
        ],
        "title": "AgentCommentEntry",
        "type": "object"
      },
      "AgentCompanyEvent": {
        "properties": {
          "entity_id": {
            "description": "The company the event is about.",
            "title": "Entity Id",
            "type": "string"
          },
          "event_type": {
            "description": "What happened, for example `earnings`.",
            "title": "Event Type",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "date": {
            "title": "Date",
            "type": "string"
          },
          "event_key": {
            "title": "Event Key",
            "type": "string"
          },
          "ref": {
            "description": "The public-data record the event comes from.",
            "title": "Ref",
            "type": "string"
          },
          "document_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Label"
          }
        },
        "required": [
          "entity_id",
          "event_type",
          "title",
          "date",
          "event_key",
          "ref",
          "document_label"
        ],
        "title": "AgentCompanyEvent",
        "type": "object"
      },
      "AgentEmailMessage": {
        "properties": {
          "message_id": {
            "title": "Message Id",
            "type": "string"
          },
          "from_address": {
            "title": "From Address",
            "type": "string"
          }
        },
        "required": [
          "message_id",
          "from_address"
        ],
        "title": "AgentEmailMessage",
        "type": "object"
      },
      "AgentEmailThread": {
        "properties": {
          "thread_id": {
            "title": "Thread Id",
            "type": "string"
          },
          "subject": {
            "title": "Subject",
            "type": "string"
          },
          "last_message_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Message At"
          },
          "unread": {
            "title": "Unread",
            "type": "boolean"
          },
          "participants": {
            "items": {
              "type": "string"
            },
            "title": "Participants",
            "type": "array"
          },
          "latest_message": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentEmailMessage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "thread_id",
          "subject",
          "last_message_at",
          "unread",
          "participants",
          "latest_message"
        ],
        "title": "AgentEmailThread",
        "type": "object"
      },
      "AgentFileChange": {
        "properties": {
          "file_id": {
            "title": "File Id",
            "type": "string"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "version_number": {
            "title": "Version Number",
            "type": "integer"
          },
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "blob_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blob Id"
          },
          "byte_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Byte Size"
          },
          "internal_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InternalFileType"
              },
              {
                "type": "null"
              }
            ],
            "description": "What Compound made the file for, when it is one of its own files."
          },
          "created_at_millisecs": {
            "title": "Created At Millisecs",
            "type": "integer"
          },
          "by_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The person who wrote this version.",
            "title": "By User Id"
          },
          "by_author_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuthorType"
              },
              {
                "type": "null"
              }
            ]
          },
          "thread_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thread Id"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The message whose work wrote this version.",
            "title": "Message Id"
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id"
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The web address the file came from.",
            "title": "Source Url"
          },
          "expansion_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExpansionStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "For an archive or mail file: how far unpacking it has got."
          },
          "to_rev": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Rev"
          },
          "change_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VersionChangeKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name given to this version.",
            "title": "Name"
          },
          "restored_from_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Restored From Version"
          }
        },
        "required": [
          "file_id",
          "filename",
          "version_number",
          "agent_id",
          "blob_id",
          "byte_size",
          "internal_type",
          "created_at_millisecs",
          "by_user_id",
          "by_author_type",
          "thread_id",
          "message_id",
          "task_id",
          "source_url",
          "expansion_status",
          "to_rev",
          "change_kind",
          "name",
          "restored_from_version"
        ],
        "title": "AgentFileChange",
        "type": "object"
      },
      "AgentReadMark": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ReadSubjectKind",
            "description": "What was read: a chat or a comment thread."
          },
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "scope_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Id"
          },
          "subject_id": {
            "description": "The chat or comment thread read.",
            "title": "Subject Id",
            "type": "string"
          },
          "item_id": {
            "description": "The last message read in it.",
            "title": "Item Id",
            "type": "string"
          },
          "read_through_ms": {
            "description": "When that message was written, in milliseconds since the epoch.",
            "title": "Read Through Ms",
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "agent_id",
          "scope_id",
          "subject_id",
          "item_id",
          "read_through_ms"
        ],
        "title": "AgentReadMark",
        "type": "object"
      },
      "AgentTyping": {
        "properties": {
          "author_id": {
            "title": "Author Id",
            "type": "string"
          },
          "author_name": {
            "title": "Author Name",
            "type": "string"
          },
          "task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The task whose conversation they are typing in; null for the main chat.",
            "title": "Task Number"
          },
          "until": {
            "description": "When the typing indicator expires.",
            "format": "date-time",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "author_id",
          "author_name",
          "task_number",
          "until"
        ],
        "title": "AgentTyping",
        "type": "object"
      },
      "CommentStatus": {
        "enum": [
          "open",
          "resolved"
        ],
        "title": "CommentStatus",
        "type": "string"
      },
      "ReadSubjectKind": {
        "enum": [
          "comment_thread",
          "chat"
        ],
        "title": "ReadSubjectKind",
        "type": "string"
      },
      "AgentEvent": {
        "properties": {
          "cursor": {
            "description": "Pass as `cursor` when you reconnect, to continue after this event.",
            "title": "Cursor",
            "type": "string"
          },
          "type": {
            "description": "Which field carries the event: `task`, `message`, `activity`, `proposal`, `project`, `typing`, `comment`, `email`, `company_event`, `notification` and `read_mark` carry the new or changed object; `task_removed` carries `task_number`, `proposal_removed` carries `proposal_id`, `project_removed` carries `project_id`, `comment_removed` carries `comment_id`; `schedule` and `schedule_removed` carry `schedule` and `schedule_number`; `file` and `file_removed` carry `file`; `credit` carries `out_of_credit`; `daily_limit` carries `daily_limit_reached_on`. `workbook_patch_gap` carries nothing: reload the open workbooks.",
            "enum": [
              "task",
              "task_removed",
              "message",
              "activity",
              "proposal",
              "proposal_removed",
              "credit",
              "daily_limit",
              "project",
              "project_removed",
              "schedule",
              "schedule_removed",
              "typing",
              "file",
              "file_removed",
              "workbook_patch_gap",
              "comment",
              "comment_removed",
              "email",
              "company_event",
              "notification",
              "read_mark"
            ],
            "title": "Type",
            "type": "string"
          },
          "event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The event's id in the agent's stream; null on `workbook_patch_gap`.",
            "title": "Event Id"
          },
          "task": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskSummary"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "task_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Task Number"
          },
          "message": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Message"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "activity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Activity"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "proposal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Proposal"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "proposal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Proposal Id"
          },
          "out_of_credit": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Out Of Credit"
          },
          "daily_limit_reached_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Daily Limit Reached On"
          },
          "project": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Project"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Project Id"
          },
          "schedule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schedule"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "schedule_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Schedule Number"
          },
          "typing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentTyping"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "file": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentFileChange"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "comment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentComment"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "comment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Comment Id"
          },
          "email": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentEmailThread"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "company_event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentCompanyEvent"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "notification": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Notification"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "read_mark": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentReadMark"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "required": [
          "cursor",
          "type"
        ],
        "title": "AgentEvent",
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "An organization API key (`cpd_...`) or a `compound login` session token."
      }
    }
  },
  "tags": [
    {
      "name": "Account",
      "description": "The account a request is authenticated as."
    },
    {
      "name": "Agents",
      "description": "Agents and their settings. Each agent has its own files, conversation and tasks."
    },
    {
      "name": "Projects",
      "description": "An agent's projects. Each project groups tasks and keeps its files in one folder."
    },
    {
      "name": "Schedules",
      "description": "Instructions an agent runs on a recurring cadence. Each run opens a task."
    },
    {
      "name": "Tasks",
      "description": "The work an agent takes on: list and read tasks, accept, pause or archive them, and share them."
    },
    {
      "name": "Inbox",
      "description": "The emails in an agent's inbox."
    },
    {
      "name": "Notifications",
      "description": "Mentions, comments, access requests and task updates waiting on you."
    },
    {
      "name": "Companies",
      "description": "Company data, and the companies an agent watches for earnings, filings and news."
    },
    {
      "name": "Usage",
      "description": "Your credits and spend, and your billing portal."
    },
    {
      "name": "Support",
      "description": "Requests to the Compound team."
    },
    {
      "name": "Sharing",
      "description": "Who can open an agent, and what other people shared with you."
    },
    {
      "name": "Team",
      "description": "Your team, its members and the custom properties its admins define for agents."
    },
    {
      "name": "Connections",
      "description": "Apps you connect to Compound, which your agents can use when their `connectors` capability is on."
    },
    {
      "name": "Conversation",
      "description": "Talk to an agent, follow what it does as it happens, and rule on what it proposes."
    },
    {
      "name": "Files",
      "description": "An agent's files: upload, download, export, move, share by link, sign and delete. File bytes move through signed URLs, never through this API."
    },
    {
      "name": "Comments",
      "description": "Comments on an agent's files. The agent reads new comments and replies and picks up the work."
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ]
}
