Top
Best
New

Posted by jakobem 16 hours ago

FUSE is All You Need – Giving agents access to anything via filesystems(jakobemmerling.de)
173 points | 59 comments
mpweiher 12 minutes ago|
Or just implement something like storage-combinators [1][2].

Basically an abstraction that is filesystem like, but doesn't require a filesystem. Though you can both export storage-combinators as filesystem and, of course, also access filesystems via storage-combinators.

[1] https://dl.acm.org/doi/10.1145/3359591.3359729

[2] https://2019.splashcon.org/details/splash-2019-Onward-papers...

heavyset_go 15 hours ago||
IMO, for real file systems, just give a view via cgroups/namespaces.

Implementing a database abstraction as a file system for an LLM feels like an extra layer of indirection for indirection's sake: just have the LLM write some views/queries/stored procs and give it sane access permissions.

LLMs are smart enough to use databases, email, etc without needing a FUSE layer to do so, and permissions/views/etc will keep it from doing or seeing stuff it shouldn't. You'll be keeping access and permissions where they belong, and not in a FUSE layer, and you won't have to maintain a weird abstraction that's annoying/hampered with licensing issues if you want to deploy it cross platform.

Also, your simplified FUSE abstraction will not map accurately to the state of the world unless you're really comprehensive with your implementation, and at that point, you might as well be interacting directly in order to handle that state accurately.

jakobem 15 hours ago||
Agree that to far fetched mappings to files don’t really make sense. The email example is more illustrative then real world inspired, thought it might be good to show how flexible the approach is.

I think there is a gap between “real file systems” and “non file things in a database” where mapping your application representation of things to a filesystem is useful. Basically all those platforms that let users upload files for different purposes and work with them (ex Google Drive, notion, etc). In those cases representing files to an agent via a filesystem is the more intuitive and powerful interface compared to some home grown tools that the model never saw during training.

eru 12 hours ago|||
See my own https://github.com/matthiasgoergens/git-snap-fs which lets you expose all branches and all tags and all commits and all everything in a git repository as a static directory tree. No need to git checkout anything: everything is already checked out.
ximeng 15 hours ago|||
LLMs can handle Google drive perfectly well with a service account, including the Google drive specific quirks through the API. It could be helpful to expose via a file system rather than a custom API if you wanted a different interface than Google already provides, but this wouldn’t be driven by the limitations of the LLM.
jakobem 14 hours ago||
In terms of ergonomics, I’d say a filesystem is more intuitive for an agent than the Google Drive API even if it can handle both. Hard to argue without building an eval set and evaluating both, though.
ximeng 13 hours ago|||
I’ve been doing this recently and for the basics agents had no problem with the API apart from the weird behaviour of shared drives needing a special flag to handle them. This could probably be mapped to a file system in a way that wouldn’t trip up an agent, but at the expense of losing the Google drive specific functionality. A trade off, not much better or worse per se, but with the added complexity of the FUSE layer.
outofpaper 14 hours ago|||
The less juggling of concepts thr more effective any problem solver cam be.
efitz 10 hours ago||
In my experience LLMs excel at SQL.
Imustaskforhelp 8 minutes ago||
If that's the case how would the sqlite package (also part of sqlean)'s fileio work out

https://github.com/nalgeon/sqlean/blob/main/docs/fileio.md

    fileio_read - Read file contents as a blob.
    fileio_scan - Read a file line by line.
    fileio_write - Write a blob to a file.
    fileio_append - Append a string to a file.
    fileio_mkdir - Create a directory.
    fileio_symlink - Create a symlink.
    fileio_ls - List files in a directory.

If one only exposes sqlite command query access and limit certain aspects of this sqlite extension depending on the use case perhaps, I feel like this might be a good alternative as well?
_pdp_ 13 hours ago||
We have also attempted to implement exactly this but it turned out to be really bad architecture.

The file system as an abstraction is actually not that good at all beyond the basic use-cases. Imagine you need to find an email. If you grep (via fuse) you will end up opening lots of files which will result in fetches to some API and it will be slow. You can optimise this and caching works after first fetch but the method is slow. The alternative is to leverage the existing API which will be million times faster. Now you could also create some kind of special file via fuse that acts like a search but it is weird and I don't think the models will do well with something so obscure.

We went as much as implementing this idea in rust to really test it out and ultimately it was ditched because, well it sucks.

AdieuToLogic 11 hours ago||
> The file system as an abstraction is actually not that good at all beyond the basic use-cases. Imagine you need to find an email.

Unrelated to FUSE and MCP[1] agents, this scenario reminded me of using nmh[0] as an email client. One of the biggest reasons why nmh[0] is appealing is to script email handling, such as being able to use awk/find/grep/sed and friends.

0 - https://www.nongnu.org/nmh/

