Introduction: Why Bolted-On AI Chat Falls Short
Most "AI features" I see in SaaS products follow the same pattern: a chat panel in the corner, wired to a handful of special endpoints someone wrote for the model. It demos well. Then the product grows, the UI gains features the agent can't reach, the agent's endpoints skip a permission check the UI enforces, and the two slowly drift apart. Users learn that the assistant can only do some things, and they stop trusting it.
The other approach, letting the agent drive the UI by clicking through it like a human, is slow and fragile. Neither treats the agent as a real user of the application.
flowchart LR
subgraph Bolted["Bolted-on AI chat"]
direction TB
U1[UI] --> API1[App API]
C1[Chat agent] --> AI1["Special AI endpoints"]
API1 --> D1[(Database)]
AI1 --> D1
end
subgraph Native["Agent-native"]
direction TB
U2[UI] --> ACT["One action layer<br/>validation + permissions"]
C2[Agent] --> ACT
ACT --> D2[(Database)]
end
Bolted ~~~ Native
On the left, two code paths reach the same data and drift apart over time. On the right, there's only one.
Agent-Native is Builder.io's answer to that problem. In this post I'll walk through what it is, how the core idea works, what you get out of the box and where I think it fits.
What Agent-Native Is
Agent-Native is, in the project's own words, "an open source framework for building apps where AI agents and UI share the same database, actions, and application state."
The key facts:
- Built by Builder.io, published as BuilderIO/agent-native on GitHub.
- MIT licensed and written in TypeScript.
- Bring your own everything. The README puts it simply: "Bring your LLM, SQL database, tools, and infrastructure. Everything you build stays yours."
The framing that stuck with me comes from Steve Sewell's post on building agent-first apps, which calls these apps "agents with faces": an agent that does real autonomous work, paired with a purpose-built UI where people can inspect, edit, approve and share what it did.
The Core Idea: Define an Action Once
Everything in Agent-Native revolves around actions. You define each capability once, and the framework exposes it everywhere. As the README says: "Define each capability once as an action: the agent uses it as a tool, and the UI calls it from code."
Here's the example from the README:
import { defineAction } from "@agent-native/core/action";
import { z } from "zod";
// One action powers every app surface: UI, agent, HTTP, MCP, A2A, and CLI.
export default defineAction({
description: "Return a friendly greeting.",
schema: z.object({
name: z.string().default("world").describe("Name to greet"),
}),
http: { method: "GET" },
run: async ({ name }) => {
return { message: `Hello, ${name}!` };
},
});The description and the Zod schema are what the agent sees when it decides whether to call the tool. The schema also validates input from every caller, and the http option sets how the action is exposed as an endpoint. In a real app, run is where your business logic and database writes live, and it runs the same way whether a button or the agent triggered it.
For a real feature, say a create-task action, that one definition powers every surface of the app:
flowchart LR
UI["React UI"] --> A
AG["Built-in agent"] --> A
HTTP["HTTP clients"] --> A
MCP["MCP clients<br/>Claude, ChatGPT"] --> A
A2A["Other apps<br/>via A2A"] --> A
CLI["CLI"] --> A
A["defineAction: create-task"] --> V["Schema validation<br/>+ permissions"]
V --> R["run()"]
R --> DB[(PostgreSQL)]
| Surface | Who uses it |
|---|---|
| UI | Your React components call the action directly from code |
| Agent | The built-in agent sees it as a tool |
| HTTP | Any backend or script can call it as an endpoint |
| MCP | External agents such as Claude or ChatGPT connect through the app's /mcp URL |
| A2A | Other agent-native apps discover and call it agent to agent |
| CLI | You can run it from the terminal |
The important consequence is spelled out in the README: "The agent does not click through the UI. It works through the same action layer as the UI." There's no second, thinner API for the model to drift away from. Or, as Sewell puts it: "Anything the UI can do, the agent can do, no matter what."
The README also mentions per-action controls for sensitive output, such as keeping a result out of chat history (persistInChatHistory: false) or out of the browser cache (persistInBrowser: false). The model call that's running at that moment still receives the result.
If you've built tool-calling agents before, this will feel familiar. It's the same discipline I recommend in Designing AI Agents: Tools, Patterns, and Pitfalls, with typed schemas like the ones in Self-Healing Tool-Call Loops with Zod. The difference is that the framework makes the tool layer and the app's real business logic the same thing.
Shared Data and Shared Application State
Sharing actions is half the story. The other half is that the agent and the UI work on the same data and know about the same application state.
- Shared data. The agent reads and writes the same SQL database the UI renders from. When the agent creates a task, it's in the list the user is looking at. There's no copy to sync.
- Shared application state. The agent knows what the user is looking at: the current page, the selected record, the active view. "Summarize this" or "move these to next week" works because the agent knows what "this" and "these" are.
That second point is what makes an in-app agent feel like a colleague rather than a search box. Most bolted-on assistants have no idea which record you have open, so users end up pasting IDs into chat.
Here's how that plays out, conceptually, for a simple request. The exact mechanics of how state reaches the agent are a framework detail, so check the docs for those:
sequenceDiagram
participant U as User
participant UI as App UI
participant AG as Agent
participant ACT as Actions
participant DB as Database
U->>UI: Select three tasks
UI-->>AG: Shared state: current view + selected IDs
U->>AG: "Move these to next week"
AG->>ACT: update-tasks(ids, dueDate)
ACT->>DB: Validate, check permissions, write
DB-->>UI: Updated tasks
UI-->>U: List shows the new due dates
What's in the Box
Beyond actions, Agent-Native ships the pieces you'd otherwise build yourself before your agent could go anywhere near real users:
| Feature | What it gives you |
|---|---|
| Agent chat | A built-in chat interface wired to your actions |
| Auth and permissions | Users, organizations and access control that apply to the agent too |
| Skills and memory | Reusable instructions and persistent memory for the agent |
| Automations | Scheduled or event-driven agent work that runs without a user present |
| Agent teams | Specialist agents in one workspace, or connected across apps |
| Database | PostgreSQL in production, PGlite for local development |
/mcp endpoint | Connect any app to Claude, ChatGPT or other MCP clients |
/visual-edit and /remix | Edit a running app on a canvas, or rebuild an effect you saw elsewhere in original code |
Sewell's post also mentions Slack and Telegram access to your agents and a rich Notion-style editor that you can import or eject into your own code, similar to how shadcn components work.
The agent teams idea deserves a note. Builder.io argues for several specialized agents over one agent with every tool, because a huge tool list bloats the context window and makes the model worse at choosing. That matches my experience. In Agent-Native, apps in the same monorepo can discover and talk to each other, which is the agent-to-agent (A2A) pattern without having to wire up the protocol yourself.
flowchart LR
subgraph Repo["One monorepo"]
MAIL["Mail agent"] <-->|A2A| CAL["Calendar agent"]
MAIL <-->|A2A| AN["Analytics agent"]
CAL <-->|A2A| AN
end
EXT["Claude or ChatGPT"] -->|MCP| MAIL
SL["Slack or Telegram"] --> CAL
Each agent keeps a small, focused tool list, and hands off to a specialist when a request falls outside it.
Templates You Can Clone
Agent-Native comes with a gallery of full apps you can clone and change, listed at agent-native.com/apps:
- Mail and Calendar for inbox and scheduling agents
- Slides and Design for generating and editing decks and interactive designs
- Analytics for asking questions of your data
- Clips for meetings, screen recordings and voice notes
- Content, Assets and Plans for content, media and planning workflows
The repo also includes a Brain knowledge-base template.
Builder.io calls this "clonable SaaS": instead of renting a tool and living with its limits, you clone an open-source app that already works and own the whole thing. Whether that changes how software is bought is an open question, but as a starting point for an internal tool it's very practical.
Getting Started
The README's quick start creates a standalone app from the chat template:
npx --yes @agent-native/core@latest create my-agent --standalone --template chatFrom there:
- Add your model keys and point the app at a database (PGlite works locally with no setup).
- Write your first action for the one job you want the agent to do.
- Call it from the UI and ask the agent to do the same thing in chat. Seeing both paths hit the same code is the "aha" moment.
- Connect an external client through the app's
/mcpURL if you want to drive it from Claude or ChatGPT. - Deploy it wherever you host your apps. You don't need a separate agent server. Sewell's walkthrough deploys a to-do app to Netlify.
The CLI collects anonymous usage data. The README links to a page explaining how to turn it off.
Where It Fits, and the Trade-offs
Where I'd reach for it:
- Internal tools and back-office apps where an agent doing the boring 80% and a human approving in a real UI is exactly the right split.
- Agent-first SaaS products where the agent is the product and the UI exists to review and steer its work.
- Teams already in TypeScript who want auth, permissions, automations and MCP without building them from scratch.
What to weigh before adopting it:
- It's young and moves fast. Pin
@agent-native/coreto a specific version and read the changelog before upgrading. - It's opinionated. You're adopting its action layer, database setup and server conventions. If you already have a mature Next.js and PostgreSQL backend, adding a well-designed MCP server in front of your existing services may be the smaller step.
- Shared actions don't remove the need for guard rails. The agent can do anything the UI can, so permissions, confirmation steps for destructive actions and human-in-the-loop approvals matter even more.
- Your evaluation work doesn't go away. The framework gets the plumbing right. It can't tell you whether the agent picks the right action for a messy request. That still needs real test cases.
Related Guides
- Model Context Protocol (MCP) Engineering for Next-Gen AI Apps: How MCP works and how to expose your own systems to agents safely.
- Designing AI Agents: Tools, Patterns, and Pitfalls: The tool-calling, memory and multi-agent patterns behind frameworks like this one.
- Architecting Agent-to-Agent (A2A) Workflows for an Autonomous CRM: What specialist agents talking to each other looks like in practice.
- Build a Self-Healing Tool Call Loop with Zod and LangGraph.js: Typed tool schemas that recover when the model gets arguments wrong.
- Durable Human-in-the-Loop (HITL) AI Workflows with LangGraph and PostgreSQL: Approval gates for agents that can change real data.
Conclusion
The idea at the centre of Agent-Native is simple and, I think, right: an agent should be a first-class user of your application, not a bolt-on with its own private API. Define each capability once, let the UI and the agent share it, and give the agent the same context the user has. The framework wraps that idea in auth, automations, MCP and a set of real templates, which removes a lot of work you'd otherwise do before your first agent is useful.
It's early, so treat it as a fast-moving dependency. But if you're starting a new internal tool or an agent-first product in TypeScript, it's well worth an afternoon with the chat template.
If you're planning an agent-powered product and want help choosing the architecture, see how I work with startups or get in touch.
References
- Agent-Native. Agent-Native (official site). https://www.agent-native.com/
- Builder.io. agent-native (GitHub repository and README). https://github.com/BuilderIO/agent-native
- Sewell, S. (2026, July 29). How (and why) to build agent-first apps. Builder.io Blog. https://www.builder.io/blog/agent-first-apps
- Agent-Native. App templates gallery. https://agent-native.com/apps