Video wird geladen...
Video konnte nicht geladen werden
i built a very fast, virtualized filesystem for ai agents built with Redis, Vercel AI SDK and just-bash agents can search and grep files really fast because it's all in redis memory
73,390 Aufrufe • vor 7 Monaten •via X (Twitter)
35 Kommentare

Built this in postgres during this weekend:

The right answer to the memory crisis! But jokes aside, I worked with Redis for state management for several projects, especially for realtime apps it's really nice. But I never thought to place the whole files in there. Nice idea!

appreciate you man!

Sandboxless agent filesystem

yeah, i imagine any agent suddenly has a virtual filesystem you dont need to clean up or anything. "clone nextjs repo, check how they do xyz, then do it the same way here"

@franmoretti_ That's similar to btca by @davis7

@franmoretti_ @davis7 yes btca is great

Yep, it is fast and looks cool. Just wondering how to work on a scenario where we have to work with GBs of dynamic data.

Do you suggest any product in upstash can be used to handle the AI agent long running execution without timeout failure ?

How many files you had and average number of functions or lines of code in each file? Trying to understand how it will work for large scale systems

Fast agent infra gets interesting when filesystem stops being disk I/O cosplay. If state lookup feels instant, half the reasoning improvement people talk about is just latency disappearing.

that sounds fun. using redis for speed is smart. I’m curious how it handles larger datasets though.

i don’t get whats the scenario where you want everything loaded in memory rather than on disk no hate, its a genuine question, i’m sure you had a specific use case in mind for this but i don’t get it

@BilwarAmaan

Nice!

crazy, I built something very similar today (backed by convex instead of redis) then just saw your post

We’ve done something similar - it works pretty well!

Why do you love Vercel AI SDK so much? Any best repo which I can use for sub-agents using Vercel AI SDK? Especially the audio one?

redis in-memory for agent fs is smart. what's your eviction strategy when an agent runs a long task and memory pressure kicks in?

Any GitHub repo to follow the code

Really cool, some benchmarks would be nicer to see

So uhhh source code wen? 🙂

Ephemeral filesystem in Redis for agents makes a lot of sense. No cleanup, fast grep.

I really think this is the solution to all the sandbox craze, why you need to spawn os file systems when you can just have db access. For local use you have bidirectional sync for ownership of files. Large blobs can also be figured out

how about more memory?

@NathanFlurry

Redis-backed file search is a clever trick.

This is the kind of infra that matters. Most 'agent breakthroughs' are just hidden I/O bottlenecks wearing a demo. Faster state access beats another orchestration diagram.

fast reads are the easy part. the hard problem is what gets written. if agents can write to the same filesystem concurrently, you need write semantics — last-write-wins? merge? conflict log? the filesystem abstraction breaks when multiple agents treat the same key as their own working memory.

how are the updates synchronized? If consequent updates are made, how are repeated cache evictions and keys handled in redis?

do you have a link of that repo? so i can test it

not yet 🫡

So how does one... put this in codex? That slow ass shit slowing me down, even on the super expensive fast mode.

We have S3 files how it would be comparing to custom made solution

redis as the backbone makes so much sense for this — agents that can actually search their own context fast is a different thing entirely than what most agent setups look like rn

