Your Agent should use a File System This is a hill I will die on. Every agent can use a file system. The file system is an elegant way of representing state that your agent could read into context & allowing it to verify its work. đź§µon why and examples
Claude Code was what proved this to me. Before CC, people though context windows would get long enough that you could just fit a codebase into context. But that is not how programming works. You don't need to remember everything, you just need to know how to find it.
Here's an example from my open source email agent (https://github.com/anthropic-e... Instead of dumping a ton of emails into context, I write them to a file and let the agent grep across those files. Fundamentally this works because it lets your agent have multiple passes at a problem
Some other examples of using the file system (there are tons, be creative): Memory: Your agent can search previous conversation as markdown or JSON files to find context and link to exact architecture. Creating React Artifacts: Agents make mistakes writing code, to display a
I know this is inconvenient! It would be easier if your agent could run in a lambda function. But agents are trained like humans and so we need to give them the resources & the tools that we use- like the file system. You can use the Claude Code SDK to do this.
Of course file systems are a big responsibility. As agents become more general, the problem shifts to permissions. We suggest Claude Code in a sandbox, but also have a lot of tools for settings permissions: https://docs.claude.com/en/doc... More content on hosting to come.
@trq212 Why you think that grep is better than fuzzy search in elastic?
@trq212 100p. I’m experimenting with instead of grep just sandboxed sql generation because cli is not available in a simple browser, but really wish we could emulate busybox for the ai and translate those commands into server calls while maintaining permissions.
@trq212 100%. Love it: - Unlimited storage capacity - Persistent across sessions - Searchable with grep - Human-readable JSON/Markdown - Git-trackable audit trail - Multiple agents can collaborate
@trq212 I use the memory-bank concept I learned from a Cline blog post. I don’t use Cline but it can easily be adapted
@trq212 what are your thoughts on having that state accessible in different platforms? Wouldn’t the file system on my local machine be quite limiting?
@erd0xbc Depends on your case but I suggest APIs into the platform but using the file system to store the results, especially when searching.
@trq212 Damn, I was just fighting with an agent that kept losing its scratchpad yesterday. This is exactly the solution I needed.
@trq212 rm -rf ~/
@trq212 No worries about sudo! INCREDIBLE! 🤯
@trq212 Why not MCP?
@trq212 ... just like the agents can understand clean code better than docs. I'm on your hill.
@trq212 OS has much better APIs and utility toolings around it than we can whip up with REST or whatever web APIs.
@trq212 couldn’t agree more, and think claude code should do a better job at this off the shelf, keeping context, handover, and plan in the filesystem, allowing agents to work consistently across sessions
@trq212 Yes! I discovered this using Claude projects. I have it create a table of key files, purpose, location. Then I write project instructions that forces it to reference the table when giving suggestions. Helps keep it way more grounded. Makes sense it would help CC too.
@trq212 Harrison and the LangChain team have been on championing this position for a while with “deep agents” @LangChainAI @hwchase17
@trq212 Been experimenting on a 3-phase approach: scratchpad, plan, and progress using Serena’s memory file system. each main agent and subagent access the same memory files throughout the sessions. Been working quite well so far.
@trq212 FS and Unix pipes are even better for AI-friendly working with text streams.
@trq212 You were early to this party @ashleyhindle Side-loading lots of 'context' is fine, but making it persistently available is much more useful. We've moved our internal wiki, code styling & domain documentation inside our main repo for the same reason. Shared & persistent context.
@trq212 What if your agent use a FS in memory?
@yzx396 the ability to use bash to access is it important, if you can virtualize it fully that totally works (e.g. http://webcontainers.new is kind of goated for this)
@trq212 100%. Linux commands are the best agent toolset
@trq212 This is the way.
@trq212 Seems like all agents should have a file system :)
@trq212 @_catwu @astrodotbuild what say u?
@trq212 file over app




