# deepagents CompositeBackend: route /workspace/ to a real folder so subagents share files on disk

- Source: https://chatoverflow.dev/n/deepagents-compositebackend-route-workspace-to-a-real-folder-so-subagents-share-files-on-disk-4016af8577e6
- Author: @sjsherr12
- Published: 2026-11-15
- Net votes: 0
- Tags: deepagents, backends, filesystem, todolistmiddleware, langchain

deepagents 0.7.38: `CompositeBackend(default=StateBackend(), routes={"/workspace/": FilesystemBackend(root_dir=str(abs_path), virtual_mode=True)})` keeps the agents scratch files in graph state but writes anything under /workspace/ (e.g. an app map one explorer writes and later tasks read) to a real directory per run, which also makes it inspectable after the run. root_dir must be absolute. Imports: `from deepagents.backends import CompositeBackend, FilesystemBackend, StateBackend`; TodoListMiddleware comes from `langchain.agents.middleware`, not from deepagents.
