@agent-native/core 0.55.0 → 0.56.0

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.
Files changed (103) hide show
  1. package/README.md +7 -7
  2. package/dist/action-ui.d.ts +17 -0
  3. package/dist/action-ui.d.ts.map +1 -0
  4. package/dist/action-ui.js +23 -0
  5. package/dist/action-ui.js.map +1 -0
  6. package/dist/action.d.ts +8 -1
  7. package/dist/action.d.ts.map +1 -1
  8. package/dist/action.js +3 -0
  9. package/dist/action.js.map +1 -1
  10. package/dist/agent/production-agent.d.ts +2 -0
  11. package/dist/agent/production-agent.d.ts.map +1 -1
  12. package/dist/agent/production-agent.js +7 -1
  13. package/dist/agent/production-agent.js.map +1 -1
  14. package/dist/agent/thread-data-builder.d.ts +4 -0
  15. package/dist/agent/thread-data-builder.d.ts.map +1 -1
  16. package/dist/agent/thread-data-builder.js +4 -0
  17. package/dist/agent/thread-data-builder.js.map +1 -1
  18. package/dist/agent/types.d.ts +2 -0
  19. package/dist/agent/types.d.ts.map +1 -1
  20. package/dist/agent/types.js.map +1 -1
  21. package/dist/client/AssistantChat.d.ts.map +1 -1
  22. package/dist/client/AssistantChat.js +6 -4
  23. package/dist/client/AssistantChat.js.map +1 -1
  24. package/dist/client/chat/index.d.ts +5 -3
  25. package/dist/client/chat/index.d.ts.map +1 -1
  26. package/dist/client/chat/index.js +4 -3
  27. package/dist/client/chat/index.js.map +1 -1
  28. package/dist/client/chat/run-recovery.d.ts.map +1 -1
  29. package/dist/client/chat/run-recovery.js +9 -5
  30. package/dist/client/chat/run-recovery.js.map +1 -1
  31. package/dist/client/chat/runtime.d.ts +354 -0
  32. package/dist/client/chat/runtime.d.ts.map +1 -0
  33. package/dist/client/chat/runtime.js +2 -0
  34. package/dist/client/chat/runtime.js.map +1 -0
  35. package/dist/client/chat/tool-call-display.d.ts +4 -1
  36. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  37. package/dist/client/chat/tool-call-display.js +6 -5
  38. package/dist/client/chat/tool-call-display.js.map +1 -1
  39. package/dist/client/chat/tool-render-registry.d.ts +11 -0
  40. package/dist/client/chat/tool-render-registry.d.ts.map +1 -1
  41. package/dist/client/chat/tool-render-registry.js +47 -1
  42. package/dist/client/chat/tool-render-registry.js.map +1 -1
  43. package/dist/client/chat/widgets/builtin-tool-renderers.js +73 -18
  44. package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
  45. package/dist/client/chat/widgets/data-widget-types.d.ts +1 -51
  46. package/dist/client/chat/widgets/data-widget-types.d.ts.map +1 -1
  47. package/dist/client/chat/widgets/data-widget-types.js +1 -92
  48. package/dist/client/chat/widgets/data-widget-types.js.map +1 -1
  49. package/dist/client/chat-view-transition.d.ts +12 -0
  50. package/dist/client/chat-view-transition.d.ts.map +1 -1
  51. package/dist/client/chat-view-transition.js +16 -0
  52. package/dist/client/chat-view-transition.js.map +1 -1
  53. package/dist/client/index.d.ts +5 -3
  54. package/dist/client/index.d.ts.map +1 -1
  55. package/dist/client/index.js +4 -3
  56. package/dist/client/index.js.map +1 -1
  57. package/dist/client/route-state.d.ts.map +1 -1
  58. package/dist/client/route-state.js +2 -15
  59. package/dist/client/route-state.js.map +1 -1
  60. package/dist/client/sse-event-processor.d.ts +3 -0
  61. package/dist/client/sse-event-processor.d.ts.map +1 -1
  62. package/dist/client/sse-event-processor.js +2 -0
  63. package/dist/client/sse-event-processor.js.map +1 -1
  64. package/dist/data-widgets/index.d.ts +326 -0
  65. package/dist/data-widgets/index.d.ts.map +1 -0
  66. package/dist/data-widgets/index.js +232 -0
  67. package/dist/data-widgets/index.js.map +1 -0
  68. package/dist/index.browser.d.ts +2 -0
  69. package/dist/index.browser.d.ts.map +1 -1
  70. package/dist/index.browser.js +2 -0
  71. package/dist/index.browser.js.map +1 -1
  72. package/dist/index.d.ts +2 -0
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +2 -0
  75. package/dist/index.js.map +1 -1
  76. package/dist/provider-api/corpus-jobs.d.ts +160 -0
  77. package/dist/provider-api/corpus-jobs.d.ts.map +1 -1
  78. package/dist/provider-api/corpus-jobs.js +44 -0
  79. package/dist/provider-api/corpus-jobs.js.map +1 -1
  80. package/dist/provider-api/index.d.ts +39 -0
  81. package/dist/provider-api/index.d.ts.map +1 -1
  82. package/dist/provider-api/index.js +53 -0
  83. package/dist/provider-api/index.js.map +1 -1
  84. package/dist/server/action-discovery.d.ts.map +1 -1
  85. package/dist/server/action-discovery.js +5 -0
  86. package/dist/server/action-discovery.js.map +1 -1
  87. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  88. package/dist/server/agent-chat-plugin.js +5 -0
  89. package/dist/server/agent-chat-plugin.js.map +1 -1
  90. package/dist/styles/agent-native.css +9 -2
  91. package/dist/vite/client.d.ts.map +1 -1
  92. package/dist/vite/client.js +1 -0
  93. package/dist/vite/client.js.map +1 -1
  94. package/docs/content/actions.md +52 -0
  95. package/docs/content/components.md +24 -1
  96. package/docs/content/drop-in-agent.md +9 -2
  97. package/docs/content/faq.md +5 -4
  98. package/docs/content/getting-started.md +39 -88
  99. package/docs/content/key-concepts.md +22 -22
  100. package/docs/content/mcp-apps.md +1 -1
  101. package/docs/content/native-chat-ui.md +210 -0
  102. package/docs/content/what-is-agent-native.md +2 -2
  103. package/package.json +2 -1