1 - https://en.wikipedia.org/wiki/Model_Context_Protocol

skissane 11 hours ago||
> If you grep (via fuse) you will end up opening lots of files which will result in fetches to some API and it will be slow.

This is a limitation of the POSIX filesystem interface. If there were a grep() system call, it could delegate searches to the filesystem, which could use full text indices, run them on a remote server, etc

trollbridge 11 hours ago|||
Or maybe a file system is best used to store files and not be a general database manager.
nextaccountic 7 hours ago|||
Yep, but unfortunately this is the interface FUSE will expose
naushniki 34 minutes ago||
I agree with most people who commented. This looks like an abstraction without a clear purpose, which is not a good thing. Particularly, using fuse as a wrapper for a REST API is ineffective and redundant, since an LLM can work with it more effectively using curl provided an API spec in any format.
tombert 13 hours ago||
I've been getting into FUSE a bit lately, as I stole an idea that a friend had of how to add CoW features to an existing non-CoW filesystem, so I've been on/off been hacking on a FUSE driver for ext4 to do that.

To learn FUSE, however, I started just making everything into filesystems that I could mount. I wrote a FUSE driver for Cassandra, I wrote a FUSE driver for CouchDB, I wrote a FUSE driver for a thing that just wrote JSON files with Base64 encoding.

None of these performed very well and I'm sort of embarrassed at how terrible the code is hence why I haven't published them (and they were also just learning projects), but I did find FUSE to be extremely fun and easy to write against. I encourage everyone to play with it.

eru 12 hours ago|
Writing a fuse frontend for git is particularly rewarding: git is already more or less organised like a file system internally.
tombert 11 hours ago||
I believe that.

FUSE makes me think that the Plan 9 people were on to something. Filesystems actually can be a really nice abstraction; sort of surreal that I could make an application so accessible that I could seriously have it directly linked with Vim or something.

I feel like building a FUSE driver would be a pretty interesting way to provide a "library" for a service I write. I have no idea how I'd pitch this to a boss to pay me to do it, but pretending that I could, I could see it being pretty interesting to do a message broker or something that worked entirely by "writing a file to a folder". That way you could easily use that broker from basically anything that has file IO, even something like bash.

I always have a dozen projects going on concurrently, so maybe I should add that one to the queue.

eru 11 hours ago||
See https://github.com/matthiasgoergens/git-snap-fs for my example of read-only access to git via fuse.

I built the original version in Python for a job years ago. But the version above is almost entirely vibe-coded in Rust in a lazy afternoon for fun.

However, I disagree that the filesystem is the right abstraction in general. It works for git, because git is essentially structured like a filesystem already.

More generally, filesystems are roughly equivalent to hierarchical databases, or at most graph databases. And while you can make that work, many collections of data are actually better organised and accessed by other means. See https://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf for an particularly interesting and useful model that has found widespread application and success.

tombert 11 hours ago||
Yeah I'm not saying that they're necessarily great in general, just that there are certain applications that map pretty well, and for those it's a pretty cool abstraction because it allows virtually anything to interface with it.

Also, looks like my message queue idea has already been done: https://github.com/pehrs/kafkafs

No new ideas under the sun I suppose.

fleshmonad 14 hours ago||
Welcome back Plan9
olav 19 minutes ago||
Even more so: The 9P protocol https://en.wikipedia.org/wiki/9P_(protocol)

Maybe the most mainstream incarnation is its use in the Windows Subsystem for Linux (WSL).

Imustaskforhelp 12 hours ago||
It never left :p (I think that there are still active forks of Plan9 and Plan9 itself has definitely influenced some linux features or so I have heard)
fleshmonad 11 hours ago||
Yes there is the great 9front and the useful plan9port. I run 9front on an old thinkpad, but I plan on doing a little more with it, having a dedicated CPU server, storage server etc will be the next step
nubskr 4 hours ago||
Spent the last month building a FUSE mount and now I can't stop thinking about what else I can filesystem.
ainiro 2 hours ago||
We've got something similar with our Hyperlambda Generator that generates tools "on the fly" in 1 to 4 seconds.

You can test it here ==> https://ainiro.io/natural-language-api

michaelmior 2 hours ago|
Could you clarify how this is similar to this post? There doesn't seem to be any obvious connections to file systems.
rescrv 10 hours ago||
For my LLM/agents framework, I went with a virtual filesystem abstraction and implemented helpers for mounting and permissioning the virtual file systems: https://github.com/rescrv/claudius/blob/main/src/agent.rs#L1...
eru 12 hours ago|
See my own https://github.com/matthiasgoergens/git-snap-fs which lets you expose all branches and all tags and all commits and all everything in a git repository as a static directory tree. No need to git checkout anything: everything is already checked out.
More comments...