Skip to content
Naveen Raj edited this page Apr 11, 2026 · 1 revision

Vault

The Vault is a persistent file directory (data/vault/) that acts as shared storage for all agents. Agents can create, read, update, and share files across sessions and orchestration runs.


What the Vault Is For

  • Passing data between agents — one agent writes a report, another reads and summarizes it
  • Persisting results — save research, analysis, or generated content for later use
  • Storing templates and guides — inject documents into agent system prompts
  • Sharing files across sessions — data survives conversation restarts

Managing Files in the UI

Open Settings → Vault to access the built-in file explorer:

  • Create .md, .json, and .txt files
  • Edit with a full-featured Markdown and JSON editor
  • Delete files and directories
  • Browse the vault directory tree

Using Vault Files in Prompts (@ Mentions)

Type @ in any prompt field to inject vault files into agent context:

@[reports/analysis.md]

The UI provides an intelligent dropdown that searches the vault as you type. The file contents are embedded inline at runtime.

Use this to:

  • Give agents access to reference documents in their system prompt
  • Inject dynamic templates into orchestration steps
  • Share structured data (JSON schemas, configuration) with agents

Vault Tools (Agent Access)

Agents access the vault via built-in tool functions:

Tool Description
vault_write(path, content) Create or overwrite a file
vault_read(path) Read a file's contents
vault_list(path) List files in a directory
vault_patch(path, operation) Apply a partial update without overwriting

Patch Operations

vault_patch supports two built-in operations:

JSON deep-merge — merge a partial object into an existing JSON file:

{ "op": "merge", "data": { "status": "done", "count": 42 } }

Text find-replace — replace a specific string in a text/markdown file:

{ "op": "replace", "find": "PLACEHOLDER", "replace": "Actual content" }

Vault in the Sandbox

When agents use the Python Sandbox tool, they can also read and write vault files from within Python code:

# Read a vault file
with open("/vault/data/results.json") as f:
    data = json.load(f)

# Write a chart to vault
plt.savefig("/vault/reports/chart.png")

The vault directory is mounted into the sandbox container automatically.


Vault File Organization Tips

Organize vault files into subdirectories to keep things manageable:

vault/
  reports/        Generated research and analysis
  templates/      Reusable prompt templates
  data/           Input data files (CSV, JSON)
  output/         Final deliverables
  config/         Agent configuration and reference docs

See Also

  • Built-in Tools — full list of vault tool functions
  • Agents — using @ mentions in system prompts
  • Orchestration — passing vault files between orchestration steps

Clone this wiki locally