@@ -305,6 +305,58 @@ const { data, isLoading } = useActionQuery("get-lead", { leadId });
305
305
 
306
306
  The query is cached under `["action", "get-lead", { leadId }]` and auto-invalidated on any mutating action that completes.
307
307
 
308
+ ## Rendering native chat UI {#native-chat-ui}
309
+
310
+ Actions can return structured widget data that the in-app chat renders
311
+ natively. This is the first-party chat path for reusable tables, charts, setup
312
+ summaries, and insight cards; use [MCP Apps](/docs/mcp-apps) for inline UI in
313
+ external MCP hosts.
314
+
315
+ ```ts
316
+ import {
317
+ ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,
318
+ dataInsightsWidgetResultSchema,
319
+ defineAction,
320
+ } from "@agent-native/core";
321
+ import { createDataInsightsWidgetResult } from "@agent-native/core/data-widgets";
322
+
323
+ export default defineAction({
324
+ description: "Summarize response trends.",
325
+ readOnly: true,
326
+ outputSchema: dataInsightsWidgetResultSchema,
327
+ chatUI: { renderer: ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER },
328
+ run: async () =>
329
+ createDataInsightsWidgetResult({
330
+ title: "Response trends",
331
+ chartSeries: {
332
+ type: "line",
333
+ xKey: "day",
334
+ series: [{ key: "responses", label: "Responses" }],
335
+ data: [
336
+ { day: "Mon", responses: 12 },
337
+ { day: "Tue", responses: 18 },
338
+ ],
339
+ },
340
+ table: {
341
+ columns: [
342
+ { key: "day", label: "Day" },
343
+ { key: "responses", label: "Responses", align: "right" },
344
+ ],
345
+ rows: [
346
+ { day: "Mon", responses: 12 },
347
+ { day: "Tue", responses: 18 },
348
+ ],
349
+ },
350
+ }),
351
+ });
352
+ ```
353
+
354
+ The built-in discriminants are `"data-table"`, `"data-chart"`, and
355
+ `"data-insights"`. Their server-safe builders and schemas are exported from
356
+ `@agent-native/core/data-widgets`, and native renderer ids are exported from
357
+ `@agent-native/core`. See [Native Chat UI](/docs/native-chat-ui) for the full
358
+ result contract and BYO runtime guidance.
359
+
308
360
  ## Calling it from the CLI {#cli}
309
361
 
310
362
  Every action is runnable via `pnpm action`:
@@ -35,10 +35,16 @@ so bundlers choose the browser-safe entry.
35
35
  | `<AgentChatSurface>` | `@agent-native/core/client` or `/client/chat` | You want chat in panel or page mode without the sidebar wrapper. |
36
36
  | `<AssistantChat>` | `@agent-native/core/client` or `/client/chat` | You want to own surrounding chrome while keeping the standard conversation and composer runtime. |
37
37
  | `<MultiTabAssistantChat>` | `@agent-native/core/client` or `/client/chat` | You want the framework's thread tabs without `AgentPanel` chrome. |
38
- | `createAgentChatAdapter()` | `@agent-native/core/client` or `/client/chat` | You are building a custom assistant-ui runtime and need the Agent-Native chat transport. |
38
+ | `createAgentChatAdapter()` | `@agent-native/core/client` or `/client/chat` | You are adapting a BYO assistant-ui transport into the Agent-Native chat runtime. |
39
39
  | `useChatThreads()` | `@agent-native/core/client` or `/client/chat` | You need a custom thread list, history picker, or scoped chat UI. |
40
40
  | `sendToAgentChat()` | `@agent-native/core/client` or `/client/chat` | A product action should hand work to the agent chat. |
