List agent files

SDK platic.agents.files.list()

Check which files an agent uses and which are paused or scheduled. Each result includes a file summary in file and its connection in link. You only need permission to read the agent.

Example

await platic.agents.files.list("agent_123");

Path parameters

ParameterTypeDescriptionRequired
agentIdstringAgent id✓

Query parameters

ParameterTypeDescriptionDefault
statestringOnly connections that are active or paused(all)
fileIdstringOnly the connection with that file-
limitintegerFrom 1 to 20050
pageTokenstringnextPageToken from the previous page-

Response

{
  "status": "success",
  "data": [
    {
      "link": {
        "agentId": "Xq8mTe2LwP4kZ1aB9cDf",
        "fileId": "fH3kL9mQ2xR7",
        "state": "active",
        "attachedAt": "2026-10-30T16:02:11.000Z",
        "activateOnReady": false,
        "schedule": {
          "activateAt": null,
          "pauseAt": "2026-12-01T06:00:00.000Z",
          "last": null
        }
      },
      "file": {
        "fileId": "fH3kL9mQ2xR7",
        "title": "Return policy",
        "description": "Deadlines, conditions and exceptions for returning a product.",
        "kind": "url",
        "lifecycle": "available",
        "activeVersionId": "vr_2Lp9Qs",
        "pipelineStatus": "ready",
        "latestUploadId": "up_4Tn8Vb2Kc1",
        "hasUsableContent": true,
        "sourceUrl": "https://acme.com/policies/returns",
        "refresh": {
          "intervalHours": 24,
          "nextRunAt": "2026-11-02T10:12:45.000Z",
          "lastRunAt": "2026-11-01T10:12:45.000Z",
          "lastResult": "unchanged",
          "lastError": null
        }
      }
    }
  ],
  "nextPageToken": null
}

Response fields

Each item in data carries the connection in link and a summary of the file in file. nextPageToken is null on the last page.

FieldTypeDescription
agentId, fileIdstringThe agent and the file.
statestringactive (the agent uses it) or paused (it doesn't use it, but it stays connected).
attachedAtstringWhen it was connected.
activateOnReadybooleantrue while the connection waits for ready content before activating automatically. It is always false for an active connection.
scheduleobject | nullThis agent’s activation and pause schedule; null if no schedule has ever been set.
schedule.activateAtstring | nullWhen it will activate on its own. null if nothing is pending.
schedule.pauseAtstring | nullWhen it will pause on its own.
schedule.lastobject | nullThe last thing that was applied: action (activate or pause), ranAt, outcome (applied or failed) and message (why it failed).

File fields (file)

A summary of the file: fileId, title, description, kind, lifecycle, activeVersionId, pipelineStatus, latestUploadId, sourceUrl and refresh, as in Get a file, plus:

FieldTypeDescription
hasUsableContentbooleanIt has content ready. Without it, the agent doesn't use it even if the connection is active.

Errors

Statusdetails.codeWhen
400INVALID_INPUTA parameter isn't valid. details.fields names it.
403RESOURCE_NOT_ACCESSIBLEYou can't read the agent.
404AGENT_NOT_FOUNDThe agent doesn't exist or belongs to another workspace.
409KNOWLEDGE_NOT_ENABLEDFiles aren't enabled in this workspace.

The ones that apply to all operations are in common errors.

Notes

  • Files live in the workspace and are connected to the agents that use them. They are created with Create a file or Upload a file; the workspace list carries all of them, with their fileId.
  • Connecting, pausing, resuming, scheduling or disconnecting a file applies immediately, without publishing, and doesn't create a version of the agent. The agent only uses active connections.
  • A connected file can serve several agents: changing its content or name changes it in all of them. Pausing, resuming, scheduling or disconnecting it only touches this agent.
  • The agent uses a file when the connection is active and the file has content ready.
  • To connect a file, use Connect a file. From an AI agent, the tool is list_agent_files.