Instant 1.0, a backend for AI-coded apps
Instant 1.0, a backend for AI-coded apps
For what it's worth, Instant is 100% open source!
> really building multiplayer apps like Figma, Linear
I think there's two surprises about this:
1. If it was easier to make apps multiplayer, I bet more apps would be. For example, I don't see why Linear has to be multiplayer, but other CRUD apps don't.
2. When the abstraction is right, building apps with sync engines is easier than building traditional CRUD apps. The Linear team mentioned this themselves here: https://x.com/artman/status/1558081796914483201
> 5 usd node will handle 100k mau without breaking a sweat.
One problem you may encounter with the 5 usd node: how do you handle multiple projects? You could put them all in one VM, but that set up can get esoteric, and as you look for more isolation, the processes won't fit on such a small machine.
With Instant, you can make unlimited projects. Your app also gets a sync engine, which is both good for your users, and at least in our experiments, the AIs prefer building with it.
And if you ever want to get off Instant, the whole system is open source.
I still resonate with a good Hetzner box though, and it can make sense to self-host or to use more tried-and-true tech.
For what it's worth, with Instant you would get a lot more support for easy projects. At least in our benchmarks, AI
This is super cool and exactly what I've been looking for for personal projects I think. I wanna try it out, but the "agent" part could be more seamless. How does my coding agent know how to work this thing?
I'd suggest including a skill for this, or if there's already one linking to it on the blog!
We do have a skill!
npx skills add instantdb/skills
Would recommend doing `bunx/pnpx/npx create-instant-app` to scaffold a project too!
You can! The skill lives here
Good idea! I went ahead and updated the essay:
https://github.com/instantdb/instant/pull/2530
It should be live in a few minutes.
One thing I have always wanted to do is cancel an AI Agent executing remotely that I kicked off as it streamed its part by part response(part could words, list of urls or whatever you want the FE to display). A good example is web-researcher agent that searches and fetches web pages remotely and sends it back to the local sub-agent to summarize the results. This is something claude-code in the terminal does not quite provide. In Instant would this be trivial to build?
Here is how I built it in a WUI: I sent SSE events from Server -> Client streaming web-search progress, but then the client could update a `x` box on "parent" widget using the `id` from a SSE event using a simple REST call. The `id` could belong to parent web-search or to certain URLs which are being fetched.
And then whatever is yielding your SSE lines would check the db would cancel the send(assuming it had not sent all the words already).
If I understood you correctly:
You kick off an agent. It reports work back to the user. The user can click cancel, and the agent gets terminated.
You are right, this kind of UX comes very naturally with Instant. If an agent writes data to Instant, it will show up right away to the user. If the user clicks an `X` button, it will propagate to the agent.
The basic sync engine would handle a lot of the complexity here. If the data streaming gets more complicated, you may want to use Instant streams. For example, if you want to convey updates character by character, you can use Instant streams as an included service, which does this extremely efficiently.
More about the sync engine: https://www.instantdb.com/product/sync
More about streams: https://www.instantdb.com/docs/streams
A few reasons:
1. Unlimited projects: when you spin up traditional backends, you usually use VMs. It's expensive to start many of them. With Instant, you create unlimited projects
2. User experience: traditional CRUD apps work, but they don't feel delightful. I you want to support features like multiplayer, offline mode, or optimistic updates, you'll have to write a lot more custom infra. Instant gives you these out of the box, and the agents find it easier to write than CRUD code
3. Richer features: sometimes you'll want to add more than just a backend. For example, maybe you want to store files, or share cursors, or stream tokens across machines. These often need more bespoke systems (S3, Redis, etc). Instant already comes with these out of the box, and the agents know how to use them.
There are a few demo sections in the post that show this off. For example, you can click button and you'll get a backend, without needing to sign up. And in about 25 lines of code, you'll make a real-time todo app.
Thanks, this might be exactly what I'm looking for.
I see you have support for vanilla js and svelte, but it's unclear whether you can get all the same functionality if you don't use React. Is React the only first class citizen in this stack?