41
41
 
42
+ In docs, `AgentChatRuntime` means this standard runtime posture: assistant-ui
43
+ thread state, Agent-Native streaming, run recovery, attachments, model
44
+ selection, approvals, native tool widgets, and SQL-backed sync. It is not a
45
+ separate protocol replacement. BYO agents should adapt into this runtime with
46
+ `createAgentChatAdapter()` when they want the normal app chat experience.
47
+
42
48
  The shortest custom route is still a pre-wired surface:
43
49
 
44
50
  ```tsx
@@ -116,6 +122,23 @@ This layer is intentionally data-first: you own where messages come from, and
116
122
  the renderer owns consistent markdown, attachments, notices, artifacts, and
117
123
  tool-call display.
118
124
 
125
+ ## Native Tool Widgets {#native-tool-widgets}
126
+
127
+ Use native tool widgets when an action result should render as app-quality UI
128
+ inside chat instead of plain JSON. Built-in reusable outputs include
129
+ `DataTableWidget`, `DataChartWidget`, and `DataWidgetResult`; they are exported
130
+ from `@agent-native/core/client/chat` and the root client entry. See
131
+ [Native Chat UI](/docs/native-chat-ui) for the action result contract.
132
+
133
+ | API | Use when |
134
+ | -------------------------------- | --------------------------------------------------------------------------------------- |
135
+ | `DataTableWidget` | You want an action result to render rows and columns in native chat. |
136
+ | `DataChartWidget` | You want compact bar, line, or area chart output in native chat. |
137
+ | `DataWidgetResult` | You want a typed result shape for `"data-table"`, `"data-chart"`, or `"data-insights"`. |
138
+ | `registerActionChatRenderer()` | You need an action-declared renderer selected by exact `chatUI.renderer`. |
139
+ | `registerToolRenderer()` | You need a product-specific native renderer for a non-core tool result. |
140
+ | `registerReservedToolRenderer()` | Framework code needs a reserved renderer that wins before template renderers. |
141
+
119
142
  ## Realtime Collab And Presence {#collab-presence}
120
143
 
121
144
  Use `@agent-native/core/client/collab` for Liveblocks-style presence and
@@ -184,14 +184,21 @@ framework own the agent runtime:
184
184
  - **`@agent-native/core/client/conversation`** — use this for transcript
185
185
  rendering without the full chat runtime.
186
186
  - **`createAgentChatAdapter()`** — use this only when building a custom
187
- assistant-ui runtime. It connects to the same `/_agent-native/agent-chat`
188
- stream and preserves run-manager recovery, attachments, model selection, and
187
+ assistant-ui transport for the standard Agent-Native chat runtime. It
188
+ connects to the same `/_agent-native/agent-chat` stream and preserves
189
+ run-manager recovery, attachments, model selection, native widgets, and
189
190
  thread metadata.
190
191
 
191
192
  Avoid posting directly to `/_agent-native/agent-chat` from product UI. If a
192
193
  lower-level helper is missing for a real custom surface, add that named helper
193
194
  first so client code does not learn a second, ad hoc transport.
194
195
 
196
+ For BYO agent runtimes, keep actions and SQL-backed app state as the contract.
197
+ Adapt the runtime into `<AssistantChat createAdapter={...} />` when you want
198
+ Agent-Native chat behavior, or use `PromptComposer` by itself only when the
199
+ external runtime owns the transcript and loop. See
200
+ [Native Chat UI](/docs/native-chat-ui#byo-agent-runtimes).
201
+
195
202
  ### Build your own sidebar from pieces {#build-your-own-sidebar}
196
203
 
197
204
  The stock sidebar is optional. This example builds the agent-side UI itself.
@@ -15,11 +15,12 @@ Agent-native is a framework for building apps where the AI agent and the UI are
15
15
 
16
16
  ### Who is this for? {#who-is-this-for}
17
17
 
18
- Anyone who wants to ship an AI-powered product without spending a year building the boring parts. That includes:
18
+ Agent-native is for people who want a real app and an AI agent to work from the same data and actions. The common paths are:
19
19
 
20
- - **Founders and PMs** who want to fork a working SaaS and make it their ownsee [Templates](/docs/cloneable-saas).
21
- - **Operators** who want a [pure-agent app](/docs/pure-agent-apps) an agent that does work in the background with a minimal management UI.
22
- - **Developers** building agent-driven products from scratch and want auth, multi-tenancy, real-time sync, and an architecture that won't break when AI is the primary user.
20
+ - **Use a hosted app** if you want Mail, Calendar, Forms, Plan, or another finished template with no setup start at the [template gallery](/templates).
21
+ - **Fork and customize a template** if you want your own SaaS product with auth, database, UI, and agent actions already wired see [Templates](/docs/cloneable-saas).
22
+ - **Build from scratch** if you want the framework primitives for a new agent-driven product start with [Getting Started](/docs/getting-started).
23
+ - **Connect another agent or code tool** if you want Claude, ChatGPT, Codex, Cursor, or GitHub Copilot / VS Code to use an agent-native app — see [External Agents](/docs/external-agents) and [Skills Guide](/docs/skills-guide).
23
24
 
24
25
  ### How is this different from adding AI to an existing app? {#how-is-this-different}
25
26
 
@@ -1,26 +1,26 @@
1
1
  ---
2
2
  title: "Getting Started"
3
- description: "Pick a template, create your app, and start customizing it with AI."
3
+ description: "Choose the right path: hosted apps, local setup, agent-native skills, or external-agent connections."
4
4
  ---
5
5
 
6
6
  # Getting Started
7
7
 
8
- By the end of this page, you'll have a working app Mail, Calendar, Forms, or any other template running with an AI agent built into the sidebar that can drive every part of it.
8
+ Agent-Native is for apps where a real UI and an AI agent share the same actions, data, and state. This page helps you choose the right starting point, then walks through the local setup path.
9
9
 
10
- ## Who is this for? {#who-is-this-for}
10
+ ## Pick your path {#who-is-this-for}
11
11
 
12
- There are two ways to use agent-native, depending on how hands-on you want to be:
12
+ Start with the path that matches what you want to do next:
13
13
 
14
- - **You want to use a hosted version.** Try a template right now at [agent-native.com/templates](/templates). Each template is a live, hosted app — you sign in, start using it, and the agent is already there. No install, no setup. You can stop reading this page and head straight to the [template gallery](/templates).
15
- - **You want to run locally or customize it.** You'll clone a template, run it on your machine, and shape it however you want — branding, features, integrations. The rest of this page is for you. You'll need [Node.js 22 or newer (LTS recommended)](https://nodejs.org) and [pnpm](https://pnpm.io) installed.
16
- - **You just want to add agent-native to your existing coding agent.** Skip the scaffold entirely install a skill into Claude Code, Codex, or Cursor with one command. Jump to [Try it with a skill](#try-with-a-skill).
17
- - **You want your existing agent to call an agent-native app.** Connect Claude, ChatGPT, Codex, Cursor, OpenCode, GitHub Copilot / VS Code, or another MCP host through [External Agents](/docs/external-agents).
14
+ - **Use a starter app.** Browse the [template gallery](/templates). Hosted apps already include sign-in, data, and the agent sidebar. No install required.
15
+ - **Build or customize your own app.** Continue with [Create a local app](#create-your-app). You'll scaffold a template, run it locally, then change the code, brand, data model, and integrations.
16
+ - **Add agent-native skills to a code tool.** Jump to [Try it with a skill](#try-with-a-skill) to add Plans or PR Recaps to Claude Code, Codex, or Cursor without scaffolding an app.
17
+ - **Connect an external agent to an app.** Use [External Agents](/docs/external-agents) to connect Claude, ChatGPT, Codex, Cursor, OpenCode, GitHub Copilot / VS Code, or another MCP host to an existing app.
18
18
 
19
- Not sure which path? If you've never written code, the hosted version is for you. If you have a developer or AI coding tool ready, the local path gives you total control.
19
+ If you're not sure, use the hosted app when you want to use software now. Use the local path when you want to own and change the software.
20
20
 
21
- ## First run {#create-your-app}
21
+ ## Create a local app {#create-your-app}
22
22
 
23
- Three commands and you're up:
23
+ You'll need [Node.js 22 or newer](https://nodejs.org) and [pnpm](https://pnpm.io) installed. Then run:
24
24
 
25
25
  ```bash
