Built my own agent runtime after hitting the ceiling with LangGraph — UI as graph nodes, Postgres durability, zero orchestration cost
I've been building agentic applications for around 2 years now. Started with loops, then moved onto langgraph + Assistant UI. I've been using the lang ecosystem since their launch and have seen their evolution.
It's great and easy to build agents, but things got really frustrating once I needed more fine grained control, especially has a hard time building interesting user experiences. I loved the idea of building agents as graphss, but I really wanted to model UIs in my flow as nodes too. It felt like I was fighting abstractions all the time, too much to learn.
Deployment was another nightmare. I am kinda cheap and the per node executed tax seemed ... Well, not great. But hey, the devs gotta eat.
Around 10 months back, I snapped and started working on an idea I had. It's called cascaide.
Cascaide is a fullstack agent runtime and AI orchestration framework in typescript designed to run anywhere JS/TS can. It was originally built for web applications but works equally well for headless/CLI AI agents and workflows in javascript runtimes.
What it really is is a distributed, observable, durable graph executor. The first split just happens to be client/server, hence full stack.
Here are the reasons to try it.
🧩 UI as nodes in your agent graph — Not glue code, not a separate library. UI and human-in-the-loop are core primitives.
💾 Resume workflows after crashes, weeks later, or never — Every step checkpointed to your own Postgres. No new infra, no third-party service holding your state.
🔍 Observability — Rewind any agent run, fork state, inspect every transition. No more printf console.log hell. Everything you need to see with redux Devtools.
💸 Zero orchestration cost — You pay for compute only. No per-node tax, no hosted runtime fee.
🪶 23kb gzipped core — Small enough to actually read the source. Not another black box. 46kb including all helpers, durable database, frontend and agent builder helpers. Like you can seriously read and reason through the code.
🌍 Deploy like any other app — Next.js, Express, Hono, Fastify currently supported adapters (Let me know where else to expand native adapters to!) No special agent hosting or vendor lock-in.
🏗️ Your data, your compliance — All traces on your own DB. HIPAA/SOC2 foundation without sending data to a third party.
🛠️ Developer Experience
It's hard to trust such claims right now, and I might be biased as the creator. But the API surface is genuinely small:
🪝 Two hooks on the client to control and observe graph execution
⚙️ `prep/exec/post lifecycle for nodes — two main types for state updates and spawning new nodes
🎮 Controller primitive for concurrency — control and observe graph execution from within a server-side node
📐 Graph definitions
All typed. And this is mostly it. You can do a lot with plain programmatic control.
All typed. And this is mostly it. You can do a lot with plain programmatic control.
🗺️ *What's Next
🔌 Expanding native adapters — currently native adapters exist for:
⚛️ React
🐘 Postgres-js (durable database)
🖥️ Servers: Next.js, Fastify, Hono, Express
Let me know what adapters to build out next! It's designed to be modular — quickly expandable to more targets, and you can swap packages out to migrate.
🌐 Expanding graph distribution — right now only client/server split is supported. But the abstractions allow for more environments. Currently working on:
🔲 Edge
🖧 Multiple servers
👷 Web workers
Do let me know what adapters to build out next. It's designed to be modular. Can quickly expand to more targets, and you can just swap packages out to migrate.
The web worker angle is pretty interesting. We are building something so that you can give your agent a filesystem and bash by running nodes inside the browser sandbox. Would be a huge value add with zero cost. This allows for even fully local BYOK like AI apps running on the browser.
Try it out now:
npx create-cascaide-app@latest
Ships out of the box with 3agents*🤖:
🔎 ReAct Agent with search capabilities
🏨 Hotel Booking Agent (Supervisor) with two sub-agents and two HITL steps
🔁 Recursive ReAct Agent with search capabilities that can recursively invoke itself to handle complex tasks — each recursion depth trackable via mini chat windows
CLI currently scaffolds apps in:
▲ Next.js
⚡ React + Hono
🚀 React + Fastify
🟢 React + Express