@agent-native/core 0.135.1 → 0.135.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +12 -0
- package/corpus/core/docs/content/getting-started-actions.mdx +235 -0
- package/corpus/core/docs/content/getting-started-database.mdx +253 -0
- package/corpus/core/docs/content/getting-started-pages.mdx +190 -0
- package/corpus/core/docs/content/getting-started.mdx +57 -613
- package/corpus/core/docs/content/what-is-agent-native.mdx +155 -298
- package/corpus/core/package.json +1 -1
- package/corpus/templates/clips/actions/add-comment.ts +6 -2
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +9 -2
- package/corpus/templates/clips/app/components/player/playback-comment-overlay.tsx +44 -27
- package/corpus/templates/clips/app/components/player/scrubber.tsx +10 -2
- package/corpus/templates/clips/app/components/player/video-player.tsx +4 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +22 -15
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +1 -0
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +23 -10
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +20 -9
- package/corpus/templates/content/app/components/sidebar/document-sidebar-actions.ts +31 -0
- package/corpus/templates/content/changelog/2026-07-26-viewers-can-favorite-shared-pages.md +6 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/docs/content/getting-started-actions.mdx +235 -0
- package/docs/content/getting-started-database.mdx +253 -0
- package/docs/content/getting-started-pages.mdx +190 -0
- package/docs/content/getting-started.mdx +57 -613
- package/docs/content/what-is-agent-native.mdx +155 -298
- package/package.json +1 -1
|
@@ -5,346 +5,153 @@ description: "Why most AI apps feel half-built, what makes an app truly agent-na
|
|
|
5
5
|
|
|
6
6
|
# What Is Agent-Native?
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Most "AI features" today are a chat box bolted onto an existing product. You can ask questions and get summaries, but you can't ask the AI to actually _do_ anything in the app — and even when you can, the UI has no idea what the agent just did.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Agent-native is the fix. It's a way of building software where **the AI agent and the UI are equal partners** — they share the same actions, the same database, and the same state. Everything the agent can do is also a button. Everything the user clicks is also something the agent can do. One system, two ways in.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
<Callout tone="decision">
|
|
13
|
+
|
|
14
|
+
If you only remember one thing from this page: most AI apps stop one step short of being useful — and that gap is the biggest mistake in the space right now.
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
</Callout>
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
- **Click anything you'd normally click when there is a UI.** All the buttons, lists, dashboards, keyboard shortcuts — they all call the same operations the agent can call.
|
|
18
|
-
- **Or just ask.** Type "reply to the email from Sara saying I'll be there by 3" into the agent. It opens the right thread, drafts the reply, and shows it to you for approval — exactly as if you'd done it by hand.
|
|
19
|
-
- **See what it sees.** Open an email, and the agent knows which one. Select a chart, and the agent knows which chart. Highlight a paragraph and hit Cmd+I, and the agent acts on just that paragraph.
|
|
20
|
-
- **Watch it work.** As the agent does things — opens views, edits drafts, runs reports — the UI updates in real time. You can stop it, redirect it, or take over with the mouse at any moment.
|
|
21
|
-
- **Steer it like a teammate.** Give feedback, queue another task, edit its instructions, audit what it did yesterday. It remembers, and it gets better at your workflows over time.
|
|
18
|
+
## What it looks like as a user {#what-it-looks-like}
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
Picture a mail client, analytics dashboard, or project tracker. Chat might be the first screen — or docked on the side of a full app. Either way:
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
<Cards>
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
### Just ask
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
Type "reply to the email from Sara saying I'll be there by 3." The agent opens the thread, drafts the reply, and shows it to you for approval.
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
### Or click
|
|
32
29
|
|
|
33
|
-
|
|
30
|
+
Every button, list, form, and keyboard shortcut still works — and calls the same operation the agent uses.
|
|
34
31
|
|
|
35
|
-
###
|
|
32
|
+
### See what it sees
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
Open an email and the agent knows which one. Highlight a paragraph and press `Cmd+I` — the agent acts on exactly that.
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
### Watch it work
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
The UI updates in real time as the agent opens views, edits drafts, and runs reports. Interrupt, redirect, or take over with the mouse at any moment.
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
### Steer it like a teammate
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
Give feedback, queue tasks, audit what it did, edit its instructions. It remembers, and it improves.
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
- **The agent has real context.** It sees what you're looking at, what you've selected, what you just did. It writes to the same database the UI reads from, so its work shows up immediately.
|
|
49
|
-
- **External agents can use it too.** Other agent-native apps can call this one's actions over the [A2A protocol](/docs/a2a-protocol). Claude Code, Codex, ChatGPT custom MCP apps, Cursor, and other MCP hosts can drive it as an [MCP server](/docs/mcp-protocol). One app, many entry points.
|
|
44
|
+
</Cards>
|
|
50
45
|
|
|
51
|
-
|
|
46
|
+
Here's why most products don't get there.
|
|
52
47
|
|
|
53
|
-
|
|
48
|
+
## Why most "AI apps" fall short {#the-ladder}
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
<div class="diagram-ladder">
|
|
57
|
-
<div class="diagram-card rung rung-3">
|
|
58
|
-
<span class="diagram-pill accent">Rung 3 · agent-native</span
|
|
59
|
-
><strong>Agent + UI as equal partners</strong
|
|
60
|
-
><small class="diagram-muted"
|
|
61
|
-
>One action surface. Every agent tool is also a button; every button runs
|
|
62
|
-
the same logic the agent uses.</small
|
|
63
|
-
>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="diagram-card rung rung-2">
|
|
66
|
-
<span class="diagram-pill">Rung 2</span><strong>A chat with tools</strong
|
|
67
|
-
><small class="diagram-muted"
|
|
68
|
-
>The agent can act — but it is still just a chat window. No dashboards,
|
|
69
|
-
lists, or shortcuts.</small
|
|
70
|
-
>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="diagram-card rung rung-1">
|
|
73
|
-
<span class="diagram-pill warn">Rung 1</span
|
|
74
|
-
><strong>A single LLM call</strong
|
|
75
|
-
><small class="diagram-muted"
|
|
76
|
-
>Prompt in, string out. Impressive in a demo; breaks the moment reality
|
|
77
|
-
gets messy.</small
|
|
78
|
-
>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
```
|
|
50
|
+
There's a progression most teams climb, and most stop one rung too early.
|
|
82
51
|
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
.diagram-ladder .rung {
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
gap: 6px;
|
|
93
|
-
padding: 16px 18px;
|
|
94
|
-
}
|
|
95
|
-
.diagram-ladder .rung-2 {
|
|
96
|
-
margin-inline-end: 48px;
|
|
97
|
-
}
|
|
98
|
-
.diagram-ladder .rung-1 {
|
|
99
|
-
margin-inline-end: 96px;
|
|
100
|
-
}
|
|
52
|
+
```mermaid
|
|
53
|
+
graph LR
|
|
54
|
+
R1["Rung 1: Single LLM call"]
|
|
55
|
+
R2["Rung 2: Chat with tools"]
|
|
56
|
+
R3["Rung 3: Agent + UI parity"]
|
|
57
|
+
R1 --> R2 --> R3
|
|
101
58
|
```
|
|
102
59
|
|
|
103
|
-
|
|
60
|
+
**Rung 1** — A text box sends a prompt, the AI returns a string. No way to course-correct, no persistence, no audit trail. This is what most "AI features" actually are: a Summarize button bolted onto a SaaS product. Impressive in demos, breaks in production.
|
|
61
|
+
|
|
62
|
+
**Rung 2** — The AI has tools and a chat interface. Claude, ChatGPT, and Cursor all look like this under the hood. Real step up — but it's still a chat window. No dashboards, no forms, no collaboration. Non-developers struggle to get real work done here.
|
|
63
|
+
|
|
64
|
+
**Rung 3** — Every agent action is also a button; every button runs the same logic the agent uses. The agent has real context (it sees what you're looking at and writes to the same database), and external agents can call it too over A2A and MCP.
|
|
65
|
+
|
|
66
|
+
<Callout tone="success">
|
|
67
|
+
|
|
68
|
+
**Rung 3 is agent-native.** You stopped adding buttons to a chatbot. You added an agent to an app. That's a much higher-quality product on both sides.
|
|
69
|
+
|
|
70
|
+
</Callout>
|
|
104
71
|
|
|
105
72
|
See [Key Concepts — Protocols](/docs/key-concepts#protocols) for how all of this hangs off the same action definition.
|
|
106
73
|
|
|
107
|
-
##
|
|
108
|
-
|
|
109
|
-
Even when the agent does all the heavy lifting, humans still need to:
|
|
110
|
-
|
|
111
|
-
- **See what it's doing** — progress, intermediate output, what it touched
|
|
112
|
-
- **Steer it** — give feedback, interrupt, queue the next task
|
|
113
|
-
- **Manage it** — edit its instructions, skills, memory, scheduled jobs, connected accounts
|
|
114
|
-
- **Inspect its work** — review drafts, audit history, roll back mistakes
|
|
115
|
-
- **Share its output** — dashboards, reports, forms, links to send to teammates
|
|
116
|
-
|
|
117
|
-
At minimum, "a UI for the agent" is an observability and management dashboard. At maximum, it's a full SaaS app with the agent embedded as a co-pilot. Both ends count as agent-native, and the surface can grow from one without a rewrite.
|
|
118
|
-
|
|
119
|
-
You don't have to choose every surface up front. The agent can start in rich chat, render native inline UI, live inside a full application, or run from automation and external-agent channels around the same action surface — see [Agent Surfaces](/docs/agent-surfaces) for the concrete shapes and APIs.
|
|
120
|
-
|
|
121
|
-
## Why every app benefits from an agent {#why-every-app-benefits-from-an-agent}
|
|
122
|
-
|
|
123
|
-
The flip side is just as important. Existing SaaS products keep hitting the same wall: 80% of what you need works great, and 20% you just can't change. Adding a chat sidebar rarely fixes that — the chat usually can't actually _do_ the things the UI can.
|
|
124
|
-
|
|
125
|
-
Agent-native flips that. Because every action in the app is defined once and exposed as both a button and an agent tool, the agent can do everything the buttons can — and more — without a separate "AI world" to maintain. Natural language becomes a first-class input alongside clicks.
|
|
126
|
-
|
|
127
|
-
The argument isn't "agents replace UI." It's "**agents belong inside applications, with a UI on top, as equal partners**." Even an automation-first app still needs some surface for humans to supervise, configure, and steer it — usually chat, a job history, or a small status page. See [Agent Surfaces — Automation-first app](/docs/agent-surfaces#headless).
|
|
128
|
-
|
|
129
|
-
## Agent + UI parity {#agent-ui-parity}
|
|
130
|
-
|
|
131
|
-
This is the defining principle.
|
|
132
|
-
|
|
133
|
-
- **From the UI** — click buttons, fill forms, navigate views. The UI writes to the database; the agent sees the results.
|
|
134
|
-
- **From the agent** — natural language, other agents via A2A, Slack, Telegram. The agent writes to the database; the UI updates automatically.
|
|
135
|
-
|
|
136
|
-
A good mental model is a shared state machine. The user surface and the agent
|
|
137
|
-
surface both submit typed actions; those actions behave like reducer events with
|
|
138
|
-
a schema and permission boundary around them: validate the input, authorize the
|
|
139
|
-
actor, apply the state update, then broadcast/render the result. The UI is mostly
|
|
140
|
-
a projection of that resulting state. The agent is not guessing from the DOM or
|
|
141
|
-
mutating private component state directly; it interacts through the same typed
|
|
142
|
-
action layer the UI uses.
|
|
143
|
-
|
|
144
|
-
<Diagram id="doc-block-1n18itc" title="Shared state machine" summary={"The user and agent both submit typed actions. Actions validate, authorize, apply the SQL-backed state update, then broadcast/render the new state."}>
|
|
145
|
-
|
|
146
|
-
```html
|
|
147
|
-
<div class="diagram-machine">
|
|
148
|
-
<div class="diagram-card surface user" data-rough>
|
|
149
|
-
<span class="diagram-pill">User surface</span>
|
|
150
|
-
<div class="diagram-node diagram-accent">
|
|
151
|
-
Open Design tab<br /><small class="diagram-muted">navigate.panel</small>
|
|
152
|
-
</div>
|
|
153
|
-
<div class="diagram-node">
|
|
154
|
-
Add text block<br /><small class="diagram-muted">plan.addBlock</small>
|
|
155
|
-
</div>
|
|
156
|
-
<div class="diagram-node">
|
|
157
|
-
Remove summary<br /><small class="diagram-muted">plan.removeBlock</small>
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
<div class="core">
|
|
161
|
-
<div class="lane-row">
|
|
162
|
-
<span class="diagram-pill">intent -> action</span
|
|
163
|
-
><span class="diagram-pill">action <- intent</span>
|
|
164
|
-
</div>
|
|
165
|
-
<div class="diagram-panel action" data-rough>
|
|
166
|
-
<span class="diagram-pill accent">Typed action</span
|
|
167
|
-
><strong>navigate</strong
|
|
168
|
-
><small class="diagram-muted"
|
|
169
|
-
>actor: user or agent · input: panel = Design</small
|
|
170
|
-
>
|
|
171
|
-
<div class="steps">
|
|
172
|
-
<span class="diagram-pill">validate</span
|
|
173
|
-
><span class="diagram-pill">authorize</span
|
|
174
|
-
><span class="diagram-pill">apply update</span>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
<div class="diagram-arrow diagram-muted" aria-hidden="true">↓</div>
|
|
178
|
-
<div class="diagram-panel state" data-rough>
|
|
179
|
-
<span class="diagram-pill ok">Shared state</span
|
|
180
|
-
><strong>SQL + app state</strong
|
|
181
|
-
><code>{ panel: "Design", lastActor: "user" }</code
|
|
182
|
-
><small class="diagram-muted">broadcast over live sync</small>
|
|
183
|
-
</div>
|
|
184
|
-
<div class="lane-row bottom">
|
|
185
|
-
<span class="diagram-pill ok">state -> UI</span
|
|
186
|
-
><span class="diagram-pill ok">context -> agent</span>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
<div class="diagram-card surface agent" data-rough>
|
|
190
|
-
<span class="diagram-pill">Agent surface</span>
|
|
191
|
-
<div class="diagram-node">
|
|
192
|
-
Add diagram block<br /><small class="diagram-muted">plan.addBlock</small>
|
|
193
|
-
</div>
|
|
194
|
-
<div class="diagram-node">
|
|
195
|
-
Remove stale block<br /><small class="diagram-muted"
|
|
196
|
-
>plan.removeBlock</small
|
|
197
|
-
>
|
|
198
|
-
</div>
|
|
199
|
-
<div class="diagram-node diagram-accent">
|
|
200
|
-
Focus review view<br /><small class="diagram-muted"
|
|
201
|
-
>navigate.review</small
|
|
202
|
-
>
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
205
|
-
</div>
|
|
206
|
-
```
|
|
74
|
+
## How agent and UI share the same actions {#agent-ui-parity}
|
|
207
75
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
.diagram-machine .diagram-node {
|
|
228
|
-
display: flex;
|
|
229
|
-
flex-direction: column;
|
|
230
|
-
gap: 2px;
|
|
231
|
-
padding: 10px 12px;
|
|
232
|
-
}
|
|
233
|
-
.diagram-machine .core {
|
|
234
|
-
display: flex;
|
|
235
|
-
flex-direction: column;
|
|
236
|
-
justify-content: center;
|
|
237
|
-
gap: 8px;
|
|
238
|
-
min-width: 0;
|
|
239
|
-
}
|
|
240
|
-
.diagram-machine .lane-row {
|
|
241
|
-
display: flex;
|
|
242
|
-
justify-content: space-between;
|
|
243
|
-
gap: 8px;
|
|
244
|
-
flex-wrap: wrap;
|
|
245
|
-
}
|
|
246
|
-
.diagram-machine .lane-row.bottom {
|
|
247
|
-
justify-content: center;
|
|
248
|
-
}
|
|
249
|
-
.diagram-machine .diagram-arrow {
|
|
250
|
-
font-size: 22px;
|
|
251
|
-
line-height: 1;
|
|
252
|
-
text-align: center;
|
|
253
|
-
}
|
|
254
|
-
.diagram-machine .diagram-panel {
|
|
255
|
-
display: flex;
|
|
256
|
-
flex-direction: column;
|
|
257
|
-
gap: 8px;
|
|
258
|
-
min-width: 0;
|
|
259
|
-
padding: 14px;
|
|
260
|
-
}
|
|
261
|
-
.diagram-machine .steps {
|
|
262
|
-
display: flex;
|
|
263
|
-
gap: 6px;
|
|
264
|
-
flex-wrap: wrap;
|
|
265
|
-
}
|
|
266
|
-
.diagram-machine code {
|
|
267
|
-
align-self: flex-start;
|
|
268
|
-
max-width: 100%;
|
|
269
|
-
white-space: normal;
|
|
270
|
-
}
|
|
271
|
-
@media (max-width: 760px) {
|
|
272
|
-
.diagram-machine {
|
|
273
|
-
grid-template-columns: 1fr;
|
|
274
|
-
}
|
|
275
|
-
.diagram-machine .lane-row {
|
|
276
|
-
justify-content: flex-start;
|
|
277
|
-
}
|
|
278
|
-
.diagram-machine .lane-row.bottom {
|
|
279
|
-
justify-content: flex-start;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
76
|
+
In a normal app, the UI and any "AI features" live in separate worlds — the buttons call one set of code, the AI calls another. Agent-native collapses that into one.
|
|
77
|
+
|
|
78
|
+
Every operation is defined as a typed **action**: a name, a schema, and a `run` function. The agent calls those actions as tools. The UI calls the same actions when a button is clicked. There's no translation layer, no duplication, and no drift.
|
|
79
|
+
|
|
80
|
+
```mermaid
|
|
81
|
+
graph TD
|
|
82
|
+
UI_IN["👤 Click a button"]
|
|
83
|
+
AG_IN["🤖 Type a message to the agent"]
|
|
84
|
+
ACTION["⚡ Same typed action"]
|
|
85
|
+
DB["🗄️ Shared database"]
|
|
86
|
+
UI_OUT["UI updates instantly"]
|
|
87
|
+
AG_OUT["Agent sees the change"]
|
|
88
|
+
|
|
89
|
+
UI_IN --> ACTION
|
|
90
|
+
AG_IN --> ACTION
|
|
91
|
+
ACTION --> DB
|
|
92
|
+
DB --> UI_OUT
|
|
93
|
+
DB --> AG_OUT
|
|
282
94
|
```
|
|
283
95
|
|
|
284
|
-
|
|
96
|
+
The diagram above shows what this looks like at runtime: both the user and the agent submit actions to the same layer, which writes to the same database and broadcasts updates back to both surfaces. When the agent creates a draft email, it appears in your inbox immediately. When you click Send, the agent knows it was sent. See [Key Concepts](/docs/key-concepts) for the full architecture.
|
|
285
97
|
|
|
286
|
-
|
|
98
|
+
## Why agents need a UI — and apps need an agent {#why-both}
|
|
287
99
|
|
|
288
|
-
|
|
100
|
+
These two questions answer each other.
|
|
289
101
|
|
|
290
|
-
|
|
102
|
+
<Comparison>
|
|
291
103
|
|
|
292
|
-
|
|
104
|
+
### Agents need a UI
|
|
293
105
|
|
|
294
|
-
|
|
295
|
-
- Let the agent remember preferences automatically as you correct it
|
|
296
|
-
- Write reusable how-to guides as `/slash` commands
|
|
297
|
-
- Keep custom sub-agents for specific tasks (invoked with `@mentions`)
|
|
298
|
-
- Schedule jobs to run on a cron (e.g. "every Monday morning, summarize last week")
|
|
299
|
-
- Connect external services (Gmail, Stripe, Slack, internal APIs) via per-user MCP servers
|
|
106
|
+
Even when the agent does all the heavy lifting, humans still need to see what it's doing, steer it, inspect its work, and share its output. At minimum that's an observability dashboard. At maximum it's a full app with the agent as a co-pilot. The surface can grow from one to the other without a rewrite.
|
|
300
107
|
|
|
301
|
-
|
|
108
|
+
### Apps need an agent
|
|
302
109
|
|
|
303
|
-
|
|
110
|
+
Even in a full app with every button working, natural language makes a huge difference. Because every action is defined once and exposed as both a button and a tool, the agent can do everything the buttons can — and more. Natural language becomes a first-class input alongside clicks, with no separate "AI world" to maintain.
|
|
304
111
|
|
|
305
|
-
|
|
112
|
+
</Comparison>
|
|
306
113
|
|
|
307
|
-
|
|
308
|
-
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
309
|
-
| **Traditional apps with AI bolted on** | The AI is an afterthought. Limited to autocomplete, summaries, or a chat sidebar that can't actually do anything in the app. |
|
|
310
|
-
| **Pure chat / agent interfaces** | Powerful but inaccessible. No dashboards, no workflows, no persistence. Non-developers can't use them effectively. |
|
|
311
|
-
| **Claude Code / Codex for SaaS** | Great for devs on their own machines. Doesn't translate to multi-tenant SaaS — one codebase per user on a dev-box doesn't scale. |
|
|
312
|
-
| **Agent-native apps** | The agent is a first-class citizen. It shares the same database, the same state, and can do everything the UI can do — and vice versa. |
|
|
114
|
+
The argument isn't "agents replace UI." It's **agents belong inside applications, as equal partners**. See [Agent Surfaces](/docs/agent-surfaces) for the concrete shapes and APIs.
|
|
313
115
|
|
|
314
|
-
##
|
|
116
|
+
## Per-user customization — without the complexity {#workspace-customization}
|
|
315
117
|
|
|
316
|
-
|
|
118
|
+
What makes tools like Claude Code feel powerful isn't the model — it's the customization layer: per-project instructions, skills, memory, sub-agents, connected services.
|
|
317
119
|
|
|
318
|
-
-
|
|
319
|
-
- **Product managers** configure workflows and describe changes for the development team
|
|
320
|
-
- **QA** tests the app and reports what's broken through the agent
|
|
321
|
-
- **Anyone on the team** contributes through natural language
|
|
120
|
+
Agent-native gives every user that same layer, inside your app, stored in the database rather than on the filesystem. No dev environment per user, no container per user — just rows in a table.
|
|
322
121
|
|
|
323
|
-
|
|
122
|
+
<Cards>
|
|
324
123
|
|
|
325
|
-
|
|
124
|
+
### Team-wide rules
|
|
326
125
|
|
|
327
|
-
|
|
126
|
+
Instructions every agent on the team reads — house style, escalation policy, whatever your team needs the agent to always know.
|
|
328
127
|
|
|
329
|
-
|
|
330
|
-
2. Use it immediately as a hosted app (e.g. mail.agent-native.com)
|
|
331
|
-
3. Create your own app from the template when you want to customize — "connect our Stripe account," "add a cohort chart"
|
|
332
|
-
4. Customize the source in your own repository and development workflow
|
|
333
|
-
5. Deploy your app to your own domain — or stay on agent-native.com
|
|
128
|
+
### Personal memory
|
|
334
129
|
|
|
335
|
-
|
|
130
|
+
The agent builds this automatically as you correct it. Over time it learns your preferences without you having to write anything down.
|
|
336
131
|
|
|
337
|
-
|
|
132
|
+
### `/slash` commands
|
|
338
133
|
|
|
339
|
-
|
|
134
|
+
Reusable how-to guides for common workflows. Type `/weekly-report` and the agent knows exactly what to do.
|
|
135
|
+
|
|
136
|
+
### `@sub-agents`
|
|
137
|
+
|
|
138
|
+
Specialized agents for specific tasks, scoped to a user or team. Delegate the routine stuff without writing a new integration.
|
|
139
|
+
|
|
140
|
+
### Scheduled jobs
|
|
141
|
+
|
|
142
|
+
Set it and forget it. "Every Monday, summarize last week and draft the team update."
|
|
340
143
|
|
|
341
|
-
|
|
144
|
+
### External services
|
|
342
145
|
|
|
343
|
-
|
|
146
|
+
Per-user MCP server connections. Each person can plug in their own tools without affecting anyone else's setup.
|
|
344
147
|
|
|
345
|
-
|
|
148
|
+
</Cards>
|
|
346
149
|
|
|
347
|
-
|
|
150
|
+
That's Claude Code-level flexibility in a multi-tenant SaaS product. See [Agent Resources](/docs/agent-resources) for the full concept.
|
|
151
|
+
|
|
152
|
+
## What does it look like in code? {#what-does-it-look-like-in-code}
|
|
153
|
+
|
|
154
|
+
Every operation in an agent-native app is an **action** — defined once, available to both the agent and the UI.
|
|
348
155
|
|
|
349
156
|
<AnnotatedCode
|
|
350
157
|
id="doc-block-n4jy5o"
|
|
@@ -373,6 +180,8 @@ If you're building or extending an agent-native app, here's the central pattern:
|
|
|
373
180
|
]}
|
|
374
181
|
/>
|
|
375
182
|
|
|
183
|
+
The same action is then callable from a React component, from the agent in chat, and from any external agent or MCP host:
|
|
184
|
+
|
|
376
185
|
```tsx
|
|
377
186
|
// In any React component — same action, called from a button
|
|
378
187
|
const { mutate } = useActionMutation("reply-to-email");
|
|
@@ -388,16 +197,64 @@ import { AgentSidebar } from "@agent-native/core/client/agent-chat";
|
|
|
388
197
|
<AgentSidebar />;
|
|
389
198
|
```
|
|
390
199
|
|
|
391
|
-
One action
|
|
200
|
+
One action definition powers the UI button, the agent tool, an HTTP endpoint, an MCP surface, an A2A integration, and a CLI command. See [Actions](/docs/actions) for the full reference.
|
|
201
|
+
|
|
202
|
+
## How to get started {#how-to-get-started}
|
|
203
|
+
|
|
204
|
+
Agent-native apps follow a start-from-a-working-app model. Pick a template — Calendar, Mail, Analytics, Forms, and more — and make it yours.
|
|
205
|
+
|
|
206
|
+
<Steps>
|
|
207
|
+
|
|
208
|
+
### Pick a template
|
|
209
|
+
|
|
210
|
+
Browse [agent-native.com/templates](/templates) and pick the one closest to what you want to build.
|
|
211
|
+
|
|
212
|
+
### Use it immediately
|
|
213
|
+
|
|
214
|
+
Every template deploys as a hosted app (e.g. `mail.agent-native.com`). Try it before you touch any code.
|
|
215
|
+
|
|
216
|
+
### Clone and customize
|
|
217
|
+
|
|
218
|
+
When you're ready to change something — "connect our Stripe account," "add a cohort chart" — create your own app from the template and customize the source in your own repository.
|
|
219
|
+
|
|
220
|
+
### Deploy to your domain
|
|
221
|
+
|
|
222
|
+
Ship your app to your own domain, or stay on agent-native.com. Because it's _your_ app, you own the source and can evolve it independently.
|
|
223
|
+
|
|
224
|
+
</Steps>
|
|
225
|
+
|
|
226
|
+
Not ready for a whole template? Add a **skill** to a coding agent you already use: `npx @agent-native/core@latest skills add visual-plan`. See the [Skills Guide](/docs/skills-guide#app-backed-skills).
|
|
227
|
+
|
|
228
|
+
## Composable agents {#composable-agents}
|
|
229
|
+
|
|
230
|
+
Agent-native apps can talk to each other. From inside the mail app, you can tag the analytics agent to query data and include the result in a draft. The agents discover what other agents are available, hand off work, and surface results in the UI you're already in — powered by [A2A](/docs/a2a-protocol) and [MCP](/docs/mcp-protocol) under the hood.
|
|
392
231
|
|
|
393
232
|
## What's next {#whats-next}
|
|
394
233
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
234
|
+
<Cards>
|
|
235
|
+
|
|
236
|
+
### [Getting Started](/docs/getting-started)
|
|
237
|
+
|
|
238
|
+
Build a working chat app in under five minutes, then add actions, a database, and a page.
|
|
239
|
+
|
|
240
|
+
### [Key Concepts](/docs/key-concepts)
|
|
241
|
+
|
|
242
|
+
The architecture underneath everything on this page: SQL, actions, polling sync, and context awareness.
|
|
243
|
+
|
|
244
|
+
### [Agent Surfaces](/docs/agent-surfaces)
|
|
245
|
+
|
|
246
|
+
All the shapes an agent-native app can take: chat, inline UI, full app pages, sidecars, automation, and external agents.
|
|
247
|
+
|
|
248
|
+
### [Templates](/docs/cloneable-saas)
|
|
249
|
+
|
|
250
|
+
Complete, working products you own and customize — not blank scaffolds.
|
|
251
|
+
|
|
252
|
+
### [Agent Resources](/docs/agent-resources)
|
|
253
|
+
|
|
254
|
+
The per-user customization layer: skills, memory, instructions, and MCP connections — backed by SQL, not files.
|
|
255
|
+
|
|
256
|
+
### [FAQ](/docs/faq)
|
|
257
|
+
|
|
258
|
+
Quick answers on cost, hosting, models, and templates.
|
|
259
|
+
|
|
260
|
+
</Cards>
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.135.
|
|
3
|
+
"version": "0.135.3",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -67,6 +67,10 @@ export default defineAction({
|
|
|
67
67
|
|
|
68
68
|
if (!rec) throw new Error(`Recording not found: ${args.recordingId}`);
|
|
69
69
|
|
|
70
|
+
// Floor to the nearest second so nearby comments land on the same
|
|
71
|
+
// timestamp bucket for scrubber grouping and the playback overlay.
|
|
72
|
+
const videoTimestampMs = Math.floor(args.videoTimestampMs / 1000) * 1000;
|
|
73
|
+
|
|
70
74
|
await db.insert(schema.recordingComments).values({
|
|
71
75
|
id,
|
|
72
76
|
recordingId: args.recordingId,
|
|
@@ -76,7 +80,7 @@ export default defineAction({
|
|
|
76
80
|
authorEmail,
|
|
77
81
|
authorName: args.authorName ?? null,
|
|
78
82
|
content: args.content,
|
|
79
|
-
videoTimestampMs
|
|
83
|
+
videoTimestampMs,
|
|
80
84
|
createdAt: now,
|
|
81
85
|
updatedAt: now,
|
|
82
86
|
});
|
|
@@ -94,7 +98,7 @@ export default defineAction({
|
|
|
94
98
|
await writeAppState("refresh-signal", { ts: Date.now() });
|
|
95
99
|
|
|
96
100
|
console.log(
|
|
97
|
-
`Added comment to recording ${args.recordingId} @ ${
|
|
101
|
+
`Added comment to recording ${args.recordingId} @ ${videoTimestampMs}ms (thread: ${threadId})`,
|
|
98
102
|
);
|
|
99
103
|
|
|
100
104
|
return { id, threadId, notified };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
useActionMutation,
|
|
3
|
+
useAvatarUrl,
|
|
4
|
+
} from "@agent-native/core/client/hooks";
|
|
2
5
|
import { useT } from "@agent-native/core/client/i18n";
|
|
3
6
|
import {
|
|
4
7
|
IconSend,
|
|
@@ -12,7 +15,7 @@ import {
|
|
|
12
15
|
import { useQueryClient } from "@tanstack/react-query";
|
|
13
16
|
import { type Ref, useEffect, useMemo, useRef, useState } from "react";
|
|
14
17
|
|
|
15
|
-
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
|
18
|
+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
16
19
|
import { Button } from "@/components/ui/button";
|
|
17
20
|
import {
|
|
18
21
|
DropdownMenu,
|
|
@@ -860,10 +863,14 @@ function CommentCard({
|
|
|
860
863
|
}
|
|
861
864
|
|
|
862
865
|
const commentContent = linkifyCommentContent(comment.content);
|
|
866
|
+
const avatarUrl = useAvatarUrl(comment.authorEmail);
|
|
863
867
|
|
|
864
868
|
return (
|
|
865
869
|
<div className={cn("flex gap-2", comment.resolved && "opacity-60")}>
|
|
866
870
|
<Avatar className="h-7 w-7 shrink-0">
|
|
871
|
+
{avatarUrl ? (
|
|
872
|
+
<AvatarImage src={avatarUrl} alt={displayName(comment)} />
|
|
873
|
+
) : null}
|
|
867
874
|
<AvatarFallback className="text-[10px] bg-primary text-primary-foreground">
|
|
868
875
|
{initials(displayName(comment))}
|
|
869
876
|
</AvatarFallback>
|