Docs / Files/ How Agents Access Files

How Agents Access Files

Understanding file system access in CRHQ — what agents can read, write, and where files live.

CRHQ agents have full access to the server's file system. They can read, write, create, and manage files as part of their work.

File System Layout

Your CRHQ instance has several standard directories:

DirectoryPurposeAccess
uploads/User file uploads from sessionsRead-only for agents
public/downloads/Files served at public URLsRead/write
.scratch/Temporary work — disposableRead/write
documents/Working documents for active projectsRead/write
skills/Skill scripts and assetsRead (write for custom skills)

How Agents Use Files

Reading Files

Agents can read any file on the server. Common uses:

  • Analyzing uploaded documents
  • Reading configuration files
  • Inspecting code repositories
  • Processing data files

Writing Files

Agents can create and modify files. Common uses:

  • Generating reports and documents
  • Writing code
  • Creating data exports
  • Saving research findings

Public Downloads

Files written to public/downloads/ are accessible via URL:

https://your-instance.crhq.ai/downloads/filename.ext

This is how agents share files externally — generate a report, save it to downloads, and share the URL.

Scratch Directory

The .scratch/ directory is for temporary work. Agents use it for:

  • Intermediate processing files
  • Temporary downloads
  • Working copies before final output

Files here are disposable and may be cleaned up periodically.

File Attachments vs File System

There are two ways to get files to agents:

  • Attachments — Upload directly in a session message (good for quick sharing)
  • File system — Place files on the server for agents to access (good for large files, persistent data)

For large files or files that multiple sessions need, placing them on the file system is more efficient than uploading as attachments.