31 ms·
Design and Implementation of Sprites
- ZeroConcerns 9mo ago[flagged]
- tptacek 9mo agoIt's a hardware-isolated Linux shell with a durable disk you can conjure out of the sky on 1.5 seconds notice that costs virtually nothing when you're not actively using it. If we could have shipped this in 2021, before anyone thought coding agents would work, we'd have barfed on our shoes with excitement.
- ZeroConcerns 9mo ago[flagged]
- teach 9mo agoI guess I can see how pre-installing some LLM agents makes it potentially seem "AI-centric", but I don't understand at all how this could be "US-centric".
- webdevver 9mo agothe US is the centre of the world, and AI is at the centre of US attention! why would anyone do anything else, anywhere else?
- tptacek 9mo agoI wish I'd had more space to write about the global orchestrator design, because it's fun. The Fly Machines orchestrator goes through some trouble to keep the source of truth for each VM decentralized, owned by the physical it runs on. But there's still global state --- apps, organizations, services. That stuff is all on Postgres. Postgres keeps up with it just fine but I'd be lying if I didn't say we're always looking out the corner of our eyes on metrics. The global state for Sprites is on object storage. Each organization gets a separate SQLite database, and that database is synchronized to object storage with Litestream.io (Lightstream is load bearing in a bunch of places here; solid as a rock for us). I think people really still sleep on the "multiple SQLite database" backing store design.
- underdeserver 9mo agoFor those who missed it, tptacek wrote TFA.
- chrismccord 9mo agoI've been working on the orchestrator side with Elixir and Phoenix, so happy to continue the discussion for curious minds. One of the coolest things we can do is things like this in Elixir - from any node we can reach out to a sqlite db across the planet: OrgTracker.with_repo(org_id, fn -> repo.all(from sprite in "sprites", select: ...) end) That will find or place an Elixir process on the cluster and rpc the target node with our code. Placements can be sticky so they pin to a machine so we don't have to suck down the db every start, but we also balance out the load and handle failover of durable processes automatically. Combined with litestream, the result is distributed sqlite with failover while treating it essentially like a locally reachable sqlite db. Yes there is the speed of light to contend with, but by sending the execution across the wire rather than individual queries, we only ever pay a single hop to reach the process/sqlite.
- randito 9mo ago(Disclaimer: Newbie checking but still curious). Are you using libluster or Distributed Erlang to reach the clusters? Or just simple networking over the Fly network. > That will find or place an Elixir process on the cluster and rpc the target node with our code. Is this similar to what you did with Flame? Or just a refinement of that idea.
- roywiggins 9mo agoI've been having fun with OpenCode's webui in a Sprite, set it up right in Termux and you can vibe code a website with a full backend from your phone. I have a Termux shortcut that sets up a port forward and pops open my web browser to the OpenCode webui. OpenCode can pick up the Sprite skill built into the containers so it can manage the instance itself (mostly setting up and destroying services). Of course you can do similar with a VPS, but this makes it very easy (and cheap!) to spin up an entire new machine with a public url and HTTPS whenever you want to.
- adriand 9mo agoWhat's the option for iOS? I've tried installing ish and a-shell and can't get the sprites CLI installed on either of them.
- roywiggins 9mo agoVibe code a client in bash or Python that uses the Sprites HTTP API maybe?
- blackqueeriroh 9mo agoYeah, i’ve been looking at this. The easier this is to attach to your tailnet and ssh in from inside, I don’t think you’re dealing with the proxy then. I tried several things and this is going to be the next one.
- adriand 9mo agoLet me know when you figure it out!
- MrOrelliOReilly 9mo agoI appreciate the Fly.io team’s enthusiasm and am optimistic this will mature into a product I’d pay for, but my initial impression was of a lack of polish. Documentation is sparse, or not even available? The API docs don’t tell you much about the service itself, and a Google search for docs returns an inaccessible website as the first result (https://docs.sprites.dev https://docs.sprites.dev). Blog posts and forum threads and Claude skills shouldn’t be a substitute. The snappiness of the sprites is very cool and I can definitely see it integrating into future Claude Code workflows. But the lack of a base container images means you’re still doing setup work on the sprite before you can begin development. I understand the philosophy is that sandboxes should be persistent, but Claude Code sessions also work better when isolated from each other, so it’d be nice to have some precepts to get a workspace setup quickly (given agentic coding is clearly a target). I also found the CLI unintuitive but maybe that was just me! So very cool idea but left with the impression that the Fly.io team’s should have spent a couple weeks on polish before shipping.
- tptacek 9mo agoYou're not wrong. The documentation actually had a hallucinated link to an Anthropic dependency in it when we shipped. Right now the attitude is mostly "if we have to document it extensively, we're doing something wrong". It's been in the works for awhile, with a small team, and we're just getting it out there right now. I've been needling Kurt for several months now that if we wait until it's polished enough that we don't see comments like this, we're doing it wrong.
- mcpherrinm 9mo agoI'm sure this is a difference-of-learning or whatever, but I'm usually unwilling to try a product until I can understand it and how it works from the documentation
- tptacek 9mo agoUnderstandable. Our current take is that there's not really much to know, and that the people this will really light up are good with that. Of course, we'll flesh out documentation! I'm really jazzed about this particular product as a product (I just really enjoy using it), but the post is mostly about how we built it, and deliberately not much about how best to use it.
- raro11 9mo agoTried it. Docker wasn't preinstalled so asked Claude to do it and make sure it's running (supervisord or the likes isn't preinstalled). It neatly did so and "registered" it as a sprite service. Then I exited my session, waiting for the sprite to go idle, but I don't think it ever does.. Still have it active. Don't know how to idle it. Can't tell for sure if this means I'm losing credits as there is no billing usage shown anywhere. Also waiting for the moment where I can launch a sprite from another's checkpoint.
- chrismccord 9mo agoWe had a bug where some sprites would fail to properly suspend while entering their suspended state. You're not eating into credits so no worries there. We've been rolling out a fix across the fleet today so you should be seeing proper status soon.
- karmajunkie 9mo agoThis is great news! If we upgraded our sprite already how long should it take to suspend? I noticed the upgrade earlier and installed it but my sprite is still running.
- karmajunkie 9mo agoahh finally success—a fresh sprite goes to sleep as it should. unfortunately the original one i created doesn't, so I guess I'm going to have to kill that one off.
- ktaraszk 9mo agoJust use container-os as your runtime image: https://hub.docker.com/r/miget/container-os https://hub.docker.com/r/miget/container-os and you should be good
- zrail 9mo agoCould you explain more about how this helps and how one might use a different runtime image on Sprites?
- fuddle 9mo agoHow does Sprites compare to E2B sandboxes?
- tom_ 9mo agoThe sprite is a pretty outdated thing these days, but is the term sufficiently unused to make it free for reuse?
- simonw 9mo agoWhat's a sprite?
- vardump 9mo agoA graphical object composited just in time in display scanning process. (Or in other words, a graphical object on screen that is not present in a framebuffer of any kind.)
- shermantanktop 9mo agoThere was a time before 8bit video games. https://www.merriam-webster.com/dictionary/sprite https://www.merriam-webster.com/dictionary/sprite I personally associate the term Shakespeare's The Tempest: https://en.wikipedia.org/wiki/Ariel_(The_Tempest) https://en.wikipedia.org/wiki/Ariel_(The_Tempest)
- pugworthy 9mo agoThis is immediately what popped into my head, and I clicked the link thinking it was going to be some old-school game dev content.
- Lerc 9mo agoRegardless of the usage of the term Sprite, the real measure of how appropriate it is to use the term for something else is how many people get confused in this manner. I can't really tell what the average reader would think because my background is in game development, so my view is not representative. I think people can get bogged down in the technical weeds over what a sprite is in graphics. Historically it started out as mini graphics overlays in hardware. There was a transition period motivated by Amiga documentation to have Sprites and Bobs, to distinguish, and perhaps advertise, the use of the Blitter. When software or Blitter Sprites became nearly ubiquitous, they returned to simply being called Sprites, the fairly rare use of the original form became known as Hardware Sprites. Usually it was only mouse pointers that remained as Hardware Sprites Obviously the term Hardware Sprites is not strictly a distinguishing label either. They are all controlled by software using hardware with some degree of balance between the two.
- lbrito 9mo ago>Any time anybody needs a pen, several are at hand, in exactly the first place they look. >Now, today, under the hood, Sprites are still Fly Machines. But they all run from a standard container. So its basically a faster VM? What are some use cases for this that benefit from the faster boot time?
- ignoramous 9mo ago> some use cases for this that benefit from the faster boot time Faster create times. Sprites create (including booting up) in a second or two, per TFA. One usecase for Sprites I see are disposable dev boxes (like for rapid prototyping with Coding Agents).
- neuroelectron 9mo agoThis is not the kind of sprites I'm interested in
- rvz 9mo agoThought this was going to be a deep dive into sprite sheets. Low and behold, yet another AI product selling advertisement + veiled promotion on HN. It's almost as if the guidelines don't matter anymore. From [0]. 'Please don't use HN primarily for promotion. It's ok to post your own stuff part of the time, but the primary use of the site should be for curiosity.'
- yellowapple 9mo agoIn fairness, I don't think the poster is a Fly.io employee, so that guideline doesn't quite apply here.
- boundlessdreamz 9mo agoIs there a way to copy files to/from the sprite? Couldn't see an option for that in the CLI
- tptacek 9mo agoThere's an FS API that shipped yesterday: /fs/read?path=X | GET | Read file (supports Range headers) /fs/write?path=X | PUT | Write file (body = raw bytes) /fs/list?path=X | GET | List directory /fs/delete?path=X | DELETE/POST | Delete files/dirs /fs/rename | POST | Rename/move /fs/copy | POST | Copy files/dirs /fs/chmod | POST | Change permissions /fs/chown | POST | Change ownership /fs/watch | GET (WebSock) | Watch for filesystem changes It'll get CLI support very soon. But I've just been using magic-wormhole for this.
- Imustaskforhelp 9mo agoPiping server is another interesting idea for ephemeral transfers They are pretty cool! https://github.com/nwtgck/piping-server https://github.com/nwtgck/piping-server
- mrkurt 9mo ago`cat file.txt | sprite exec -s <name> bash -c "cat > ~/file.txt"` is my go to.
- MildlySerious 9mo agoI would love to just mount a directory via SFTP, so I can use my IDE alongside the far-away Claude. That would put this in the realm of daily use for development.
- aostiles 9mo agoI was trying to copy a directory and used: Pull from sprite to local: sprite exec -s my-sprite sh -c "tar -czf - /home/sprite/<my_dir>" | tar -xzf - -C ./ Push from local to sprite: COPYFILE_DISABLE=1 tar -czf - <my_dir> | sprite exec -s my-sprite sh -c "tar -xzf - -C /home/sprite/"
- benatkin 9mo agoTo me, this sounds more monolithic than containers. I think I'd like something less monolithic. However, those who like monorepos might be more quick to develop an interest in this. I could of course use containers within the MicroVM, which is what I really want anyways, because I want lighter weight containers than MicroVMs for sandboxes. While looking into giving fly another shot as a cloud provider even though I think it's still pretty much a commodity for me, I found an issue in Google: I searched for "fly.io sao paolo" and the title of the first result on fly.io is "Regiones · Fly Docs", translated from english to Spanish. While I find the translation in titles on Google annoying, I haven't often seen the characters messed up like this. I reproduced this in Incognito at this URL: https://www.google.com/search?hl=es&q=fly.io%20sao%20paolo https://www.google.com/search?hl=es&q=fly.io%20sao%20paolo
- deleted 9mo ago[deleted]
- thomasfromcdnjs 9mo agoI created a "mcp server" for sprites yesterday through this new ecosystem I am working on, you can clone the collection, and then just add this https://tpmjs.com/api/mcp/ajax/sprites/sse https://tpmjs.com/api/mcp/ajax/sprites/sse mcp sse url to claude desktop, or anything you want. tpmjs is a registry of ai sdk npm packages (i created them for sprites), which you can add to personal collections, we automatically server your collections as mcp servers if you want. Creating sprites in an example chat bot -> https://imgur.com/a/ETNxR1o https://imgur.com/a/ETNxR1o Creating sprites in claude desktop -> https://imgur.com/myC0U28 https://imgur.com/myC0U28 Listing out my sprites in claude desktop -> https://imgur.com/rgBU0jm https://imgur.com/rgBU0jm --- You can view the collection of tools here -> https://tpmjs.com/ajax/collections/sprites https://tpmjs.com/ajax/collections/sprites (fork it to use it yourself) I'm looking into exe.dev and sprites.dev to build out extra features into tpmjs, agent sandboxes make a lot of sense.
- ssully 9mo agoSounds neat! Also kind of funny, because I already use Fly machines as a bit of a playground for some personal projects and really like it for that purpose. I have minor issues, some of which this blog post directly talks about, but nothing that has held me back. Also I like a lot of what you get built-in with Fly machines(ex:Grafana). So I am curious how this would fit in my workflow. Maybe Sprites for rapid development and toy projects, and move to a Fly machine when I need something a little more beefy? Looking forward to checking this out.
- dang 9mo agoRecent and related: Code and Let Live - https://news.ycombinator.com/item?id=46557825 https://news.ycombinator.com/item?id=46557825 - Jan 2026 (186 comments)
- senko 9mo agoNot sure where to report this, so here goes: something weird's going on with the title setters (from default .bashrc, the 'case' block near the top) when connecting from my Linux box. Tried with xterm, tilix and ghostty, all of which support the title setter escape sequence locally. For some reason, these get messed up (smells like edge case with escaping) and the result looks like this: $ sprite c ": history-search-backward' \]\u@\h\[\]:\[\]\w\[\]\$ ' ": history-search-forward'sprite@sprite:~$ "sprite@sprite:~$ I'm guessing y'all use Zsh because that works flawlessly :)
- mrkurt 9mo agoShell environments are by far the most difficult part of building a stateful sandbox with checkpoints and restores. It's bananas. This will be fixed soon.
- tomjen3 9mo agoI was reading through the documentation and it seems like these are writing directly to storage not on the machine where the sprite lives? That makes me worry for how slow the storage is. npm install writes a lot of files.
- mrkurt 9mo agoIt's tiered, they have local nvme that gets written back to object storage. npm install hasn't bothered me, but I know of people with massive npm issues that would like faster first installs. Fortunately, it's incrementally quicker after that. The storage performs pretty well for running claude + my dev. It'll improve immensely in the next few months, though. We should be able to get near native NVMe speeds for the working storage set on reads/writes/flush/fua.
- akrauss 9mo agoWhat I missed when trying it was a simple way of accessing private repositories. There does not seem to be ssh agent forwarding, or is there? What do people use? I realize this is all very fresh, but still wondering…
- joshgachnang 9mo agoDid you ever find an answer? Other than copy/pasting my priv/pub keys into ~/.ssh/ I'm not sure.
- nnevatie 9mo agoI was looking forward to a post about designing sprites, i.e. little graphical blobs flying across screen. Needless to say, this was not it.
- drob518 9mo agoSounds cool. I love Fly.io. That crew is sharp. The article could do with a few pictures to illustrate the layers. I’ve read it, but I can’t say that I understand the implementation.
- amonks 9mo agoVery cool product, but I have to ask, out of personal interest: What did the bracket in the slack channel determine was “Chicago’s best sandwich”? Or the top three, even? I’m always looking for new sandwiches. Off the top of my head, I might nominate, - the pork tenderloin at JT’s - the Big L from Fontano’s (hot take, I know; it might go to Graziano’s if they hinge-cut the bread, but not doing so is a fatal flaw to me) - the Cambodian fried chicken sandwich that’s occasionally available at Hermosa - honorable mention: the comically oversized chicken torta at Migos (Edit: I inexcusably transposed Bari and Fontano’s; the nomination is intended for Fontano’s)
- tptacek 9mo agoIt's too early to say. We started the bracket back in 2020 with a nomination Google Sheet, and then the pandemic happened, and then I kept saying I'd throw a web app together for us to actually do a seeded bracket with; 5 years later, some of the restaurants have changed, so we're re-doing nominations, and we'll have bracket voting rounds starting probably in February. I owe it all to Sprites! Nhu Lan's Banh Mi #1 and JPG's Muffaletta are the top 2 current noms, but I think the Tempesta B. Franklin is a sleeper, and the Phodega Viet Dip has a cheering section and I haven't tried it yet. The joy of doing an actual bracket is that it'll involve people doing field trips to have their first Mr. D's Pork Shish-Ka-Bob sandwich, or the Alpine Combo. It's a 16 sandwich tournament and we're at like 26 nominations right now so it'll be interesting to see what happens.
- amonks 9mo agoVery credible nominations; clearly “this guy sandwiches.” Thanks! I’d love to see a post of some kind when it’s all settled; you’re doing the lord’s work here.
- rokob 9mo agoI’m so happy I kept reading these comments and came across this gem. Sprites are cool and all but a sandwich tournament is next level.
- joshgachnang 9mo ago
- peterldowns 9mo agoVery cool. One usecase the blogpost seems to hint at is to use this to implement async agents that write code for you. Like, you have some system that hears about a new issue — from slack, linear, wherever — and then spins up a Sprite, checks out the codebase, works on a solution, commits, and creates a PR. Is that what you guys are thinking of? I get that Sprites are a new primitive, but I feel confused as hell about what exactly I'd want to do with it.
- blackqueeriroh 9mo agoI love my sprite. I just want an easier way to connect to and launch sprites from my phone. any ideas there?
- blackqueeriroh 9mo agoI love sprites. I’m currently trying g to figure out how to best launch and connect to sprites from iOS. I’ve tried several things - vibe coding a terminal app is a little wild and not the best way maybe to handle this. I believe currently the sprites CLI is using websockets to handle the connection, and the external proxy when you make a sprite public doesn’t handle websockets correctly? Does that sound right?
- dangoodmanUT 9mo agoCheckpoints defined by the guest, not the host, was something I was working on recently too [1] (just before this came out). Very validating! [1] https://github.com/danthegoodman1/checker https://github.com/danthegoodman1/checker
- disillusioned 9mo agoMade a sprint and connected via Windows Terminal and noticed it's purely white on black, not observing the normal Claude terminal color schemes... any ideas why that's the case? Am I missing something insanely simple?
- agosta 9mo agoGuess I'm confused - is the ideal use case for Sprites for suspendable, iterative, sandboxed compute sessions (with disk)?.. Or is the idea that these things can also/should run production workloads in place of a traditional webserver setup? If the latter, can every sprite boot up with what's needed to instantly serve web traffic? Or would they need to build/install things internally every time a new sprite turned on? Do these horizontally scale a long lived, high trafficked application?
- mrkurt 9mo ago> Sprites for suspendable, iterative, sandboxed compute sessions (with disk)?.. Yes. They won't horizontally scale. They're pretty good for hosting my side projects! Not good for, eg, hosting the API that orchestrates Sprites.
- threecheese 9mo agoTFA links to a post by Kurt M at Fly which speaks to this, from a personal perspective. They are using sprites for a “production” workload - a tool for their family - and it’s persistent and accessible enough that they don’t have plans to move it. https://fly.io/blog/code-and-let-live/ https://fly.io/blog/code-and-let-live/ Thomas characterizes this as “believ[ing] that the future belongs to malleable, personalized apps”, which I think describes the use case perfectly. As a “barefoot developer” (to borrow another localfirst term, thanks Maggie Appleton), does every app really need more than a persistent home and an URL? And so to your question “is the idea that these things can also/should run production workloads”, I believe “can” is right - but suspect that supporting “should” is on Fly’s roadmap.
- tptacek 9mo agoThey're an interesting middle ground between pure ephemeral dev environment and production environment. If your audience is the whole Internet, a Sprite won't scale today to serve it. But for most of the apps I'm building, the Sprite is actually fine for the foreseeable future. There's a ton of security automation stuff we're doing that a Sprite keeps up just fine with; the sandwich bracket I'm running downthread is also indefinitely fine on a Sprite. On the other hand, if I took the sandwich bracket app and made it a generic "run a bracket" app and that app (inexplicably) got popular, I'd need to move it to a Fly Machine setup.
- karlmdavis 9mo agoI love absolutely everything about this… except for the lack of cross-platform support. I know how ludicrous it is to expect that, but… most workflows I’m considering solutions like this for are crippled by their inability to run Xcode or a native Windows build. Heck, I’m pretty sure I’ll even run into glibc version mismatches that block work I care about. Frustrating that the best solution is still, “well, if that’s important to you, then set that up in your home lab or rent some extra (pet) VMs in the cloud.”