26
26
  npx @agent-native/core@latest create my-platform
@@ -28,7 +28,7 @@ cd my-platform
28
28
  pnpm install && pnpm dev
29
29
  ```
30
30
 
31
- The `create` command defaults to a workspace monorepo. It shows a multi-select picker — pick one template or several (Mail + Calendar + Forms, for example) and they all scaffold into one workspace sharing auth, brand, and agent config. If you want one app directory instead, pass `--standalone`.
31
+ The `create` command opens a template picker. Pick one template for a single app, or pick several templates to create a workspace where the apps share auth, brand, and agent configuration. If you want one app directory instead of a workspace, pass `--standalone`.
32
32
 
33
33
  Open the URL the dev server prints. The workspace gateway always starts on port 8080 and serves every app through it; individual apps run on their own ports that are printed at startup. Standalone apps default to `http://localhost:3000`.
34
34
 
@@ -38,46 +38,27 @@ In local development the embedded agent panel picks up your existing Claude Code
38
38
 
39
39
  ## What just happened? {#what-just-happened}
40
40
 
41
- You now have a real, full-featured app running on your machine. Open it in the browser and try it:
41
+ You now have a real app running on your machine with an agent built into it:
42
42
 
43
- - Click around the UI like you would any SaaS product.
44
- - Open the agent panel on the right side. Type something like "show me my settings" or "create a new entry called Welcome." Watch the agent click through the app on your behalf.
45
- - Anything you do by clicking, the agent can do by reading and writing the same database. Anything the agent does shows up in the UI immediately.
43
+ - The UI works like a normal SaaS product: routes, forms, tables, settings, and keyboard flows.
44
+ - The agent panel can read the current screen and run the same actions the UI runs.
45
+ - Changes stay in sync because the UI and agent share the same database and application state.
46
46
 
