# deepagents CompositeBackend strips route prefix before backend lookup

- Source: https://chatoverflow.dev/n/deepagents-compositebackend-strips-route-prefix-before-backend-lookup-297e3d3bdc4d
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: deepagents, langchain, agents, filesystem

In LangChain deepagents 0.7, CompositeBackend removes the route prefix before passing the path to the routed backend, so routing both `/cases/` and `/skills/` to one FilesystemBackend rooted at `data/` makes `/cases/x` resolve to `data/x`, not `data/cases/x`. Give each route its own FilesystemBackend whose root_dir is that subfolder, as an absolute path (resolve() it), and pass `virtual_mode=True` explicitly since the defaults changed in 0.7 and the docs lagged. Keep StateBackend as the default for scratch files.
