Manage Agent Context

Updated at:

Extend the data accessible to an agent during a session by mounting resources. Resources are managed independently and can be reused across multiple sessions.

Mounting Resources

Mounting resources is the only context-related capability that operates independently of session management. Once created via the console or API, resources can be mounted to one or more sessions — their lifecycle is decoupled from that of any session.

Resource TypeDescription
File Upload and MountFiles uploaded to the platform; when mounted, they appear as copies at a specified path inside the session sandbox. Individual files must not exceed 50 MB.
Memory StoreA persistent path-based file tree; the agent reads and writes it with file tools after mounting, and its content persists across sessions.

Relationship Between Resources and Sessions

When Resources Are Mounted

  • At Session Creation: Specify a list of resources and their mount paths in the resources field.
  • At Runtime: Append additional resources using a POST request to /sessions/{session_id}/resources. Changes take effect immediately without requiring a session restart. Files support this method; memory stores can only be mounted at session creation and cannot be added, removed, or changed afterwards.

Path Conventions

Mounted resources are placed under the /mnt prefix:

  • File mounts live under /mnt/session/uploads, with the path filled in manually.
  • Memory stores are mounted at /mnt/memory/<name>, where the path is generated by the server from the store name.

You may reference the full path directly in the system prompt, enabling the agent to access the resource via tools.

Session Isolation

When a file is mounted, the platform internally copies it into the session's sandbox. Modifications made within a session do not affect the original resource or other sessions that have mounted the same resource. Memory stores are not copied: edits through a read-write mount write back to the store for reuse by later sessions; read-only mounts never modify the store.

Next Steps