---
title: "DeepAgents Creates a File You Can't Find"
url: 'https://mcavdar.com/blog/deepagents-creates-a-file-you-cant-find'
markdown: 'https://mcavdar.com/blog/deepagents-creates-a-file-you-cant-find.md'
date: '2026-09-22'
description: "If you're just getting started with DeepAgents, there's a behavior that can be a little confusing. You ask the agent to create a file like test.txt, it says the file was created, but then you run ls or find in your terminal and nothing. DeepAgents, this is actually expected if you're using the defa…"
taxonomy:
  tag:
    - langchain
    - langgraph
    - deepagents
    - FilesystemBackend
    - StateBackend
    - llm
    - Agentic-AI
---

# DeepAgents Creates a File You Can't Find

## [DeepAgents Creates a File You Can't Find](https://mcavdar.com/blog/deepagents-creates-a-file-you-cant-find)

    22nd Sep 2026   [langchain](https://mcavdar.com/tag:langchain#body-wrapper) [langgraph](https://mcavdar.com/tag:langgraph#body-wrapper) [deepagents](https://mcavdar.com/tag:deepagents#body-wrapper) [FilesystemBackend](https://mcavdar.com/tag:FilesystemBackend#body-wrapper) [StateBackend](https://mcavdar.com/tag:StateBackend#body-wrapper) [llm](https://mcavdar.com/tag:llm#body-wrapper) [Agentic-AI](https://mcavdar.com/tag:Agentic-AI#body-wrapper)  

If you're just getting started with [DeepAgents](https://docs.langchain.com/oss/python/deepagents/overview), there's a behavior that can be a little confusing. You ask the agent to create a file like `test.txt`, it says the file was created, but then you run `ls` or `find` in your terminal and nothing.

DeepAgents, this is actually expected if you're using the default configuration.

The reason is that the default backend is [StateBackend](https://docs.langchain.com/oss/python/deepagents/backends#quickstart). Instead of writing files directly to your computer, `StateBackend` keeps them in the agent's LangGraph state. So when the agent creates `test.txt`, that file exists from the agent's point of view, but it doesn't necessarily exist at something like `/home/you/project/test.txt` on your machine.

This also applies to DeepAgents' filesystem tools. Commands such as `ls`, `read_file`, and `write_file` work through whatever backend you've configured. With `StateBackend`, the agent can create, read, and modify files during its execution, but those files aren't automatically written to your local disk.

So if you run something like:

```bash
find / -name test.txt
```

and don't find anything, that doesn't mean the agent failed to create the file. You're just looking at a different filesystem.

If you want the agent to work with actual files in your project directory, you need to use [FilesystemBackend](https://docs.langchain.com/oss/python/deepagents/backends#filesystembackend-local-disk) instead. For example:

```python
FilesystemBackend(root_dir=Path.cwd())
```

With this setup, file operations are performed relative to your current working directory. So if the agent creates `test.txt`, you'll actually be able to see it with `ls`, open it in your editor, or access it from another process.

 [ Previous Post](https://mcavdar.com/blog/a-small-experiment-on-metas-open-research-direction)

#### Syndicate

 [ Atom 1.0](https://mcavdar.com/blog.atom) [ RSS](https://mcavdar.com/blog.rss)

---

## Navigation

- Parent: [Blog](https://mcavdar.com/index.md)
- Next: [A Small Experiment on Meta's Open Research Direction](https://mcavdar.com/blog/a-small-experiment-on-metas-open-research-direction.md)
