AI-Agent-First Documentation
Prompt your Agent: "Query and mutate records on the 'file' table (ID prefix 'file_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."
File (file)
A file of any type. These can be pdfs, csv, excel, images, text, videos, anything really. It is stored in an S3 bucket and can be private or publicly accessible.
Python SDK & PlatformContext Example
# 1. Query file via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM file ORDER BY created_date DESC LIMIT 25")
# 2. Create file record (Generates 'file_...' Base62 ID)
created = await platform.records.create("file", [
{"name": "Example File"}
])| Field API Name | Type / Format | Lookup Target | Flags | Description |
|---|---|---|---|---|
| id | string | — | system | Id |
| name | string | — | Name | |
| created_date | stringdate-time | — | system | Created Date |
| modified_date | stringdate-time | — | system | Modified Date |
| created_by | stringlookup | → user (string ID) | system | Created By |
| modified_by | stringlookup | → user (string ID) | system | Modified By |
| location | string | — | required | Location |
| extension | string | — | required | Extension |
| content_type | string | — | required | Content Type |
| owner | stringlookup | → user (string ID) | system | Owner |
| is_public | boolean | — | required | Is Public |
| link | stringlink | — | A link to where the file is hosted. It will require fetching through the API if it is a private file to ensure privacy is up held | |
| shared_with | listsharing | — | system | Shared With |
| vault_paths | list | — | system | Vault Paths |
| vaults | listlookup_list | → vault (string ID) | system | Vaults |
| current_version | number | — | required | Current Version |
| version_count | number | — | required | How many versions exist for this file |
| latest_version | stringlookup | → file_version (string ID) | A lookup link to the latest version record | |
| active_version | stringlookup | → file_version (string ID) | The file version that is currently considered the live, publish or valid version to use for context | |
| file_size | number | — | How big the file is in bytes | |
| tag | listmulti-select | — | Categorize files with global tags to enable multi-agent knowledge binding and querying. | |
| content | string | — | Content | |
| is_deleted | boolean | — | Is Deleted |
