Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions build/agents/build-your-agent/agent-triggers/filesystem-sync.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: 'Filesystem sync triggers'
description: 'Trigger an agent automatically when files are written to your project memory or personal files volume'
sidebarTitle: 'Filesystem sync'
---

Filesystem sync triggers watch for file writes in your project's shared memory volume or your personal files volume, then automatically send the file's metadata and content to a designated agent. This lets you build agents that react to file activity without polling or manual input.

## How it works

When a file is written to a watched volume, the trigger fires and sends the following to your agent as a message:

- File metadata (name, path, size, last modified time)
- File content, up to 100KB for text files

If the same file is written to multiple times, each subsequent write continues the same conversation thread rather than opening a new one. This keeps all activity for a single file in a coherent conversation history.

## Setting up a filesystem sync trigger

1. Navigate to your agent and click **Triggers** in the sidebar
2. Click **Add trigger**
3. Select **Filesystem sync** from the available options
4. Choose the volume to watch:
- **Shared memory volume** — files stored in your project's shared memory, accessible to all project members
- **Personal files volume** — files stored in your own personal files area
5. Optionally configure glob patterns to filter which files trigger the sync (see [Filtering files with glob patterns](#filtering-files-with-glob-patterns))
6. Save the trigger

## Filtering files with glob patterns

By default, any file write to the watched volume triggers the sync. You can narrow this down using glob patterns.

- **Include patterns** — only files matching these patterns trigger the sync (e.g., `**/*.pdf` to watch only PDF files)
- **Exclude patterns** — files matching these patterns are ignored even if they also match an include pattern (e.g., `**/tmp/**` to skip temporary files)

If both include and exclude patterns are configured, a file must match an include pattern and not match any exclude pattern to trigger the sync.

<Accordion title="Glob pattern examples">
| Pattern | Matches |
| --- | --- |
| `**/*.csv` | Any CSV file in any subfolder |
| `reports/**` | All files inside a `reports/` directory |
| `**/tmp/**` | Any file inside a `tmp/` directory |
| `invoices/2025-*.pdf` | PDF files in `invoices/` whose names start with `2025-` |
</Accordion>

## Access controls

- **Shared memory volume**: only file writes made by the user who created the sync trigger cause the sync to fire. Writes by other project members do not trigger it.
- **Personal files volume**: only the owner of the personal files volume can create a sync on it, and only their own writes trigger the sync.

## Frequently asked questions (FAQs)

<AccordionGroup>
<Accordion title="What happens when the same file is written to multiple times?">
Each write to the same file appends a new message to the existing conversation thread for that file. This keeps all activity related to a single file in one continuous thread rather than creating separate conversations.
</Accordion>
<Accordion title="Is there a file size limit?">
Text file content is sent to the agent up to 100KB per file write. Files larger than 100KB will have their content truncated; file metadata is always sent in full regardless of file size.
</Accordion>
<Accordion title="Can other team members' file writes trigger my sync?">
No. Only file writes made by the user who created the sync trigger cause it to fire, even when watching the shared memory volume.
</Accordion>
<Accordion title="Can I watch both volumes with a single trigger?">
No. Each filesystem sync trigger watches one volume. Create a separate trigger for each volume if you need to watch both.
</Accordion>
<Accordion title="Do glob patterns affect the exclude list independently?">
Yes. If you configure both include and exclude patterns, a file triggers the sync only when it matches at least one include pattern and does not match any exclude pattern. Exclude patterns always take precedence.
</Accordion>
</AccordionGroup>
7 changes: 7 additions & 0 deletions build/agents/build-your-agent/triggers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
sidebarTitle: "Triggers"
---

![](/images/agent/triggers1.png)

Check failure on line 6 in build/agents/build-your-agent/triggers.mdx

View workflow job for this annotation

GitHub Actions / Documentation Lint Checks

Image has no alt text — add a short description of what the image shows inside the brackets, e.g. ![The agent configuration panel](path). [technical: empty alt attribute detected in markdown image syntax ![](path)]

Triggers allow your Agent to start workflows automatically based on specific events. For example, connecting a Gmail trigger will let your Agent process each new email as soon as it arrives in your inbox. Based on your **Prompt** instructions, the Agent can then take action whenever an email "triggers" it.

Expand Down Expand Up @@ -58,7 +58,7 @@

### Common use cases for pausing triggers

- **Testing**: Pause production triggers while testing changes to your agent

Check warning on line 61 in build/agents/build-your-agent/triggers.mdx

View workflow job for this annotation

GitHub Actions / Documentation Lint Checks

5 settings listed as bullet points — consider using a table instead so they're easier to scan. [technical: 5 consecutive bullet items matching **Key**: value or **Key** — value pattern]
- **Maintenance**: Temporarily disable triggers during system updates or configuration changes
- **Cost control**: Pause high-volume triggers during periods when you don't need them active
- **Debugging**: Isolate specific triggers to troubleshoot issues
Expand Down Expand Up @@ -88,6 +88,12 @@
<Card title="Tools as Triggers" href="/build/agents/build-your-agent/agent-triggers/tools-as-triggers">Use a specific Tool to trigger your Agent.</Card>
</Columns>

### Filesystem sync triggers

Watch for file writes in your project's shared memory volume or personal files volume and send file content to your Agent automatically.

<Card title="Filesystem sync" href="/build/agents/build-your-agent/agent-triggers/filesystem-sync">Trigger your Agent when files are written to a watched volume.</Card>

## Choosing the right trigger

| I want to... | Use this trigger |
Expand All @@ -99,6 +105,7 @@
| Receive data from my own app or website | **Webhook Trigger** |
| Trigger my agent from code I control | **SDK & API Triggers** |
| Combine data from multiple sources before triggering | **Tools as Triggers** |
| React to files written to a shared or personal volume | **Filesystem Sync Triggers** |

## Frequently asked questions (FAQs)

Expand Down
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
"build/agents/build-your-agent/agent-triggers/scheduled-triggers",
"build/agents/build-your-agent/agent-triggers/custom-webhook",
"build/agents/build-your-agent/agent-triggers/sdk-and-api-triggers",
"build/agents/build-your-agent/agent-triggers/tools-as-triggers"
"build/agents/build-your-agent/agent-triggers/tools-as-triggers",
"build/agents/build-your-agent/agent-triggers/filesystem-sync"
]
},
{
Expand Down
Loading