---
title: "Give Deep Agents a Searchable Filesystem on MongoDB Atlas"
description: "A multi-agent pipeline with a coordinator, three search sub-agents, and a reconciler searches a 2,900-page, 45-file federal docket on room air cleaner efficiency standards from the U.S. Department of Energy using a virtual filesystem on MongoDB Atlas. The VFS backend routes search operations like glob and grep to Atlas Search and Vector Search, where $rankFusion combines full-text and vector results natively in a single database-side query, while S3 holds the original bytes as the source of truth. A polling watcher keeps the Atlas index aligned with S3 bucket changes. Agents work incrementally through ls, glob, grep, read, write, and edit operations without loading the entire corpus into their context window. The pipeline can be interrupted and resumes from the last completed stage using saved run state, costing $2 to $5 in API calls over about 45 minutes."
---

# Give Deep Agents a Searchable Filesystem on MongoDB Atlas

[MongoDB](https://yomu.fyi/company/mongodb) · Oct 26, 2026

**Type:** Tutorial

## Summary

A multi-agent pipeline with a coordinator, three search sub-agents, and a reconciler searches a 2,900-page, 45-file federal docket on room air cleaner efficiency standards from the U.S. Department of Energy using a virtual filesystem on MongoDB Atlas. The VFS backend routes search operations like glob and grep to Atlas Search and Vector Search, where $rankFusion combines full-text and vector results natively in a single database-side query, while S3 holds the original bytes as the source of truth. A polling watcher keeps the Atlas index aligned with S3 bucket changes. Agents work incrementally through ls, glob, grep, read, write, and edit operations without loading the entire corpus into their context window. The pipeline can be interrupted and resumes from the last completed stage using saved run state, costing $2 to $5 in API calls over about 45 minutes.

## Context

A virtual filesystem abstracts storage paths so agents see directories and files regardless of where bytes are stored. LangChain Deep Agents is an agent harness for complex multi-step work using filesystem-oriented tools like ls, glob, grep, read, write, and edit. The MongoDB VFS backend implements that contract, routing search operations to Atlas Search and Vector Search with hybrid ranking via $rankFusion, and keeping file bytes in S3 object storage. A watcher keeps the index aligned with the bucket.

## Approach / What changed

Set up a MongoDB Atlas cluster (version 8.1+), an S3 bucket with appropriate IAM permissions, and an embedding provider (Bedrock or OpenAI). Install the langchain-mongodb-deepagents-vfs package and seed the corpus from the companion repository. Deploy a coordinator agent that delegates to three sub-agents sharing a virtual filesystem workspace. Use the polling watcher (or SQS watcher) to keep Atlas index synchronized with S3 changes. Configure the pipeline for interruption and resumption via run state saved in the workspace.

## Takeaways

- The MongoDB VFS backend separates search and storage: grep, glob, and ls run on Atlas Search and Vector Search, while read, write, and edit operate on S3 object storage.
- Agents work incrementally through filesystem operations without loading the entire corpus into the context window, enabling processing of large document sets like a 2,900-page docket.
- The pipeline supports interruption and resumption: it saves run state after each completed stage and can resume from the last checkpoint without redoing finished work.

## FAQ

### What persists between runs, and what doesn't?

Indexed content in Atlas and file bytes in S3 persist across runs. Files under workspace/<run\_id> are run state specific to that run and are not a general memory store for other runs.

### Why are S3 and Atlas separate systems instead of one?

Object storage is optimized for low-cost durable byte storage but does not maintain live search indexes. Atlas provides Search, Vector Search, and hybrid ranking as first-class capabilities on the same data platform.

### Is search eventually consistent?

Yes. Atlas Search and Vector Search index updates lag the S3 write by the watcher's polling interval (about 10 seconds), or closer to real time with the SQS watcher.

**Tags:** [Agents](https://yomu.fyi/topic/agents), [Deep Agents](https://yomu.fyi/topic/deep-agents), [LangChain](https://yomu.fyi/topic/langchain), [MongoDB Atlas](https://yomu.fyi/topic/mongodb-atlas), [Virtual Filesystem](https://yomu.fyi/topic/virtual-filesystem)

- Source: [MongoDB](https://www.mongodb.com/company/blog/technical/give-deep-agents-searchable-filesystem-on-atlas)
- Source URL: https://www.mongodb.com/company/blog/technical/give-deep-agents-searchable-filesystem-on-atlas
- Ingested by Yomu: 2026-10-26T15:00:21.211Z

[Read original post](https://www.mongodb.com/company/blog/technical/give-deep-agents-searchable-filesystem-on-atlas)
