@agent-native/core 0.84.35 → 0.84.37
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/README.md +15 -51
- package/corpus/core/CHANGELOG.md +18 -0
- package/corpus/core/docs/content/actions.mdx +17 -24
- package/corpus/core/docs/content/agent-surfaces.mdx +59 -56
- package/corpus/core/docs/content/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/faq.mdx +4 -4
- package/corpus/core/docs/content/getting-started.mdx +246 -204
- package/corpus/core/docs/content/key-concepts.mdx +9 -9
- package/corpus/core/docs/content/locales/ar-SA/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/ar-SA/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/ar-SA/getting-started.mdx +148 -214
- package/corpus/core/docs/content/locales/ar-SA/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/de-DE/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/de-DE/getting-started.mdx +145 -211
- package/corpus/core/docs/content/locales/de-DE/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/es-ES/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/es-ES/getting-started.mdx +148 -214
- package/corpus/core/docs/content/locales/es-ES/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/fr-FR/getting-started.mdx +146 -212
- package/corpus/core/docs/content/locales/fr-FR/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/hi-IN/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/hi-IN/getting-started.mdx +149 -215
- package/corpus/core/docs/content/locales/hi-IN/pure-agent-apps.mdx +8 -13
- package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/ja-JP/getting-started.mdx +144 -210
- package/corpus/core/docs/content/locales/ja-JP/pure-agent-apps.mdx +8 -13
- package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/ko-KR/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/ko-KR/getting-started.mdx +146 -212
- package/corpus/core/docs/content/locales/ko-KR/pure-agent-apps.mdx +8 -13
- package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/pt-BR/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/pt-BR/getting-started.mdx +145 -211
- package/corpus/core/docs/content/locales/pt-BR/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/zh-CN/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/zh-CN/getting-started.mdx +158 -209
- package/corpus/core/docs/content/locales/zh-CN/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/zh-TW/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/zh-TW/getting-started.mdx +158 -212
- package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/native-chat-ui.mdx +17 -32
- package/corpus/core/docs/content/pure-agent-apps.mdx +46 -26
- package/corpus/core/docs/content/template-chat.mdx +8 -8
- package/corpus/core/docs/content/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/what-is-agent-native.mdx +6 -6
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/skills.ts +7 -9
- package/corpus/core/src/client/AssistantChat.tsx +27 -13
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +2 -0
- package/corpus/core/src/client/RunStuckBanner.tsx +195 -21
- package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +57 -9
- package/corpus/core/src/client/blocks/library/wireframe.tsx +3 -18
- package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +28 -32
- package/corpus/core/src/client/use-run-stuck-detection.ts +14 -1
- package/corpus/core/src/db/schema.ts +5 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +5 -2
- package/corpus/core/src/styles/blocks.css +27 -6
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +1 -4
- package/corpus/templates/content/actions/list-trashed-content-databases.ts +1 -1
- package/corpus/templates/plan/.agents/skills/visual-plan/references/wireframe.md +7 -9
- package/corpus/templates/plan/.agents/skills/visual-recap/references/wireframe.md +7 -9
- package/dist/cli/skills.d.ts +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +7 -9
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +6 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +19 -13
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/RunStuckBanner.d.ts +13 -1
- package/dist/client/RunStuckBanner.d.ts.map +1 -1
- package/dist/client/RunStuckBanner.js +138 -16
- package/dist/client/RunStuckBanner.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +6 -6
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.js +52 -5
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
- package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe.js +1 -11
- package/dist/client/blocks/library/wireframe.js.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +27 -31
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/use-run-stuck-detection.d.ts +4 -0
- package/dist/client/use-run-stuck-detection.d.ts.map +1 -1
- package/dist/client/use-run-stuck-detection.js +7 -1
- package/dist/client/use-run-stuck-detection.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/db/schema.d.ts +2 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +3 -2
- package/dist/db/schema.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +3 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/blocks.css +27 -6
- package/docs/content/actions.mdx +17 -24
- package/docs/content/agent-surfaces.mdx +59 -56
- package/docs/content/cloneable-saas.mdx +3 -3
- package/docs/content/faq.mdx +4 -4
- package/docs/content/getting-started.mdx +246 -204
- package/docs/content/key-concepts.mdx +9 -9
- package/docs/content/locales/ar-SA/cloneable-saas.mdx +3 -3
- package/docs/content/locales/ar-SA/faq.mdx +4 -4
- package/docs/content/locales/ar-SA/getting-started.mdx +148 -214
- package/docs/content/locales/ar-SA/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/ar-SA/template-chat.mdx +2 -2
- package/docs/content/locales/ar-SA/using-your-agent.mdx +2 -2
- package/docs/content/locales/de-DE/cloneable-saas.mdx +3 -3
- package/docs/content/locales/de-DE/faq.mdx +4 -4
- package/docs/content/locales/de-DE/getting-started.mdx +145 -211
- package/docs/content/locales/de-DE/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/de-DE/template-chat.mdx +2 -2
- package/docs/content/locales/de-DE/using-your-agent.mdx +2 -2
- package/docs/content/locales/es-ES/cloneable-saas.mdx +3 -3
- package/docs/content/locales/es-ES/faq.mdx +4 -4
- package/docs/content/locales/es-ES/getting-started.mdx +148 -214
- package/docs/content/locales/es-ES/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/es-ES/template-chat.mdx +2 -2
- package/docs/content/locales/es-ES/using-your-agent.mdx +2 -2
- package/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
- package/docs/content/locales/fr-FR/faq.mdx +4 -4
- package/docs/content/locales/fr-FR/getting-started.mdx +146 -212
- package/docs/content/locales/fr-FR/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/fr-FR/template-chat.mdx +2 -2
- package/docs/content/locales/fr-FR/using-your-agent.mdx +2 -2
- package/docs/content/locales/hi-IN/cloneable-saas.mdx +3 -3
- package/docs/content/locales/hi-IN/faq.mdx +4 -4
- package/docs/content/locales/hi-IN/getting-started.mdx +149 -215
- package/docs/content/locales/hi-IN/pure-agent-apps.mdx +8 -13
- package/docs/content/locales/hi-IN/template-chat.mdx +2 -2
- package/docs/content/locales/hi-IN/using-your-agent.mdx +2 -2
- package/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
- package/docs/content/locales/ja-JP/faq.mdx +4 -4
- package/docs/content/locales/ja-JP/getting-started.mdx +144 -210
- package/docs/content/locales/ja-JP/pure-agent-apps.mdx +8 -13
- package/docs/content/locales/ja-JP/template-chat.mdx +2 -2
- package/docs/content/locales/ja-JP/using-your-agent.mdx +2 -2
- package/docs/content/locales/ko-KR/cloneable-saas.mdx +3 -3
- package/docs/content/locales/ko-KR/faq.mdx +4 -4
- package/docs/content/locales/ko-KR/getting-started.mdx +146 -212
- package/docs/content/locales/ko-KR/pure-agent-apps.mdx +8 -13
- package/docs/content/locales/ko-KR/template-chat.mdx +2 -2
- package/docs/content/locales/ko-KR/using-your-agent.mdx +2 -2
- package/docs/content/locales/pt-BR/cloneable-saas.mdx +3 -3
- package/docs/content/locales/pt-BR/faq.mdx +4 -4
- package/docs/content/locales/pt-BR/getting-started.mdx +145 -211
- package/docs/content/locales/pt-BR/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/pt-BR/template-chat.mdx +2 -2
- package/docs/content/locales/pt-BR/using-your-agent.mdx +2 -2
- package/docs/content/locales/zh-CN/cloneable-saas.mdx +3 -3
- package/docs/content/locales/zh-CN/faq.mdx +4 -4
- package/docs/content/locales/zh-CN/getting-started.mdx +158 -209
- package/docs/content/locales/zh-CN/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/zh-CN/template-chat.mdx +2 -2
- package/docs/content/locales/zh-CN/using-your-agent.mdx +2 -2
- package/docs/content/locales/zh-TW/cloneable-saas.mdx +3 -3
- package/docs/content/locales/zh-TW/faq.mdx +4 -4
- package/docs/content/locales/zh-TW/getting-started.mdx +158 -212
- package/docs/content/locales/zh-TW/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/zh-TW/template-chat.mdx +2 -2
- package/docs/content/locales/zh-TW/using-your-agent.mdx +2 -2
- package/docs/content/native-chat-ui.mdx +17 -32
- package/docs/content/pure-agent-apps.mdx +46 -26
- package/docs/content/template-chat.mdx +8 -8
- package/docs/content/using-your-agent.mdx +2 -2
- package/docs/content/what-is-agent-native.mdx +6 -6
- package/package.json +1 -1
|
@@ -1,260 +1,302 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Getting Started"
|
|
3
|
-
description: "Create
|
|
3
|
+
description: "Create a chat-first agentic app, add an action, render structured results inline, then grow into a persistent page the agent can open."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Getting Started
|
|
7
7
|
|
|
8
|
-
Agent-Native apps
|
|
9
|
-
[actions](/docs/actions), data, and state.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
**Want a complete app to start from?** Clone one of our rich templates —
|
|
14
|
-
[Chat](/docs/template-chat), [Mail](/docs/template-mail),
|
|
15
|
-
[Calendar](/docs/template-calendar), [Content](/docs/template-content),
|
|
16
|
-
[Analytics](/docs/template-analytics), and [many more](/docs/cloneable-saas) —
|
|
17
|
-
each a full-featured app you customize.
|
|
18
|
-
|
|
19
|
-
Building from scratch? The only choice up front is whether you want a UI —
|
|
20
|
-
everything after (writing instructions, adding skills, defining actions, running
|
|
21
|
-
the agent) is the same either way.
|
|
22
|
-
|
|
23
|
-
<FileTree
|
|
24
|
-
id="doc-block-1up18cp"
|
|
25
|
-
title="A basic Agent-Native agent"
|
|
26
|
-
entries={[
|
|
27
|
-
{
|
|
28
|
-
path: "AGENTS.md",
|
|
29
|
-
note: "always-on instructions: purpose, rules, tone, and the map of what the agent can do",
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
path: ".agents/skills/customer-research/SKILL.md",
|
|
33
|
-
note: "a reusable playbook the agent loads when the task matches",
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
path: "actions/summarize-week.ts",
|
|
37
|
-
note: "typed code the agent, UI, CLI, HTTP, MCP, A2A, jobs, and webhooks can run",
|
|
38
|
-
},
|
|
39
|
-
]}
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
-
This is true whether you start with a chat UI, a headless agent, or a full app.
|
|
43
|
-
The UI changes the surface; instructions, skills, and actions give the agent its
|
|
44
|
-
guidance and behavior.
|
|
45
|
-
|
|
46
|
-
## 1. Create your app
|
|
8
|
+
Agent-Native is for agentic applications: apps where the AI agent and the UI
|
|
9
|
+
share the same [actions](/docs/actions), SQL data, and application state. Start
|
|
10
|
+
with chat so users can talk to the agent immediately, then add the app surfaces
|
|
11
|
+
your workflow earns.
|
|
47
12
|
|
|
48
|
-
|
|
13
|
+
The first useful path is:
|
|
49
14
|
|
|
50
|
-
|
|
51
|
-
|
|
15
|
+
1. Create a chat app.
|
|
16
|
+
2. Add one action.
|
|
17
|
+
3. Render the action result inline in chat.
|
|
18
|
+
4. Persist data in SQL.
|
|
19
|
+
5. Add a page the agent can open when visual inspection is better than another
|
|
20
|
+
paragraph in the transcript.
|
|
52
21
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
22
|
+
Want a complete domain app instead? Clone a rich template such as
|
|
23
|
+
[Mail](/docs/template-mail), [Calendar](/docs/template-calendar),
|
|
24
|
+
[Forms](/docs/template-forms), [Analytics](/docs/template-analytics), or
|
|
25
|
+
[Plan](/docs/template-plan). Want no browser UI yet? See
|
|
26
|
+
[Automation-First Apps](/docs/pure-agent-apps) after this tutorial.
|
|
56
27
|
|
|
57
|
-
|
|
28
|
+
## 1. Create a chat app {#create-your-app}
|
|
58
29
|
|
|
59
|
-
|
|
60
|
-
|
|
30
|
+
You'll need [Node.js 22+](https://nodejs.org) and [pnpm](https://pnpm.io).
|
|
31
|
+
|
|
32
|
+
Create the minimal chat-first app:
|
|
61
33
|
|
|
62
34
|
```bash
|
|
63
35
|
npx @agent-native/core@latest create my-app --template chat
|
|
36
|
+
cd my-app
|
|
37
|
+
pnpm install
|
|
38
|
+
pnpm dev
|
|
64
39
|
```
|
|
65
40
|
|
|
66
|
-
|
|
67
|
-
|
|
41
|
+
This gives you durable chat threads, auth, live sync, an `actions/` directory,
|
|
42
|
+
standard `view-screen` and `navigate` actions, and a small React app you can
|
|
43
|
+
extend.
|
|
68
44
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Then install from the folder you created:
|
|
45
|
+
Run `create` with no flags if you want the CLI picker for domain templates and
|
|
46
|
+
advanced app shapes:
|
|
74
47
|
|
|
75
48
|
```bash
|
|
76
|
-
|
|
77
|
-
pnpm install
|
|
49
|
+
npx @agent-native/core@latest create my-app
|
|
78
50
|
```
|
|
79
51
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
lines: "11-13",
|
|
118
|
-
label: "One implementation",
|
|
119
|
-
note: "The `run` body is the single source of truth that every surface executes.",
|
|
120
|
-
},
|
|
121
|
-
]}
|
|
122
|
-
/>
|
|
123
|
-
|
|
124
|
-
Replace `hello` with the first real operation in your domain. You define it once;
|
|
125
|
-
every surface picks it up.
|
|
126
|
-
|
|
127
|
-
Use `AGENTS.md` for guidance that should apply every turn. Use a skill when the
|
|
128
|
-
agent needs a reusable workflow or domain procedure. Use an action when the
|
|
129
|
-
agent needs a typed, testable way to read data, write data, call an API, or
|
|
130
|
-
perform an approval.
|
|
131
|
-
|
|
132
|
-
## 3. Run it
|
|
133
|
-
|
|
134
|
-
Call the action directly:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
pnpm action hello --name Steve
|
|
52
|
+
The rest of this guide assumes the Chat template because it is the shortest path
|
|
53
|
+
to an agentic application: the agent can act on day one, and you have a real app
|
|
54
|
+
surface to grow from.
|
|
55
|
+
|
|
56
|
+
## 2. Add an action {#add-an-action}
|
|
57
|
+
|
|
58
|
+
An action is one typed operation your agent and UI can both call. Replace the
|
|
59
|
+
starter `hello` action with the first real operation in your domain. This example
|
|
60
|
+
analyzes form responses and returns a validated shape for a custom chat chart:
|
|
61
|
+
|
|
62
|
+
<!-- prettier-ignore -->
|
|
63
|
+
```ts
|
|
64
|
+
// actions/analyze-responses.ts
|
|
65
|
+
import { defineAction } from "@agent-native/core/action";
|
|
66
|
+
import { z } from "zod";
|
|
67
|
+
|
|
68
|
+
const responseChartResultSchema = z.object({
|
|
69
|
+
title: z.string(),
|
|
70
|
+
points: z.array(z.object({ day: z.string(), responses: z.number() })),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export default defineAction({
|
|
74
|
+
description: "Analyze recent form responses and render a custom chart.",
|
|
75
|
+
schema: z.object({
|
|
76
|
+
formId: z.string().default("demo")
|
|
77
|
+
}),
|
|
78
|
+
outputSchema: responseChartResultSchema,
|
|
79
|
+
chatUI: {
|
|
80
|
+
renderer: "responses.response-chart",
|
|
81
|
+
title: "Response chart"
|
|
82
|
+
},
|
|
83
|
+
readOnly: true,
|
|
84
|
+
run: async ({ formId }) => ({
|
|
85
|
+
title: `Responses for ${formId}`,
|
|
86
|
+
points: [{ day: "Mon", responses: 12 }, { day: "Tue", responses: 18 }, { day: "Wed", responses: 24 }, { day: "Thu", responses: 21 }],
|
|
87
|
+
}),
|
|
88
|
+
});
|
|
138
89
|
```
|
|
139
90
|
|
|
140
|
-
|
|
91
|
+
Try it directly:
|
|
141
92
|
|
|
142
93
|
```bash
|
|
143
|
-
pnpm
|
|
94
|
+
pnpm action analyze-responses --formId demo
|
|
144
95
|
```
|
|
145
96
|
|
|
146
|
-
|
|
147
|
-
browser — it can already call every action you define:
|
|
97
|
+
Then ask the agent in the browser:
|
|
148
98
|
|
|
149
|
-
|
|
150
|
-
pnpm dev
|
|
151
|
-
```
|
|
99
|
+
> Analyze the recent responses for the demo form.
|
|
152
100
|
|
|
153
|
-
|
|
101
|
+
One action is now reachable from chat, React hooks, CLI, HTTP, MCP, A2A,
|
|
154
102
|
scheduled jobs, and webhooks. Define once, call from anywhere.
|
|
155
103
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
```html
|
|
159
|
-
<div class="diagram-fan">
|
|
160
|
-
<div class="diagram-box" data-rough>defineAction</div>
|
|
161
|
-
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
162
|
-
<div class="diagram-surfaces">
|
|
163
|
-
<span class="diagram-pill">Chat UI</span
|
|
164
|
-
><span class="diagram-pill">CLI</span><span class="diagram-pill">HTTP</span
|
|
165
|
-
><span class="diagram-pill">MCP</span><span class="diagram-pill">A2A</span
|
|
166
|
-
><span class="diagram-pill">Scheduled jobs</span
|
|
167
|
-
><span class="diagram-pill">Webhooks</span>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
```
|
|
104
|
+
## 3. Render the result inline {#render-inline}
|
|
171
105
|
|
|
172
|
-
|
|
173
|
-
.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
106
|
+
The action above declares `outputSchema` and a product-specific
|
|
107
|
+
`chatUI.renderer`, so the transcript does not have to flatten structured data
|
|
108
|
+
into prose. Register a React component for that exact renderer id, for example
|
|
109
|
+
by importing `app/chat-renderers.tsx` once from `app/root.tsx`:
|
|
110
|
+
|
|
111
|
+
<!-- prettier-ignore -->
|
|
112
|
+
```tsx
|
|
113
|
+
import { registerActionChatRenderer, type ToolRendererProps,} from "@agent-native/core/client/chat";
|
|
114
|
+
|
|
115
|
+
type ResponseChartResult = {
|
|
116
|
+
title: string;
|
|
117
|
+
points: Array<{ day: string; responses: number }>;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
function ResponseChart({ context }: ToolRendererProps) {
|
|
121
|
+
const result = context.resultJson as ResponseChartResult;
|
|
122
|
+
const max = Math.max(...result.points.map((point) => point.responses), 1);
|
|
123
|
+
return (
|
|
124
|
+
<section className="rounded-lg border bg-card p-4">
|
|
125
|
+
<h3 className="text-sm font-medium">{result.title}</h3>
|
|
126
|
+
<div className="mt-4 flex h-32 items-end gap-2">
|
|
127
|
+
{result.points.map((point) => (
|
|
128
|
+
<div key={point.day} className="flex flex-1 flex-col items-center gap-2">
|
|
129
|
+
<div className="w-full rounded-t bg-primary" style={{ height: `${(point.responses / max) * 100}%` }} />
|
|
130
|
+
<span className="text-xs text-muted-foreground">{point.day}</span>
|
|
131
|
+
</div>
|
|
132
|
+
))}
|
|
133
|
+
</div>
|
|
134
|
+
</section>
|
|
135
|
+
);
|
|
188
136
|
}
|
|
189
|
-
```
|
|
190
137
|
|
|
191
|
-
|
|
138
|
+
registerActionChatRenderer({
|
|
139
|
+
id: "responses.response-chart",
|
|
140
|
+
renderer: "responses.response-chart",
|
|
141
|
+
Component: ResponseChart,
|
|
142
|
+
});
|
|
143
|
+
```
|
|
192
144
|
|
|
193
|
-
|
|
145
|
+
Chat now renders your app's own chart component inline, with the validated action
|
|
146
|
+
result as props through the renderer context.
|
|
147
|
+
|
|
148
|
+
<WireframeBlock id="doc-block-inline-result-wireframe">
|
|
149
|
+
<Screen
|
|
150
|
+
surface="desktop"
|
|
151
|
+
html={
|
|
152
|
+
"<div style='min-height:340px;box-sizing:border-box;padding:24px;display:flex;justify-content:center;align-items:center;background:var(--wf-bg)'><div style='width:min(530px,100%);display:flex;flex-direction:column;gap:14px'><div class='wf-card' data-rough style='align-self:flex-end;max-width:70%;padding:12px 14px'><strong>User</strong><p style='margin:6px 0 0'>Analyze demo responses.</p></div><div class='wf-card' data-rough style='align-self:flex-start;width:min(370px,100%);padding:14px'><strong>Agent</strong><p class='wf-muted' style='margin:6px 0 12px'>Rendered with responses.response-chart.</p><section class='wf-card' data-rough style='padding:14px'><h3 style='margin:0 0 12px;font-size:14px'>Response chart</h3><div data-rough='line:bottom' style='height:104px;display:flex;align-items:end;gap:8px;border-bottom:1.4px solid var(--wf-line);padding-bottom:4px'><div style='flex:1;display:flex;flex-direction:column;align-items:center;gap:6px'><div data-rough style='height:38px;width:100%;background:color-mix(in srgb, var(--wf-accent) 24%, transparent);border:1.4px solid var(--wf-accent);border-radius:8px 8px 3px 3px'></div><span class='wf-muted'>Mon</span></div><div style='flex:1;display:flex;flex-direction:column;align-items:center;gap:6px'><div data-rough style='height:62px;width:100%;background:color-mix(in srgb, var(--wf-accent) 30%, transparent);border:1.4px solid var(--wf-accent);border-radius:8px 8px 3px 3px'></div><span class='wf-muted'>Tue</span></div><div style='flex:1;display:flex;flex-direction:column;align-items:center;gap:6px'><div data-rough style='height:86px;width:100%;background:color-mix(in srgb, var(--wf-accent) 36%, transparent);border:1.4px solid var(--wf-accent);border-radius:8px 8px 3px 3px'></div><span class='wf-muted'>Wed</span></div><div style='flex:1;display:flex;flex-direction:column;align-items:center;gap:6px'><div data-rough style='height:54px;width:100%;background:color-mix(in srgb, var(--wf-accent) 42%, transparent);border:1.4px solid var(--wf-accent);border-radius:8px 8px 3px 3px'></div><span class='wf-muted'>Thu</span></div></div></section></div></div></div>"
|
|
153
|
+
}
|
|
154
|
+
/>
|
|
155
|
+
</WireframeBlock>
|
|
156
|
+
|
|
157
|
+
Use this step when the result belongs where the agent is speaking:
|
|
158
|
+
|
|
159
|
+
- setup summaries
|
|
160
|
+
- short reports
|
|
161
|
+
- approvals
|
|
162
|
+
- tables or charts small enough to inspect inline
|
|
163
|
+
- links into durable app views
|
|
164
|
+
|
|
165
|
+
For reusable generic outputs, the framework also ships built-in
|
|
166
|
+
`data-chart` and `data-table` renderers, plus `data-insights` for combined
|
|
167
|
+
summary/chart/table cards. See [Native Chat UI](/docs/native-chat-ui). For
|
|
168
|
+
temporary controls the agent creates at runtime, see
|
|
169
|
+
[Generative UI](/docs/generative-ui).
|
|
170
|
+
|
|
171
|
+
## 4. Persist data in SQL {#persist-data}
|
|
172
|
+
|
|
173
|
+
Inline chat is great for the first result. A real app needs durable data the
|
|
174
|
+
agent can add, update, and revisit. Add a response-insights table in your schema
|
|
175
|
+
and keep reads/writes behind actions:
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
// server/db/schema.ts
|
|
179
|
+
import { integer, now, table, text } from "@agent-native/core/db/schema";
|
|
180
|
+
|
|
181
|
+
export const responseInsights = table("response_insights", {
|
|
182
|
+
id: text("id").primaryKey(),
|
|
183
|
+
formId: text("form_id").notNull(),
|
|
184
|
+
title: text("title").notNull(),
|
|
185
|
+
summary: text("summary").notNull(),
|
|
186
|
+
responseCount: integer("response_count").notNull(),
|
|
187
|
+
createdAt: text("created_at").notNull().default(now()),
|
|
188
|
+
updatedAt: text("updated_at").notNull().default(now()),
|
|
189
|
+
});
|
|
190
|
+
```
|
|
194
191
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
192
|
+
Use the framework schema helpers rather than `sqliteTable`, `pgTable`, or
|
|
193
|
+
dialect-specific column imports. They choose the configured SQL backend, so the
|
|
194
|
+
same schema can run locally on SQLite and in production on Postgres,
|
|
195
|
+
Turso/libSQL, D1, or another supported SQL provider.
|
|
199
196
|
|
|
200
|
-
|
|
197
|
+
Then split the work into focused actions:
|
|
201
198
|
|
|
202
|
-
|
|
199
|
+
- `create-response-insight` writes a new insight row.
|
|
200
|
+
- `list-response-insights` reads the rows for the page.
|
|
201
|
+
- `update-response-insight` edits an existing row after the agent learns more.
|
|
202
|
+
- `analyze-responses` can call the same internal helper and return the native
|
|
203
|
+
chat widget for the latest insight.
|
|
203
204
|
|
|
204
|
-
|
|
205
|
+
The important rule is that the agent and UI share these actions. Do not add a
|
|
206
|
+
separate REST route just for the browser if an action is the operation.
|
|
205
207
|
|
|
206
|
-
##
|
|
208
|
+
## 5. Add a page the agent can open {#add-a-page}
|
|
207
209
|
|
|
208
|
-
|
|
209
|
-
is one small route built on the `<AgentChatSurface>` component:
|
|
210
|
+
Now add a durable page for the data behind the chat result:
|
|
210
211
|
|
|
212
|
+
<!-- prettier-ignore -->
|
|
211
213
|
```tsx
|
|
212
|
-
// app/routes/
|
|
213
|
-
import {
|
|
214
|
-
|
|
215
|
-
export default function
|
|
216
|
-
|
|
214
|
+
// app/routes/response-insights.tsx
|
|
215
|
+
import { useActionMutation, useActionQuery } from "@agent-native/core/client";
|
|
216
|
+
|
|
217
|
+
export default function ResponseInsightsRoute() {
|
|
218
|
+
const insights = useActionQuery("list-response-insights", {});
|
|
219
|
+
const createInsight = useActionMutation("create-response-insight");
|
|
220
|
+
|
|
221
|
+
return (
|
|
222
|
+
<main className="mx-auto flex max-w-5xl flex-col gap-6 p-6">
|
|
223
|
+
<header>
|
|
224
|
+
<h1>Response insights</h1>
|
|
225
|
+
<p>Insights the agent created from form responses.</p>
|
|
226
|
+
</header>
|
|
227
|
+
<button onClick={() => createInsight.mutate({ formId: "demo" })}>Analyze demo form</button>
|
|
228
|
+
<section>
|
|
229
|
+
{insights.data?.map((insight) => (
|
|
230
|
+
<article key={insight.id}><h2>{insight.title}</h2><p>{insight.summary}</p></article>
|
|
231
|
+
))}
|
|
232
|
+
</section>
|
|
233
|
+
</main>
|
|
234
|
+
);
|
|
217
235
|
}
|
|
218
236
|
```
|
|
219
237
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
238
|
+
The page is not a second implementation. It is a projection of SQL state written
|
|
239
|
+
through the same actions the agent uses.
|
|
240
|
+
|
|
241
|
+
<WireframeBlock id="doc-block-response-insights-page-wireframe">
|
|
242
|
+
<Screen
|
|
243
|
+
surface="desktop"
|
|
244
|
+
html={
|
|
245
|
+
"<main style='min-height:440px;box-sizing:border-box;padding:28px;background:var(--wf-bg)'><section style='max-width:960px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:16px;align-items:stretch'><section class='wf-card' data-rough style='display:flex;flex-direction:column;gap:16px'><header><h2 style='margin:0 0 4px;font-size:28px'>Response insights</h2><p class='wf-muted' style='margin:0'>Insights the agent created from form responses.</p></header><button class='primary' data-rough style='align-self:flex-start'>Analyze demo form</button><section style='display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px'><article class='wf-box' data-rough style='padding:12px'><strong>Pricing theme</strong><p class='wf-muted' style='margin:8px 0 0'>Users ask for a team plan.</p></article><article class='wf-box' data-rough style='padding:12px'><strong>Onboarding drop-off</strong><p class='wf-muted' style='margin:8px 0 0'>Three steps need clearer copy.</p></article></section><section class='wf-card' data-rough style='display:flex;flex-direction:column;gap:10px'><div class='wf-row wf-box' data-rough style='padding:10px 12px;gap:12px;justify-content:space-between'><strong>Demo form</strong><span class='wf-muted'>42 responses analyzed</span></div><div class='wf-row wf-box' data-rough style='padding:10px 12px;gap:12px;justify-content:space-between'><strong>Next step</strong><span class='wf-muted'>Review two draft insights</span></div></section></section><aside class='wf-card' data-rough style='height:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:12px'><strong>Chat</strong><div class='wf-box' data-rough style='align-self:flex-end;max-width:210px;padding:10px 12px'><span class='wf-muted'>You</span><p style='margin:4px 0 0'>Open response insights.</p></div><div class='wf-box' data-rough style='align-self:flex-start;max-width:210px;padding:10px 12px'><span class='wf-muted'>Agent</span><p style='margin:4px 0 0'>Opened response insights.</p></div></aside></section></main>"
|
|
246
|
+
}
|
|
247
|
+
/>
|
|
248
|
+
</WireframeBlock>
|
|
227
249
|
|
|
228
|
-
|
|
229
|
-
[Native Chat UI](/docs/native-chat-ui) to render action results as tables,
|
|
230
|
-
charts, and typed cards instead of plain text.
|
|
250
|
+
## 6. Let the agent navigate {#agent-navigation}
|
|
231
251
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
leaves out. The cleanest move is to start (or re-scaffold) from the Chat
|
|
235
|
-
template; your `actions/`, agent, and SQL state carry over unchanged. See
|
|
236
|
-
[Agent Surfaces](/docs/agent-surfaces) for every surface in between.
|
|
252
|
+
The Chat template includes `view-screen` and `navigate` actions. Extend them as
|
|
253
|
+
your app grows:
|
|
237
254
|
|
|
238
|
-
|
|
255
|
+
- `view-screen` should read application state and return the current route,
|
|
256
|
+
selected insight, active filters, and any compact page context the agent needs.
|
|
257
|
+
- `navigate` should write a same-origin path such as `/response-insights` when
|
|
258
|
+
the agent decides the user should inspect the result visually.
|
|
259
|
+
- Action results can include links such as `href: "/response-insights"` so chat
|
|
260
|
+
can offer an explicit "Open response insights" button.
|
|
261
|
+
|
|
262
|
+
When the app has both a full-page chat route and an app page, use the shared chat
|
|
263
|
+
handoff helpers described in [Agent Surfaces](/docs/agent-surfaces#rich-chat):
|
|
264
|
+
`AgentChatSurface`, `AgentSidebar`, `useAgentChatHomeHandoff`,
|
|
265
|
+
`useAgentChatHomeHandoffLinks`, and `chatViewTransition`. That lets the full
|
|
266
|
+
chat slide into the side panel as the page opens, keeping the same thread while
|
|
267
|
+
the user inspects durable data.
|
|
268
|
+
|
|
269
|
+
## Project structure {#project-structure}
|
|
239
270
|
|
|
240
271
|
```text
|
|
241
272
|
my-app/
|
|
242
|
-
actions/ # Agent-callable
|
|
243
|
-
app/ # React
|
|
244
|
-
server/ # Nitro
|
|
245
|
-
AGENTS.md # Always-on agent
|
|
246
|
-
.agents/ # Skills the agent
|
|
273
|
+
actions/ # Agent-callable and UI-callable operations
|
|
274
|
+
app/ # React routes, pages, and chat surfaces
|
|
275
|
+
server/ # Nitro server and SQL schema
|
|
276
|
+
AGENTS.md # Always-on instructions for the app agent
|
|
277
|
+
.agents/ # Skills the agent loads when relevant
|
|
247
278
|
data/app.db # Local SQLite state when DATABASE_URL is unset
|
|
248
279
|
```
|
|
249
280
|
|
|
250
|
-
##
|
|
251
|
-
|
|
252
|
-
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
281
|
+
## Want a full analytics starting point? {#analytics-starting-point}
|
|
282
|
+
|
|
283
|
+
The response-insights example above is intentionally small so you can see the
|
|
284
|
+
framework pieces. If you are building a real analytics product, start from
|
|
285
|
+
[Analytics](/docs/template-analytics) instead. It is the robust starting point:
|
|
286
|
+
connect your providers, use the existing dashboards and agent actions, then
|
|
287
|
+
customize the app from there.
|
|
288
|
+
|
|
289
|
+
## Where to go next {#next}
|
|
290
|
+
|
|
291
|
+
- **[Actions](/docs/actions)** — schemas, auth, approvals, hooks, and transport.
|
|
292
|
+
- **[Native Chat UI](/docs/native-chat-ui)** — render action results as tables,
|
|
293
|
+
charts, and typed cards.
|
|
294
|
+
- **[Chat Template](/docs/template-chat)** — the minimal chat-first app you just
|
|
295
|
+
created.
|
|
296
|
+
- **[Analytics Template](/docs/template-analytics)** — a robust analytics app
|
|
297
|
+
starting point; connect providers and customize from there.
|
|
298
|
+
- **[Context Awareness](/docs/context-awareness)** — `view-screen`, `navigate`,
|
|
299
|
+
route state, and selected objects.
|
|
300
|
+
- **[Agent Surfaces](/docs/agent-surfaces)** — chat, inline UI, app pages,
|
|
301
|
+
embedded sidecars, automation, and external agents.
|
|
259
302
|
- **[Deployment](/docs/deployment)** — put your app on your own domain.
|
|
260
|
-
- **[FAQ](/docs/faq)** — setup and product questions.
|
|
@@ -13,7 +13,7 @@ Every agent-native app is three things working together:
|
|
|
13
13
|
|
|
14
14
|
> **Agent** — Autonomous AI that reads data, writes data, runs actions, and modifies code. Customizable with skills and instructions.
|
|
15
15
|
>
|
|
16
|
-
> **Application** — The product surface around the agent. This may
|
|
16
|
+
> **Application** — The product surface around the agent. This may start as chat, add native inline results, grow into a small control plane, or become a full React UI with dashboards, flows, and visualizations.
|
|
17
17
|
>
|
|
18
18
|
> **Computer** — Database, browser, code execution. Agents work directly with SQL and built-in tools; MCP servers are optional add-ons, not the foundation.
|
|
19
19
|
|
|
@@ -31,7 +31,7 @@ Every agent-native app is three things working together:
|
|
|
31
31
|
<div class="diagram-card">
|
|
32
32
|
<span class="diagram-pill">Application</span
|
|
33
33
|
><small class="diagram-muted"
|
|
34
|
-
>
|
|
34
|
+
>chat, inline results, control plane, or full React UI</small
|
|
35
35
|
>
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
@@ -78,12 +78,12 @@ Every agent-native app is three things working together:
|
|
|
78
78
|
|
|
79
79
|
</Diagram>
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
Automation-first apps can run the same production app-agent loop from the folder with `pnpm agent`, while UI apps mount the embedded agent panel and run locally with `pnpm dev`. In the cloud, Builder.io provides a managed frame — the environment that hosts the agent next to your app — with collaboration, visual editing, and managed infrastructure for teams.
|
|
82
82
|
|
|
83
83
|
## Agent building blocks {#agent-building-blocks}
|
|
84
84
|
|
|
85
85
|
Every agent-native app has the same agent building blocks, regardless of whether
|
|
86
|
-
the product surface is
|
|
86
|
+
the product surface is chat-first, automation-first, or a full UI:
|
|
87
87
|
|
|
88
88
|
<FileTree
|
|
89
89
|
id="doc-block-1ae57y4"
|
|
@@ -127,7 +127,7 @@ Six rules govern the architecture:
|
|
|
127
127
|
|
|
128
128
|
## The four-area checklist {#four-area-checklist}
|
|
129
129
|
|
|
130
|
-
Every user-facing feature should update all applicable areas. Skipping an applicable area breaks the agent-native contract; forcing a
|
|
130
|
+
Every user-facing feature should update all applicable areas. Skipping an applicable area breaks the agent-native contract; forcing a screen onto an automation that no human needs to browse is also a smell.
|
|
131
131
|
|
|
132
132
|
| Area | Description |
|
|
133
133
|
| ---------------- | -------------------------------------------------------------- |
|
|
@@ -136,7 +136,7 @@ Every user-facing feature should update all applicable areas. Skipping an applic
|
|
|
136
136
|
| **3. Skills** | Update AGENTS.md and/or create a skill documenting the pattern |
|
|
137
137
|
| **4. App-State** | Navigation state, view-screen data, and navigate commands |
|
|
138
138
|
|
|
139
|
-
A feature with only UI is invisible to the agent. A full UI feature with only actions is invisible to the user. A feature without app-state means the agent is blind to what the user is doing.
|
|
139
|
+
A feature with only UI is invisible to the agent. A full UI feature with only actions is invisible to the user. A feature without app-state means the agent is blind to what the user is doing. An automation-first operation can legitimately start with action + instructions and add chat, UI, or app-state later when humans need to browse, approve, configure, or share it.
|
|
140
140
|
|
|
141
141
|
## Data in SQL {#data-in-sql}
|
|
142
142
|
|
|
@@ -275,7 +275,7 @@ Why not call an LLM inline?
|
|
|
275
275
|
- **AI is non-deterministic.** You need conversation flow to give feedback and iterate — not one-shot buttons.
|
|
276
276
|
- **Context matters.** The agent has your full codebase, instructions, skills, and history. An inline call has none of that.
|
|
277
277
|
- **The agent can do more.** It can run actions, browse the web, modify code, and chain multiple steps together.
|
|
278
|
-
- **
|
|
278
|
+
- **External execution.** Because everything goes through the agent and actions, any app can be driven from Slack, Telegram, scheduled jobs, scripts, or another agent via [A2A](/docs/a2a-protocol).
|
|
279
279
|
|
|
280
280
|
## Actions system {#actions-system}
|
|
281
281
|
|
|
@@ -404,7 +404,7 @@ See [Context Awareness](/docs/context-awareness) for the full pattern: navigatio
|
|
|
404
404
|
|
|
405
405
|
Implement a domain operation once as an action; the framework exposes it to every consumer. The same `defineAction()` becomes an agent tool, a typesafe UI hook, an HTTP endpoint, a CLI command, an MCP tool, and an A2A tool, with optional `link`, `mcpApp`, native-widget metadata, or Generative UI wrappers added only when a surface needs richer interaction. Skills and instructions cover behavior.
|
|
406
406
|
|
|
407
|
-
For the full protocol/surface matrix (MCP server and OAuth, MCP Apps, A2A, deep links, native chat widgets, Generative UI, AgentChatRuntime connectors, Agent Web, and the adapter horizon for ACP and A2UI), and for choosing a product shape —
|
|
407
|
+
For the full protocol/surface matrix (MCP server and OAuth, MCP Apps, A2A, deep links, native chat widgets, Generative UI, AgentChatRuntime connectors, Agent Web, and the adapter horizon for ACP and A2UI), and for choosing a product shape — chat, inline UI, full app pages, embedded sidecar, automation, or external-agent access — see [Agent Surfaces](/docs/agent-surfaces).
|
|
408
408
|
|
|
409
409
|
## Agent modifies code {#agent-modifies-code}
|
|
410
410
|
|
|
@@ -463,6 +463,6 @@ For detailed guidance on specific patterns:
|
|
|
463
463
|
- [Context Awareness](/docs/context-awareness) — navigation state, view-screen, navigate commands
|
|
464
464
|
- [Skills Guide](/docs/skills-guide) — framework skills, domain skills, creating custom skills
|
|
465
465
|
- [Native Chat UI](/docs/native-chat-ui) — action-declared tables, charts, and BYO runtime posture
|
|
466
|
-
- [Agent Surfaces](/docs/agent-surfaces) —
|
|
466
|
+
- [Agent Surfaces](/docs/agent-surfaces) — chat, native inline UI, full app pages, embedded sidecar, automation, and external-agent paths
|
|
467
467
|
- [A2A Protocol](/docs/a2a-protocol) — agent-to-agent communication
|
|
468
468
|
- [Multi-App Workspace](/docs/multi-app-workspace) — host many apps in one monorepo with shared auth, skills, components, and credentials
|
|
@@ -30,7 +30,7 @@ description: "ابتكر منتج SaaS فعالاً واجعله ملكك - بم
|
|
|
30
30
|
| [**Plan**](/docs/template-plan) | الخطط المرئية وملخصات العلاقات العامة مع المخططات والإطارات السلكية والتعليقات التوضيحية. |
|
|
31
31
|
| [**Dispatch**](/docs/template-dispatch) | مستوى التحكم في مساحة العمل: الأسرار المشتركة، عمليات التكامل القابلة لإعادة الاستخدام، Slack/Telegram، المهام المجدولة. |
|
|
32
32
|
|
|
33
|
-
ألا تريد تطبيق مجال؟ استخدم [Chat](/docs/template-chat) عندما تريد تطبيقًا أساسيًا يمكن للمستخدمين التحدث إليه
|
|
33
|
+
ألا تريد تطبيق مجال؟ استخدم [Chat](/docs/template-chat) عندما تريد تطبيقًا أساسيًا يمكن للمستخدمين التحدث إليه فورًا ويمكن توسيعه عبر actions ونتائج أصلية وصفحات. استخدم [Automation-First Apps](/docs/pure-agent-apps) فقط عندما لا يحتاج workflow إلى UI في المتصفح بعد.
|
|
34
34
|
|
|
35
35
|
اطلع على الكتالوج الكامل ضمن [Apps](/apps)، أو انتقل مباشرة إلى أحد الكتالوجات - على سبيل المثال، [Dispatch](/docs/template-dispatch) هو مكان رائع للبدء إذا كنت تريد تطبيقًا على طراز مساحة العمل.
|
|
36
36
|
|
|
@@ -168,7 +168,7 @@ description: "ابتكر منتج SaaS فعالاً واجعله ملكك - بم
|
|
|
168
168
|
|
|
169
169
|
## البناء على هذا
|
|
170
170
|
|
|
171
|
-
- [**Getting Started**](/docs/getting-started) — أنشئ
|
|
171
|
+
- [**Getting Started**](/docs/getting-started) — أنشئ chat-first app، أضف action، اعرض نتيجة منظمة، ثم وسعها إلى صفحة
|
|
172
172
|
- [**Messaging the agent**](/docs/messaging) — كيف يتحدث المستخدمون (وأنت) مع الوكيل الذي يأتي مع كل قالب
|
|
173
173
|
- [**Multi-App Workspace**](/docs/multi-app-workspace) — تجميع عدة نماذج في مساحة عمل واحدة تشترك في المصادقة والعلامة التجارية والوكيل
|
|
174
174
|
- [**Dispatch**](/docs/template-dispatch) — قالب مستوى التحكم في مساحة العمل
|
|
@@ -182,7 +182,7 @@ description: "ابتكر منتج SaaS فعالاً واجعله ملكك - بم
|
|
|
182
182
|
npx @agent-native/core@latest create my-platform
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
سوف تحصل على منتقي متعدد التحديد. اختر تطبيقًا واحدًا (مستقلًا) أو عدة تطبيقات (مساحة العمل - تتشارك التطبيقات في المصادقة والعلامة التجارية وتكوين الوكيل وقاعدة البيانات). يتم دمج كل قالب تم اختياره في `apps/<name>/` مع كل ملف تحتاجه. بالنسبة إلى
|
|
185
|
+
سوف تحصل على منتقي متعدد التحديد. اختر تطبيقًا واحدًا (مستقلًا) أو عدة تطبيقات (مساحة العمل - تتشارك التطبيقات في المصادقة والعلامة التجارية وتكوين الوكيل وقاعدة البيانات). يتم دمج كل قالب تم اختياره في `apps/<name>/` مع كل ملف تحتاجه. بالنسبة إلى automation بلا UI في المتصفح بدلاً من القالب UI، استخدم `npx @agent-native/core@latest create my-agent --headless`.
|
|
186
186
|
|
|
187
187
|
املأ `.env` (غالبًا `ANTHROPIC_API_KEY` و`DATABASE_URL`)، و`pnpm install`، و`pnpm dev`، وسيعمل. لا يوجد "TODO: تنفيذ تسجيل الدخول،" ولا توجد مسارات نائبة.
|
|
188
188
|
|