> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herm.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Files and workspaces

> Understand persistent agent workspace files and message attachments.

Each agent and stable `subjectId` receives an isolated persistent workspace.
The `file` and `terminal` toolsets can create and update files there, and those
files remain available to later sessions for the same agent and subject.

## Enable file tools

Configure the built-in `file` toolset on the agent:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "type": "agent_toolset",
  "configs": [
    {
      "name": "file",
      "enabled": true,
      "permissionPolicy": { "type": "always_allow" }
    }
  ]
}
```

The toolset provides `read_file`, `write_file`, `patch`, and `search_files`.
See [Built-in agent toolsets](/api-reference/tools#built-in-agent-toolsets).

## Send input files

To include a file in a turn, add a base64 `data_url` attachment to
`user.message`. Herm makes the material available to the agent for that turn.

See [Send a message with attachments](/api-reference/send-message#send-a-message-with-attachments)
for the request schema, size limits, and supported media types.

## Persistence and scope

* Workspace files are scoped to the authenticated organization, agent, and
  stable `subjectId`.
* A new session with the same scope sees the existing workspace.
* A different subject receives a different workspace.
* Agent versions do not reset a subject's workspace.

The public API does not currently expose a general file list, upload, or
download resource. Use message attachments for turn inputs and agent file tools
for workspace operations.
