DEV Community

Jason Guo
Jason Guo

Posted on

Make UI and AI Agents Equal Citizens of Your Application

Raycast dropped a technical deep dive last week about rebuilding their desktop app from scratch. The headline was about going cross-platform. The buried lede was something much more interesting.
Their new architecture has four layers: a native host shell, a React frontend, a Node.js backend for all business logic, and a Rust core for data and indexing. These layers communicate through typed IPC with compile-time guarantees across all four runtimes.
Here is the part that stopped me mid-scroll: business logic no longer lives inside the UI layer. It lives in a separate process. The UI calls it. Extensions call it. And nothing stops an external process, including an AI agent, from calling it too.
The user clicking "search files" and an agent issuing a search command travel through the same path. The backend does not know which one initiated the request. It does not need to know.
This is a deceptively simple idea with real weight behind it. UI and AI agents become equal citizens of the application.
Most teams adding AI to their product do the opposite. They bolt a chat dialog onto the existing UI, hard-code a few intent mappings, and call it done. It works for demos. It breaks the moment a user asks for something that spans multiple capabilities. The bottleneck is not the model. It is that the application never gave the model a clean interface.
Raycast's bet is that AI agents are not a feature requirement. They are an architecture requirement. The difference determines whether you add a chat box and move on, or you rebuild your foundation so every capability is a typed, discoverable, composable command.
The bet costs something. v2 uses 150 MB more memory than v1. The team is upfront about it. That 150 MB is a down payment on not having to rebuild again in three years when agents are everywhere and your app cannot be called by any of them.
I wrote up a longer analysis of the architecture, the trade-offs, and what it means for product teams building in the age of agents. Read the full piece here.

Top comments (0)