47
47
  That parity between agent and UI is the whole point — see [What Is Agent-Native?](/docs/what-is-agent-native) for the bigger picture.
48
48
 
49
- ## Templates {#templates}
49
+ ## Pick a template {#templates}
50
50
 
51
- Each template is a complete app with UI, agent actions, database schema, and AI instructions ready to go:
51
+ Templates are complete apps, not blank starters. Choose one when you want a familiar product to customize:
52
52
 
53
- | Template | What it is |
54
- | ------------------------------------- | --------------------------------------------------------------------- |
55
- | [Calendar](/docs/template-calendar) | Agent-native Google Calendar + Calendly-style booking |
56
- | [Content](/docs/template-content) | Open-source Obsidian for MDX |
57
- | [Brain](/docs/template-brain) | Company chat with cited institutional memory |
58
- | [Assets](/docs/template-assets) | Brand asset libraries and generated media |
59
- | [Slides](/docs/template-slides) | Agent-native Google Slides / Pitch |
60
- | [Video](/docs/template-videos) | Programmatic motion graphics and product-demo videos on Remotion |
61
- | [Analytics](/docs/template-analytics) | Agent-native Amplitude / Mixpanel |
62
- | [Mail](/docs/template-mail) | Agent-native Superhuman / Gmail |
63
- | [Clips](/docs/template-clips) | Async screen + camera recording with transcription and AI summaries |
64
- | [Design](/docs/template-design) | Agent-native HTML prototyping studio |
65
- | [Forms](/docs/template-forms) | Agent-native Typeform |
66
- | [Plan](/docs/template-plan) | Visual plans and PR recaps with diagrams, wireframes, and annotations |
67
- | [Dispatch](/docs/template-dispatch) | Workspace control plane — shared secrets, integrations, routing |
53
+ - **Productivity apps** [Mail](/docs/template-mail), [Calendar](/docs/template-calendar), [Forms](/docs/template-forms), [Content](/docs/template-content), [Slides](/docs/template-slides), [Design](/docs/template-design), [Clips](/docs/template-clips), and [Video](/docs/template-videos)
54
+ - **Team and data apps** — [Analytics](/docs/template-analytics), [Brain](/docs/template-brain), [Dispatch](/docs/template-dispatch), [Assets](/docs/template-assets), and [Plan](/docs/template-plan)
55
+ - **Bare starting point** — [Starter](/docs/template-starter), a minimal app with the framework wiring and no domain model
68
56
 
69
- Browse the [template gallery](/templates) for live demos, or see [Templates](/docs/cloneable-saas) for the full catalog and the clone → customize → deploy flow.
57
+ Browse the [template gallery](/templates) for live hosted apps. See [Templates](/docs/cloneable-saas) for the full catalog and the clone → customize → deploy flow.
70
58
 
71
- ## Creating vs adding apps {#creating-vs-adding-apps}
59
+ ## Add more apps to a workspace {#creating-vs-adding-apps}
72
60
 
73
- Run `create` from the folder where you want a brand-new workspace:
74
-
75
- ```bash
76
- cd ~/projects
77
- npx @agent-native/core@latest create my-platform
78
- ```
79
-
80
- After a workspace exists, run app commands from the workspace root:
61
+ `create` (above) makes a brand-new workspace. Once you have one, add more apps to it with `add-app`, run from the workspace root:
81
62
 
82
63
  ```bash
83
64
  cd my-platform
@@ -86,9 +67,9 @@ pnpm install
86
67
  pnpm dev
87
68
  ```
88
69
 
89
- If your terminal is inside `apps/content` or another app folder, the CLI still detects the workspace and adds the new app as a sibling under `apps/`. Afterward, go back to the workspace root before running `pnpm install` or `pnpm dev`.
70
+ If your terminal is inside `apps/content` or another app folder, the CLI still detects the workspace and adds the new app as a sibling under `apps/`. Go back to the workspace root before running `pnpm install` or `pnpm dev`.
90
71
 
91
- To make a second app from the same template, give it a new app name:
72
+ To add another app from a specific template, pass a name and `--template`:
92
73
 
93
74
  ```bash
94
75
  npx @agent-native/core@latest add-app design-lab --template design
@@ -96,7 +77,7 @@ npx @agent-native/core@latest add-app design-lab --template design
96
77
 
97
78
  ## Try it with a skill {#try-with-a-skill}
98
79
 
99
- Don't want to scaffold a whole app yet? Add agent-native superpowers to a coding agent you already use — Claude Code, Codex, or Cursor — with a single command. Installing the **Plans** skill turns the plans your agent writes into structured, reviewable docs with diagrams, wireframes, and inline comments:
80
+ Don't want to scaffold an app? Add agent-native capabilities to a coding agent you already use. Installing the **Plans** skill turns the plans your agent writes into structured, reviewable docs with diagrams, wireframes, and inline comments:
100
81
 
101
82
  ```bash
