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 default configuration.
The reason is that the default backend is StateBackend. 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:
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 instead. For example:
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.