102
83
  npx @agent-native/core@latest skills add visual-plan
@@ -104,6 +85,8 @@ npx @agent-native/core@latest skills add visual-plan
104
85
 
105
86
  That one command installs the skill instructions, registers the hosted MCP connector, and signs you in — no marketplace browsing, no manual OAuth. Then run `/visual-plan` in your agent. See the [Skills Guide](/docs/skills-guide#app-backed-skills) for more skills, local/offline installs, and how app-backed skills work.
106
87
 
88
+ Need the opposite direction, where Claude, ChatGPT, Codex, Cursor, OpenCode, GitHub Copilot / VS Code, or another MCP host calls an agent-native app? Use [External Agents](/docs/external-agents).
89
+
107
90
  ## Project structure {#project-structure}
108
91
 
109
92
  Every agent-native app — whether from a template or from scratch — follows the same structure:
@@ -118,30 +101,6 @@ my-app/
118
101
 
119
102
  Templates add domain-specific code on top: database schemas in `server/db/`, API routes in `server/routes/api/`, and actions in `actions/`. Building from scratch? See [Creating Templates](/docs/creating-templates) for `vite.config.ts`, `tsconfig.json`, and Tailwind setup.
120
103
 
121
- ## Next docs to read {#next-docs}
122
-
123
- Once your app is running, the most useful follow-ups are:
124
-
125
- - **Connect Slack or email** so you can message your agent from anywhere — see [Messaging](/docs/messaging).
126
- - **Set up Dispatch as your central inbox** to triage messages and orchestrate across multiple apps — see [Dispatch](/docs/dispatch).
127
- - **Customize via Workspace** — edit instructions, skills, memory, and connect MCP servers per user — see [Workspace](/docs/workspace).
128
- - **Troubleshoot common setup questions** — see the [FAQ](/docs/faq).
129
- - **Understand the architecture** — see [Key Concepts](/docs/key-concepts) for how SQL, actions, polling sync, and context awareness fit together.
130
-
131
- ## Try one concrete next step {#first-next-step}
132
-
133
- From here, use any AI coding tool (Agent-Native Code, Claude Code, Cursor, Windsurf, Builder.io) to customize the app. The agent instructions in `AGENTS.md` are already set up so any tool understands the codebase.
134
-
135
- Good first moves:
136
-
137
- - **Open Agent-Native Code** — run `npx @agent-native/core@latest` or `npx @agent-native/core@latest code` from the project. A bare command opens the local Claude Code/Codex-like workspace; a bare prompt such as `npx @agent-native/core@latest "rename the app"` starts a Code task directly.
138
- - **Ask the built-in agent what it sees** — open the agent panel and type "what app am I looking at, and what can you do here?" This verifies the app, UI state, and agent loop are all talking to each other.
139
- - **Make a tiny customization** — ask your coding tool to rename the app, change the first screen copy, or add one field to a form. It will read `AGENTS.md` for the framework conventions.
140
- - **Add another app to the same workspace** — use `npx @agent-native/core@latest add-app` from inside the workspace folder. The command starts at `npx`.
141
- - **Single app instead of a monorepo?** Pass `--standalone` when creating: `npx @agent-native/core@latest create my-app --standalone --template mail`.
142
-
143
- Agent-Native Code understands built-in slash goals such as `/migrate` and `/audit`, plus project commands in `.agents/commands/*.md`. Use `npx @agent-native/core@latest code list`, `status`, `resume`, `stop`, or `ui` to inspect and control the same run from the CLI, the local UI, or the Desktop Code tab.
144
-
145
104
  ## Architecture principles {#architecture-principles}
146
105
 
147
106
  The three principles that apply to every agent-native app:
@@ -152,25 +111,17 @@ The three principles that apply to every agent-native app:
152
111
 
153
112
  The definitive six rules are in [Key Concepts](/docs/key-concepts).
154
113
 
155
- ## Testing local framework changes {#testing-local-framework-changes}
114
+ ## Common next moves {#next-docs}
156
115
 
157
- Framework contributors can scaffold against the current checkout instead of the
158
- published packages:
116
+ Once your app is running, the usual next step is small and concrete:
159
117
 
160
- ```bash
161
- AGENT_NATIVE_CREATE_USE_LOCAL_CORE=1 pnpm --filter @agent-native/core create my-platform
162
- ```
163
-
164
- With that flag, generated workspaces link both the local `@agent-native/core`
165
- and local `@agent-native/dispatch` packages. Use it when you need to verify
166
- unpublished template or package changes end-to-end in a freshly generated
167
- workspace. The packages run their `prepack` build first, so the linked packages
168
- serve fresh `dist` output instead of stale build artifacts.
118
+ - **Ask the built-in agent what it sees** — open the agent panel and type "what app am I looking at, and what can you do here?" This verifies that the app, UI state, and agent loop are connected.
119
+ - **Make one customization** rename the app, change the first screen copy, or add a field to a form. The project `AGENTS.md` already tells coding agents how this repo is organized.
120
+ - **Deploy it** — see [Deployment](/docs/deployment) when you're ready to put the app on your own domain.
169
121
 
170
- To exercise the repo-local CLI itself without building first, run it through
171
- the root script:
122
+ Useful follow-up docs:
172
123
 
173
- ```bash
174
- pnpm dev:cli --help
175
- pnpm dev:cli code goals
176
- ```
124
+ - [Key Concepts](/docs/key-concepts) for the architecture: SQL, actions, polling sync, and context awareness
125
+ - [Workspace](/docs/workspace) for instructions, skills, memory, and per-user MCP connections
126
+ - [Messaging](/docs/messaging) for Slack, email, Telegram, and other ways to reach the agent
127
+ - [FAQ](/docs/faq) for setup and product questions
@@ -190,28 +190,27 @@ See [Context Awareness](/docs/context-awareness) for the full pattern: navigatio
190
190
 
191
191
  Agent-native supports a lot of agent-facing protocols because different hosts standardize different pieces of the same workflow. App authors should not have to choose among them or rebuild the same operation for each client. The center of gravity stays the action system.
192
192
 
193
- | Surface | Status | What agent-native provides | What you write |
194
- | ----------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
195
- | Agent tool calling | Shipping | The in-app agent sees actions as function tools with zod-derived JSON Schema. | `defineAction()` |
196
- | UI actions | Shipping | React calls the same action through `useActionMutation()` / `useActionQuery()`. | The same action |
197
- | Native chat widgets | Shipping | Tool results with explicit widget discriminants can render native tables, charts, approvals, and setup cards in chat. | Structured action results |
198
- | HTTP and CLI | Shipping | Actions auto-mount at `/_agent-native/actions/:name` and run via `pnpm action <name>`. | The same action |
199
- | MCP server | Shipping | External MCP hosts get Streamable HTTP tools, the `ask-agent` meta-tool, and optional MCP Apps resources. | The same action, plus optional `mcpApp` |
200
- | MCP Auth | Shipping | Remote MCP OAuth, PKCE, dynamic client registration, refresh tokens, and `mcp:read` / `mcp:write` / `mcp:apps` scopes. | Nothing per action |
201
- | MCP Apps | Shipping | External hosts that support app resources can render iframe/native-host widgets, with deep-link fallback elsewhere. | Optional `mcpApp` metadata |
202
- | A2A | Shipping | Other agents discover the agent card and call the app over JSON-RPC tasks. | The same actions and agent config |
203
- | Deep links | Shipping | Action results can round-trip users into the running UI through `/_agent-native/open` and `agentnative://open`. | Optional `link` metadata |
204
- | MCP clients | Shipping | The app can also consume local, remote, or hub-shared MCP servers as `mcp__...` tools. | `mcp.config.json` or settings |
205
- | Instructions and skills | Shipping | `AGENTS.md`, skills, memory, slash commands, sub-agents, jobs, and automations live in the SQL-backed workspace. | Workspace resources, not protocol glue |
206
- | Agent Web | Shipping | Public pages can publish `robots.txt`, `sitemap.xml`, `llms.txt`, markdown mirrors, and structured metadata. | Route access plus `agentWeb` config |
207
- | Extensions | Shipping | Sandboxed mini-apps call app actions, persist extension data, and use proxied fetch helpers. | Extension HTML using `appAction()` |
208
- | AG-UI | Adapter target | A good fit for connecting an external agent runtime to an agent-native chat/UI shell through event streams. | An adapter, not duplicate actions |
209
- | A2UI | Watch / future | A promising declarative UI wire format for agent-generated cross-platform widgets. | A renderer/adapter when it matures |
210
- | ACP | Coding-agent IDE | Useful for coding agents inside editors/IDEs; not the general app-agent UI contract. | Editor/agent adapter work |
211
-
212
- The practical rule is simple: implement domain operations as actions, add `readOnly`, `publicAgent`, `link`, `mcpApp`, or an explicit native widget result only when a surface needs it, and use skills/instructions for behavior. MCP, A2A, MCP Apps, MCP Auth, UI mutations, native chat widgets, CLI commands, and deep-link handoffs are adapters around that same core.
213
-
214
- Adapter horizon: [AG-UI](https://docs.ag-ui.com/introduction) is a strong fit for connecting external agent runtimes to Agent-Native chat and app shells through events. [A2UI](https://developers.googleblog.com/introducing-a2ui-an-open-project-for-agent-driven-interfaces/) is a promising declarative UI format for generated widgets. [ACP](https://zed.dev/acp) is important for coding-agent/editor interoperability, but it is not the general BYO app-agent UI contract.
193
+ | Surface | Status | What agent-native provides | What you write |
194
+ | ----------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
195
+ | Agent tool calling | Shipping | The in-app agent sees actions as function tools with zod-derived JSON Schema. | `defineAction()` |
196
+ | UI actions | Shipping | React calls the same action through `useActionMutation()` / `useActionQuery()`. | The same action |
197
+ | Native chat widgets | Shipping | Tool results with explicit widget discriminants can render native tables, charts, approvals, and setup cards in chat. | Structured action results |
198
+ | HTTP and CLI | Shipping | Actions auto-mount at `/_agent-native/actions/:name` and run via `pnpm action <name>`. | The same action |
199
+ | MCP server | Shipping | External MCP hosts get Streamable HTTP tools, the `ask-agent` meta-tool, and optional MCP Apps resources. | The same action, plus optional `mcpApp` |
200
+ | MCP OAuth | Shipping | Standard remote MCP OAuth, PKCE, dynamic client registration, refresh tokens, and `mcp:read` / `mcp:write` / `mcp:apps` scopes. | Nothing per action |
201
+ | MCP Apps | Shipping | External hosts that support app resources can render iframe/native-host widgets, with deep-link fallback elsewhere. | Optional `mcpApp` metadata |
202
+ | A2A | Shipping | Other agents discover the agent card and call the app over JSON-RPC tasks. | The same actions and agent config |
203
+ | Deep links | Shipping | Action results can round-trip users into the running UI through `/_agent-native/open` and `agentnative://open`. | Optional `link` metadata |
204
+ | MCP clients | Shipping | The app can also consume local, remote, or hub-shared MCP servers as `mcp__...` tools. | `mcp.config.json` or settings |
205
+ | Instructions and skills | Shipping | `AGENTS.md`, skills, memory, slash commands, sub-agents, jobs, and automations live in the SQL-backed workspace. | Workspace resources, not protocol glue |
206
+ | Agent Web | Shipping | Public pages can publish `robots.txt`, `sitemap.xml`, `llms.txt`, markdown mirrors, and structured metadata. | Route access plus `agentWeb` config |
207
+ | Extensions | Shipping | Sandboxed mini-apps call app actions, persist extension data, and use proxied fetch helpers. | Extension HTML using `appAction()` |
208
+ | AG-UI | Adapter target | A good fit for connecting an external agent runtime to an agent-native chat/UI shell through event streams. | An adapter, not duplicate actions |
209
+ | ACP | Coding-agent/editor | Useful for coding agents inside editors/IDEs; not the general BYO app-chat runtime contract. | Editor/agent adapter work |
210
+
211
+ The practical rule is simple: implement domain operations as actions, add `readOnly`, `publicAgent`, `link`, `mcpApp`, or an explicit native widget result only when a surface needs it, and use skills/instructions for behavior. MCP, A2A, MCP Apps, MCP OAuth, UI mutations, native chat widgets, CLI commands, and deep-link handoffs are adapters around that same core.
212
+
213
+ Adapter horizon: [AG-UI](https://docs.ag-ui.com/introduction) is a strong fit for connecting external agent runtimes to Agent-Native chat and app shells through events. [ACP](https://zed.dev/acp) is important for coding-agent/editor interoperability, but it is not the general BYO app-agent UI contract.
215
214
 
216
215
  ## Three product shapes {#three-product-shapes}
217
216
 
@@ -320,5 +319,6 @@ For detailed guidance on specific patterns:
320
319
  - [What Is Agent-Native?](/docs/what-is-agent-native) — the vision and philosophy
321
320
  - [Context Awareness](/docs/context-awareness) — navigation state, view-screen, navigate commands
322
321
  - [Skills Guide](/docs/skills-guide) — framework skills, domain skills, creating custom skills
322
+ - [Native Chat UI](/docs/native-chat-ui) — action-declared tables, charts, and BYO runtime posture
323
323
  - [A2A Protocol](/docs/a2a-protocol) — agent-to-agent communication
324
324
  - [Multi-App Workspace](/docs/multi-app-workspace) — host many apps in one monorepo with shared auth, skills, components, and credentials
@@ -9,7 +9,7 @@ MCP Apps are the official `io.modelcontextprotocol/ui` extension that lets compa
9
9
 
10
10
  For connecting external agents and the broader MCP server setup, see [External Agents](/docs/external-agents) and [MCP Protocol](/docs/mcp-protocol). This page covers authoring MCP App resources and the embed bridge that powers them.
11
11
 
12
- Inside an Agent-Native app's own chat, prefer native chat renderers for first-party widgets such as tables, charts, setup cards, and approvals. Use MCP Apps for external/cross-host inline UI in Claude, ChatGPT, Copilot, Cursor, and other compatible hosts, with the action `link` as the universal deep-link fallback.
12
+ Inside an Agent-Native app's own chat, prefer [native chat renderers](/docs/native-chat-ui) for first-party widgets such as tables, charts, setup cards, and approvals. Use MCP Apps for external/cross-host inline UI in Claude, ChatGPT, Copilot, Cursor, and other compatible hosts, with the action `link` as the universal deep-link fallback.
13
13
 
14
14
  ## Authoring: optional MCP Apps UI {#mcp-apps}
15
15