@agent-native/core 0.59.1 → 0.60.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 (188) hide show
  1. package/dist/a2a/index.d.ts +2 -0
  2. package/dist/a2a/index.d.ts.map +1 -1
  3. package/dist/a2a/index.js +1 -0
  4. package/dist/a2a/index.js.map +1 -1
  5. package/dist/a2a/invoke.d.ts +63 -0
  6. package/dist/a2a/invoke.d.ts.map +1 -0
  7. package/dist/a2a/invoke.js +157 -0
  8. package/dist/a2a/invoke.js.map +1 -0
  9. package/dist/agent/run-store.d.ts +15 -0
  10. package/dist/agent/run-store.d.ts.map +1 -1
  11. package/dist/agent/run-store.js +28 -0
  12. package/dist/agent/run-store.js.map +1 -1
  13. package/dist/chat-threads/store.d.ts +21 -0
  14. package/dist/chat-threads/store.d.ts.map +1 -1
  15. package/dist/chat-threads/store.js +128 -0
  16. package/dist/chat-threads/store.js.map +1 -1
  17. package/dist/cli/agent.d.ts +23 -0
  18. package/dist/cli/agent.d.ts.map +1 -0
  19. package/dist/cli/agent.js +300 -0
  20. package/dist/cli/agent.js.map +1 -0
  21. package/dist/cli/agents.d.ts +14 -0
  22. package/dist/cli/agents.d.ts.map +1 -0
  23. package/dist/cli/agents.js +95 -0
  24. package/dist/cli/agents.js.map +1 -0
  25. package/dist/cli/code-agent-executor.d.ts.map +1 -1
  26. package/dist/cli/code-agent-executor.js +264 -2
  27. package/dist/cli/code-agent-executor.js.map +1 -1
  28. package/dist/cli/create.d.ts +3 -2
  29. package/dist/cli/create.d.ts.map +1 -1
  30. package/dist/cli/create.js +154 -83
  31. package/dist/cli/create.js.map +1 -1
  32. package/dist/cli/index.js +50 -2
  33. package/dist/cli/index.js.map +1 -1
  34. package/dist/cli/invoke.d.ts +26 -0
  35. package/dist/cli/invoke.d.ts.map +1 -0
  36. package/dist/cli/invoke.js +227 -0
  37. package/dist/cli/invoke.js.map +1 -0
  38. package/dist/cli/templates-meta.d.ts +1 -1
  39. package/dist/cli/templates-meta.d.ts.map +1 -1
  40. package/dist/cli/templates-meta.js +9 -8
  41. package/dist/cli/templates-meta.js.map +1 -1
  42. package/dist/cli/workspacify.d.ts +1 -1
  43. package/dist/cli/workspacify.d.ts.map +1 -1
  44. package/dist/cli/workspacify.js +6 -6
  45. package/dist/cli/workspacify.js.map +1 -1
  46. package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
  47. package/dist/client/NewWorkspaceAppFlow.js +5 -4
  48. package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
  49. package/dist/client/blocks/library/diagram.d.ts.map +1 -1
  50. package/dist/client/blocks/library/diagram.js +23 -17
  51. package/dist/client/blocks/library/diagram.js.map +1 -1
  52. package/dist/client/blocks/types.d.ts +2 -0
  53. package/dist/client/blocks/types.d.ts.map +1 -1
  54. package/dist/client/blocks/types.js.map +1 -1
  55. package/dist/client/chat/index.d.ts +1 -1
  56. package/dist/client/chat/index.d.ts.map +1 -1
  57. package/dist/client/chat/index.js.map +1 -1
  58. package/dist/client/index.d.ts +1 -1
  59. package/dist/client/index.d.ts.map +1 -1
  60. package/dist/client/index.js.map +1 -1
  61. package/dist/client/use-chat-threads.d.ts +13 -0
  62. package/dist/client/use-chat-threads.d.ts.map +1 -1
  63. package/dist/client/use-chat-threads.js +41 -0
  64. package/dist/client/use-chat-threads.js.map +1 -1
  65. package/dist/integrations/plugin.d.ts.map +1 -1
  66. package/dist/integrations/plugin.js +2 -2
  67. package/dist/integrations/plugin.js.map +1 -1
  68. package/dist/onboarding/default-steps.d.ts.map +1 -1
  69. package/dist/onboarding/default-steps.js +102 -0
  70. package/dist/onboarding/default-steps.js.map +1 -1
  71. package/dist/provider-api/actions/github-repo-files.d.ts +84 -0
  72. package/dist/provider-api/actions/github-repo-files.d.ts.map +1 -0
  73. package/dist/provider-api/actions/github-repo-files.js +213 -0
  74. package/dist/provider-api/actions/github-repo-files.js.map +1 -0
  75. package/dist/provider-api/github-repo.d.ts +11 -0
  76. package/dist/provider-api/github-repo.d.ts.map +1 -0
  77. package/dist/provider-api/github-repo.js +553 -0
  78. package/dist/provider-api/github-repo.js.map +1 -0
  79. package/dist/provider-api/index.d.ts +184 -11
  80. package/dist/provider-api/index.d.ts.map +1 -1
  81. package/dist/provider-api/index.js +519 -0
  82. package/dist/provider-api/index.js.map +1 -1
  83. package/dist/scripts/docs/search.d.ts.map +1 -1
  84. package/dist/scripts/docs/search.js +38 -13
  85. package/dist/scripts/docs/search.js.map +1 -1
  86. package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
  87. package/dist/secrets/register-framework-secrets.js +11 -0
  88. package/dist/secrets/register-framework-secrets.js.map +1 -1
  89. package/dist/server/agent-chat-plugin.d.ts +32 -0
  90. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  91. package/dist/server/agent-chat-plugin.js +297 -2
  92. package/dist/server/agent-chat-plugin.js.map +1 -1
  93. package/dist/server/auth-marketing.d.ts.map +1 -1
  94. package/dist/server/auth-marketing.js +17 -7
  95. package/dist/server/auth-marketing.js.map +1 -1
  96. package/dist/server/auth.d.ts.map +1 -1
  97. package/dist/server/auth.js +6 -0
  98. package/dist/server/auth.js.map +1 -1
  99. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  100. package/dist/server/core-routes-plugin.js +18 -98
  101. package/dist/server/core-routes-plugin.js.map +1 -1
  102. package/dist/styles/blocks.css +30 -8
  103. package/dist/styles/rich-markdown-editor.css +10 -4
  104. package/dist/templates/{starter-shell-sync.spec.ts → chat-shell-sync.spec.ts} +21 -21
  105. package/dist/templates/default/.agents/skills/actions/SKILL.md +5 -5
  106. package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +63 -0
  107. package/dist/templates/default/AGENTS.md +22 -1
  108. package/dist/templates/default/actions/hello.ts +1 -1
  109. package/dist/templates/default/actions/navigate.ts +1 -1
  110. package/dist/templates/default/actions/view-screen.ts +1 -1
  111. package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +63 -0
  112. package/dist/templates/headless/.env.example +4 -0
  113. package/dist/templates/headless/.prettierrc +5 -0
  114. package/dist/templates/headless/AGENTS.md +58 -0
  115. package/dist/templates/headless/DEVELOPING.md +22 -0
  116. package/dist/templates/headless/_gitignore +36 -0
  117. package/dist/templates/headless/actions/hello.ts +14 -0
  118. package/dist/templates/headless/actions/run.ts +3 -0
  119. package/dist/templates/headless/package.json +22 -0
  120. package/dist/templates/headless/tsconfig.json +7 -0
  121. package/dist/templates/ui-primitives-sync.spec.ts +2 -2
  122. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -5
  123. package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +63 -0
  124. package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +93 -0
  125. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +1 -1
  126. package/dist/templates/workspace-core/AGENTS.md +20 -3
  127. package/dist/templates/workspace-core/src/server/index.ts +1 -1
  128. package/dist/templates/workspace-root/AGENTS.md +25 -5
  129. package/dist/templates/workspace-root/README.md +7 -7
  130. package/dist/triggers/dispatcher.d.ts +2 -3
  131. package/dist/triggers/dispatcher.d.ts.map +1 -1
  132. package/dist/triggers/dispatcher.js +2 -3
  133. package/dist/triggers/dispatcher.js.map +1 -1
  134. package/dist/triggers/routes.d.ts +38 -0
  135. package/dist/triggers/routes.d.ts.map +1 -0
  136. package/dist/triggers/routes.js +202 -0
  137. package/dist/triggers/routes.js.map +1 -0
  138. package/docs/AGENTS.md +57 -0
  139. package/docs/SKILL.md +40 -0
  140. package/docs/content/a2a-protocol.md +1 -1
  141. package/docs/content/actions.md +48 -8
  142. package/docs/content/agent-surfaces.md +76 -14
  143. package/docs/content/cli-adapters.md +1 -1
  144. package/docs/content/cloneable-saas.md +5 -4
  145. package/docs/content/code-agents-ui.md +1 -1
  146. package/docs/content/components.md +1 -1
  147. package/docs/content/context-awareness.md +1 -1
  148. package/docs/content/creating-templates.md +9 -7
  149. package/docs/content/drop-in-agent.md +1 -1
  150. package/docs/content/faq.md +6 -4
  151. package/docs/content/getting-started.md +63 -73
  152. package/docs/content/key-concepts.md +24 -24
  153. package/docs/content/native-chat-ui.md +4 -4
  154. package/docs/content/pure-agent-apps.md +34 -10
  155. package/docs/content/security.md +1 -1
  156. package/docs/content/server.md +1 -1
  157. package/docs/content/template-chat.md +85 -0
  158. package/docs/content/template-dispatch.md +1 -1
  159. package/docs/content/tracking.md +1 -1
  160. package/docs/content/what-is-agent-native.md +7 -6
  161. package/package.json +10 -1
  162. package/src/templates/{starter-shell-sync.spec.ts → chat-shell-sync.spec.ts} +21 -21
  163. package/src/templates/default/.agents/skills/actions/SKILL.md +5 -5
  164. package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +63 -0
  165. package/src/templates/default/AGENTS.md +22 -1
  166. package/src/templates/default/actions/hello.ts +1 -1
  167. package/src/templates/default/actions/navigate.ts +1 -1
  168. package/src/templates/default/actions/view-screen.ts +1 -1
  169. package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +63 -0
  170. package/src/templates/headless/.env.example +4 -0
  171. package/src/templates/headless/.prettierrc +5 -0
  172. package/src/templates/headless/AGENTS.md +58 -0
  173. package/src/templates/headless/DEVELOPING.md +22 -0
  174. package/src/templates/headless/_gitignore +36 -0
  175. package/src/templates/headless/actions/hello.ts +14 -0
  176. package/src/templates/headless/actions/run.ts +3 -0
  177. package/src/templates/headless/package.json +22 -0
  178. package/src/templates/headless/tsconfig.json +7 -0
  179. package/src/templates/ui-primitives-sync.spec.ts +2 -2
  180. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -5
  181. package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +63 -0
  182. package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +93 -0
  183. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +1 -1
  184. package/src/templates/workspace-core/AGENTS.md +20 -3
  185. package/src/templates/workspace-core/src/server/index.ts +1 -1
  186. package/src/templates/workspace-root/AGENTS.md +25 -5
  187. package/src/templates/workspace-root/README.md +7 -7
  188. package/docs/content/template-starter.md +0 -78
@@ -67,7 +67,7 @@ That separation matters. The UI can be reused by templates, but native process c
67
67
  The old hidden `code` template has been removed. To build a browser-hosted Code surface, create a normal app and mount the shared UI package with a host implementation:
68
68
 
69
69
  ```bash
70
- npx @agent-native/core@latest create my-code-ui --template starter
70
+ npx @agent-native/core@latest create my-code-ui --template chat
71
71
  cd my-code-ui
72
72
  pnpm add @agent-native/code-agents-ui
73
73
  pnpm install
@@ -338,7 +338,7 @@ If you truly need raw text-in/text-out, keep it server-side and use
338
338
  action so the UI and agent share the same capability.
339
339
 
340
340
  ```ts
341
- import { defineAction } from "@agent-native/core";
341
+ import { defineAction } from "@agent-native/core/action";
342
342
  import { completeText } from "@agent-native/core/server";
343
343
 
344
344
  export default defineAction({
@@ -186,7 +186,7 @@ Every template should have a `view-screen` action. It reads navigation and selec
186
186
 
187
187
  ```ts
188
188
  // actions/view-screen.ts
189
- import { defineAction } from "@agent-native/core";
189
+ import { defineAction } from "@agent-native/core/action";
190
190
  import { readAppState } from "@agent-native/core/application-state";
191
191
  import { eq, inArray } from "drizzle-orm";
192
192
  import { z } from "zod";
@@ -17,21 +17,23 @@ A good template:
17
17
  - Registers onboarding steps for required providers and secrets.
18
18
  - Works as a standalone app and as part of a multi-app workspace.
19
19
 
20
- ## Start from Starter {#start-from-starter}
20
+ ## Start from Chat {#start-from-chat}
21
21
 
22
- Use the CLI-only Starter scaffold when you want a blank app with the framework wiring already in place:
22
+ Use the Chat template when you want a minimal app with the framework wiring already in place:
23
23
 
24
24
  ```bash
25
- npx @agent-native/core@latest create my-template --template starter --standalone
25
+ npx @agent-native/core@latest create my-template --template chat --standalone
26
26
  ```
27
27
 
28
- For a workspace with multiple apps, run the picker and include Starter with any domain templates you want:
28
+ For a workspace with multiple apps, run the picker and include Chat with any domain templates you want:
29
29
 
30
30
  ```bash
31
31
  npx @agent-native/core@latest create my-platform
32
32
  ```
33
33
 
34
- Starter gives you auth, the agent sidebar, SQL-backed resources, tools, application state, actions, and polling sync. You add the domain model and product UI.
34
+ Chat gives you auth, durable chat threads, SQL-backed resources, tools, application state, actions, and polling sync. You add the domain model and product UI.
35
+
36
+ If you are not building a reusable UI template yet, use the headless on-ramp in [Getting Started](/docs/getting-started#create-your-agent): define one action, run it with `pnpm agent`, and add UI later when the workflow needs a durable surface.
35
37
 
36
38
  ## Project Structure {#project-structure}
37
39
 
@@ -137,7 +139,7 @@ Actions are the single source of truth for app behavior. The agent calls them as
137
139
 
138
140
  ```ts
139
141
  // actions/create-project.ts
140
- import { defineAction } from "@agent-native/core";
142
+ import { defineAction } from "@agent-native/core/action";
141
143
  import { getDb } from "../server/db/index.js"; // getDb is created per app via createGetDb(schema) in server/db/index.ts
142
144
  import { nanoid } from "nanoid";
143
145
  import { z } from "zod";
@@ -247,7 +249,7 @@ that key is reserved for the framework URL tools and URL-only filter changes.
247
249
 
248
250
  ```ts
249
251
  // actions/navigate.ts
250
- import { defineAction } from "@agent-native/core";
252
+ import { defineAction } from "@agent-native/core/action";
251
253
  import { writeAppState } from "@agent-native/core/application-state";
252
254
  import { z } from "zod";
253
255
 
@@ -255,7 +255,7 @@ history, run state, or user steering, use `completeText()` from
255
255
  an action so the UI and agent share the same operation.
256
256
 
257
257
  ```ts
258
- import { defineAction } from "@agent-native/core";
258
+ import { defineAction } from "@agent-native/core/action";
259
259
  import { completeText } from "@agent-native/core/server";
260
260
 
261
261
  export default defineAction({
@@ -11,13 +11,15 @@ Common questions about agent-native, organized from "I'm just looking" to "I'm w
11
11
 
12
12
  ### What is agent-native? {#what-is-agent-native}
13
13
 
14
- Agent-native is a framework for building apps where the AI agent and the UI are equal partners. They share the same database, the same state, and they always stay in sync. Everything the UI can do, the agent can do and vice versa. See [What Is Agent-Native?](/docs/what-is-agent-native) for the full explanation.
14
+ Agent-native is a framework for building apps where the AI agent and the product surface around it are equal partners. That surface can start as one headless action, grow into rich chat, or become a full UI. The invariant is that agents and humans share the same actions, database, and state. See [What Is Agent-Native?](/docs/what-is-agent-native) for the full explanation.
15
15
 
16
16
  ### Who is this for? {#who-is-this-for}
17
17
 
18
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
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
+ - **Start with Chat** if you want a basic app users can talk to immediately, then extend with actions and screens — start with [Getting Started](/docs/getting-started) or [Chat](/docs/template-chat).
22
+ - **Start primitive-first** if you want one action and a headless app-agent loop before committing to UI — start with [Getting Started](/docs/getting-started).
21
23
  - **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
24
  - **Build from scratch** if you want the framework primitives for a new agent-driven product — start with [Getting Started](/docs/getting-started).
23
25
  - **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).
@@ -59,7 +61,7 @@ You can, but agent-native works best when built from the ground up. The architec
59
61
 
60
62
  ### What templates are available? {#what-templates-are-available}
61
63
 
62
- The framework ships with production-ready templates including [Mail](/docs/template-mail), [Calendar](/docs/template-calendar), [Forms](/docs/template-forms), [Plan](/docs/template-plan) (visual plans and PR recaps), [Analytics](/docs/template-analytics), [Dispatch](/docs/template-dispatch), and more. Each is a complete app with UI, agent actions, database schema, and AI instructions ready to go. See [Templates](/docs/cloneable-saas) for the full catalog.
64
+ The framework ships with production-ready templates including [Chat](/docs/template-chat), [Mail](/docs/template-mail), [Calendar](/docs/template-calendar), [Forms](/docs/template-forms), [Plan](/docs/template-plan) (visual plans and PR recaps), [Analytics](/docs/template-analytics), [Dispatch](/docs/template-dispatch), and more. Each is a complete app with UI, agent actions, database schema, and AI instructions ready to go. See [Templates](/docs/cloneable-saas) for the full catalog.
63
65
 
64
66
  ### Can I customize templates? {#can-i-customize-templates}
65
67
 
@@ -67,11 +69,11 @@ That's the whole point. Fork a template and customize it by asking the agent. "A
67
69
 
68
70
  ### Can I build something the templates don't cover? {#build-from-scratch}
69
71
 
70
- Yes. Run `npx @agent-native/core@latest create my-app` and accept the default **Starter** selection in the picker (or pass `--template starter`) you get the framework scaffolding (frontend, backend, agent panel, database) but no domain-specific code. See [Getting Started](/docs/getting-started). For agent-first products with no traditional UI, see [Pure-Agent Apps](/docs/pure-agent-apps).
72
+ Yes. If you want a basic chat app, run `npx @agent-native/core@latest create my-chat-app --template chat`; you get durable chat threads, actions, auth, SQL-backed runtime state, and room to add your own screens. If you want the smallest action-first app with no UI, run `npx @agent-native/core@latest create my-agent --headless`. See [Getting Started](/docs/getting-started), [Pure-Agent Apps](/docs/pure-agent-apps), and [Chat](/docs/template-chat).
71
73
 
72
74
  ### Can I try it without forking a template? {#try-with-a-skill}
73
75
 
74
- Yes — install a skill into a coding agent you already use with one command and no scaffold required. See [Try it with a skill](/docs/getting-started#try-with-a-skill) in Getting Started for the full walkthrough.
76
+ Yes — install a skill into a coding agent you already use with one command and no scaffold required. See the [Skills Guide](/docs/skills-guide#app-backed-skills) for the walkthrough.
75
77
 
76
78
  ## Agent capabilities {#agent-capabilities}
77
79
 
@@ -1,123 +1,113 @@
1
1
  ---
2
2
  title: "Getting Started"
3
- description: "Choose the right path: hosted apps, local setup, agent-native skills, or external-agent connections."
3
+ description: "Create a chat-first agent-native app, or start headless with one action and add UI later."
4
4
  ---
5
5
 
6
6
  # Getting Started
7
7
 
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.
8
+ Agent-Native is for apps where an AI agent and any UI around it share the same actions, data, and state. The default starting point is the [Chat template](/docs/template-chat): a minimal chat app with durable threads, a left sidebar, auth, live sync, and actions ready to extend.
9
9
 
10
- ## Pick your path {#who-is-this-for}
10
+ Start with Chat when you want a browser app users can talk to immediately. Start headless when you only want actions and the local app-agent loop for now.
11
11
 
12
- Start with the path that matches what you want to do next:
12
+ If you already know you want a finished domain app, go to [Templates](/docs/cloneable-saas). If you are choosing between headless, chat, embedded, or full app, go to [Agent Surfaces](/docs/agent-surfaces). Otherwise, keep going.
13
13
 
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
- - **Choose headless, chat, embedded, or full app.** Use [Agent Surfaces](/docs/agent-surfaces) when you know the workflow but not how much UI belongs around it.
17
- - **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.
18
- - **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.
19
-
20
- 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.
21
-
22
- ## Create a local app {#create-your-app}
14
+ ## Create a chat app {#create-your-agent}
23
15
 
24
16
  You'll need [Node.js 22 or newer](https://nodejs.org) and [pnpm](https://pnpm.io) installed. Then run:
25
17
 
26
18
  ```bash
27
- npx @agent-native/core@latest create my-platform
28
- cd my-platform
29
- pnpm install && pnpm dev
19
+ npx @agent-native/core@latest create my-chat-app --template chat
20
+ cd my-chat-app
21
+ pnpm install
22
+ pnpm dev
30
23
  ```
31
24
 
32
- 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`.
33
-
34
- 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`.
35
-
36
- ### Agent credentials {#agent-credentials}
37
-
38
- In local development the embedded agent panel picks up your existing Claude Code or Codex CLI login automatically, or reads `ANTHROPIC_API_KEY` from a `.env` file in the project root. The database defaults to SQLite (stored at `data/app.db`) when `DATABASE_URL` is not set, so you can run the full stack with no external services. For production deployments — where you'll want Postgres, a persistent secret, and bring-your-own-key per user — see [Deployment](/docs/deployment).
39
-
40
- ## What just happened? {#what-just-happened}
41
-
42
- You now have a real app running on your machine with an agent built into it:
43
-
44
- - The UI works like a normal SaaS product: routes, forms, tables, settings, and keyboard flows.
45
- - The agent panel can read the current screen and run the same actions the UI runs.
46
- - Changes stay in sync because the UI and agent share the same database and application state.
25
+ This creates the minimal Chat app: a full-page chat route, durable chat threads, the standard left sidebar, an `actions/` folder, the framework runtime, and a SQLite database at `data/app.db` unless you set `DATABASE_URL`.
26
+
27
+ Open the local URL, then ask the chat what actions are available. The scaffold includes one example action:
28
+
29
+ ```ts
30
+ // actions/hello.ts
31
+ import { defineAction } from "@agent-native/core/action";
32
+ import { z } from "zod";
33
+
34
+ export default defineAction({
35
+ description: "Say hello from the local agent.",
36
+ schema: z.object({
37
+ name: z.string().default("world"),
38
+ }),
39
+ http: { method: "GET" },
40
+ readOnly: true,
41
+ run: async ({ name }) => {
42
+ return { message: `Hello, ${name}!` };
43
+ },
44
+ });
45
+ ```
47
46
 
48
- That parity between agent and UI is the whole point — see [What Is Agent-Native?](/docs/what-is-agent-native) for the bigger picture.
47
+ Run that action directly:
49
48
 
50
- ## Pick a template {#templates}
49
+ ```bash
50
+ pnpm action hello --name Steve
51
+ ```
51
52
 
52
- Templates are complete apps, not blank starters. Choose one when you want a familiar product to customize:
53
+ Then run the same app-agent loop from the terminal:
53
54
 
54
- - **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)
55
- - **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)
56
- - **Bare starting point** — [Starter](/docs/template-starter), a minimal app with the framework wiring and no domain model
55
+ ```bash
56
+ pnpm agent "Call the hello action for Steve and explain what happened."
57
+ ```
57
58
 
58
- Browse the [template gallery](/templates) for live hosted apps. See [Templates](/docs/cloneable-saas) for the full catalog and the clone customize deploy flow.
59
+ That is the local app-agent loop. The chat UI, CLI, HTTP, MCP, A2A, jobs, and future screens can all call the same action surface.
59
60
 
60
- ## Add more apps to a workspace {#creating-vs-adding-apps}
61
+ ## Start headless instead {#headless}
61
62
 
62
- `create` (above) makes a brand-new workspace. Once you have one, add more apps to it with `add-app`, run from the workspace root:
63
+ Use headless mode when you want no browser app yet:
63
64
 
64
65
  ```bash
65
- cd my-platform
66
- npx @agent-native/core@latest add-app
66
+ npx @agent-native/core@latest create my-agent --headless
67
+ cd my-agent
67
68
  pnpm install
68
- pnpm dev
69
+ pnpm action hello --name Steve
70
+ pnpm agent "Call the hello action for Steve and explain what happened."
69
71
  ```
70
72
 
71
- 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`.
73
+ This creates the smallest local Agent-Native runtime: an `actions/` folder, instructions, the framework runtime, and SQL state. Later, add chat by starting from the [Chat template](/docs/template-chat) and moving your actions in, or by copying the Chat template's route/sidebar pattern into the headless app.
72
74
 
73
- To add another app from a specific template, pass a name and `--template`:
75
+ ### Agent credentials {#agent-credentials}
74
76
 
75
- ```bash
76
- npx @agent-native/core@latest add-app design-lab --template design
77
- ```
77
+ In local development the agent command reads provider credentials from your environment, such as `ANTHROPIC_API_KEY` in a `.env` file in the project root. Browser chat surfaces can also use configured agent credentials. The full loop is not stateless: actions, auth/session data, application state, threads, and run history use SQL. Locally that defaults to SQLite; in production you will usually point `DATABASE_URL` at Postgres or another persistent SQL database. See [Deployment](/docs/deployment).
78
78
 
79
- ## Try it with a skill {#try-with-a-skill}
79
+ ## What just happened? {#what-just-happened}
80
80
 
81
- 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:
81
+ You now have a real app-agent loop:
82
82
 
83
- ```bash
84
- npx @agent-native/core@latest skills add visual-plan
85
- ```
83
+ - `hello` is one action definition, available to the agent, CLI, HTTP, MCP, A2A, and any future UI.
84
+ - `pnpm agent` calls the same production app-agent loop used by chat, jobs, webhooks, and hosted runtimes.
85
+ - Changes and history stay in sync because the local runtime uses SQL-backed state, even when you have no custom UI yet.
86
86
 
87
- 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.
88
-
89
- 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).
87
+ That parity between agent and UI is the whole point. See [What Is Agent-Native?](/docs/what-is-agent-native) for the bigger picture.
90
88
 
91
89
  ## Project structure {#project-structure}
92
90
 
93
- Every agent-native app — whether from a template or from scratch — follows the same structure:
91
+ Every agent-native app follows the same structure:
94
92
 
95
93
  ```text
96
94
  my-app/
97
- app/ # React frontend (routes, components, hooks)
98
- server/ # Nitro API server (routes, plugins)
99
95
  actions/ # Agent-callable actions
96
+ app/ # React frontend in UI templates; omitted in headless apps
97
+ server/ # Nitro API server (routes, plugins)
100
98
  .agents/ # Agent instructions and skills
99
+ data/app.db # Local SQLite runtime state when DATABASE_URL is unset
101
100
  ```
102
101
 
103
- 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.
104
-
105
- ## Architecture principles {#architecture-principles}
106
-
107
- The three principles that apply to every agent-native app:
108
-
109
- - **Agent + UI are equal partners** — everything the UI can do, the agent can do, and vice versa; they share the same database.
110
- - **Everything is an action** — agent tools, UI mutations, HTTP endpoints, MCP tools, and CLI commands are all the same `defineAction()` definition.
111
- - **All state in SQL** — app state, navigation, drafts, and settings live in the database so both agent and UI always see the same picture.
112
-
113
- The definitive six rules are in [Key Concepts](/docs/key-concepts).
102
+ Templates add domain-specific code on top: database schemas in `server/db/`, API routes in `server/routes/api/`, and actions in `actions/`. See [Creating Templates](/docs/creating-templates) when you are ready to build or publish a reusable template.
114
103
 
115
104
  ## Common next moves {#next-docs}
116
105
 
117
- Once your app is running, the usual next step is small and concrete:
106
+ Once your agent is running, the usual next step is small and concrete:
118
107
 
119
- - **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.
120
- - **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.
108
+ - **Ask the built-in agent what it can do** — open Chat and type "what actions do you have, and what can you do here?" This verifies that the app-agent loop is connected.
109
+ - **Add one real action** — replace `hello` with the smallest useful operation in your domain.
110
+ - **Add UI only when it clarifies the work** — use [Agent Surfaces](/docs/agent-surfaces) to choose between headless, chat, embedded, and full-app surfaces.
121
111
  - **Deploy it** — see [Deployment](/docs/deployment) when you're ready to put the app on your own domain.
122
112
 
123
113
  Useful follow-up docs:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Key Concepts"
3
- description: "How agent-native apps work: the four-area checklist, SQL database, agent chat bridge, polling sync, actions, external-agent entry points, context awareness, and portability."
3
+ description: "How agent-native apps work: actions first, SQL database, app-agent loop, optional UI, polling sync, external-agent entry points, context awareness, and portability."
4
4
  ---
5
5
 
6
6
  # Key Concepts
@@ -16,7 +16,7 @@ Teams today have four options for AI-powered work, and none of them are ideal:
16
16
  3. **Custom AI apps** — limited. The AI can't see what you see, can't react to what you click, and can't update the app itself. No conversation history, no rollback, no skills.
17
17
  4. **Existing SaaS** (Amplitude, HubSpot, Google Slides) — bolting AI onto architectures that weren't designed for it. You can feel the seams.
18
18
 
19
- Agent-native apps solve this by making the agent and the UI equal citizens of the same system. Think of it as Claude Code, but with buttons and visual interfaces. The agent can do anything the UI can do (via natural language), and the UI can trigger anything the agent can do (via buttons).
19
+ Agent-native apps solve this by making the agent and any UI equal citizens of the same system. Think of it as Claude Code, but with durable actions, SQL state, and visual interfaces when the workflow needs them. A workflow can start as one callable action, then grow into chat, screens, schedules, or a full app without rewriting the operation.
20
20
 
21
21
  See [What Is Agent-Native?](/docs/what-is-agent-native) for the full vision and philosophy.
22
22
 
@@ -26,11 +26,11 @@ Every agent-native app is three things working together:
26
26
 
27
27
  > **Agent** — Autonomous AI that reads data, writes data, runs actions, and modifies code. Customizable with skills and instructions.
28
28
  >
29
- > **Application** — Full React UI with dashboards, flows, and visualizations. Guided experiences your team can use.
29
+ > **Application** — The product surface around the agent. This may be action-only at first, rich chat, a small control plane, or a full React UI with dashboards, flows, and visualizations.
30
30
  >
31
31
  > **Computer** — Database, browser, code execution. Agents work directly with SQL and built-in tools; MCP servers are optional add-ons, not the foundation.
32
32
 
33
- Every app includes an embedded agent panel with chat and optional CLI terminal. Locally, you run `pnpm dev` and the agent is right there. 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.
33
+ Headless 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.
34
34
 
35
35
  Six rules govern the architecture:
36
36
 
@@ -43,7 +43,7 @@ Six rules govern the architecture:
43
43
 
44
44
  ## The four-area checklist {#four-area-checklist}
45
45
 
46
- Every new feature must update all four areas. Skipping any one breaks the agent-native contract.
46
+ Every user-facing feature should update all applicable areas. Skipping an applicable area breaks the agent-native contract; forcing a UI onto an action-only primitive is also a smell.
47
47
 
48
48
  | Area | Description |
49
49
  | ---------------- | -------------------------------------------------------------- |
@@ -52,7 +52,7 @@ Every new feature must update all four areas. Skipping any one breaks the agent-
52
52
  | **3. Skills** | Update AGENTS.md and/or create a skill documenting the pattern |
53
53
  | **4. App-State** | Navigation state, view-screen data, and navigate commands |
54
54
 
55
- A feature with only UI is invisible to the agent. A 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.
55
+ 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. A headless operation can legitimately start with action + instructions and add UI/app-state later when humans need to browse, approve, configure, or share it.
56
56
 
57
57
  ## Data in SQL {#data-in-sql}
58
58
 
@@ -116,7 +116,7 @@ When the agent needs to do something complex — call an API, process data, quer
116
116
 
117
117
  ```ts
118
118
  // actions/fetch-data.ts
119
- import { defineAction } from "@agent-native/core";
119
+ import { defineAction } from "@agent-native/core/action";
120
120
  import { z } from "zod";
121
121
 
122
122
  export default defineAction({
@@ -190,23 +190,23 @@ 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, and typed app results in chat. | Structured action results |
198
- | AgentChatRuntime connectors | Shipping | The chat shell can sit on top of OpenAI Agents, OpenAI Responses, Claude Agent SDK, Vercel AI SDK, AG-UI, or normalized HTTP streams. | Pick a runtime helper or stream normalized events |
199
- | HTTP and CLI | Shipping | Actions auto-mount at `/_agent-native/actions/:name` and run via `pnpm action <name>`. | The same action |
200
- | 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` |
201
- | MCP OAuth | Shipping | Standard remote MCP OAuth, PKCE, dynamic client registration, refresh tokens, and `mcp:read` / `mcp:write` / `mcp:apps` scopes. | Nothing per action |
202
- | MCP Apps | Shipping | External hosts that support app resources can render iframe/native-host widgets, with deep-link fallback elsewhere. | Optional `mcpApp` metadata |
203
- | A2A | Shipping | Other agents discover the agent card and call the app over JSON-RPC tasks. | The same actions and agent config |
204
- | Deep links | Shipping | Action results can round-trip users into the running UI through `/_agent-native/open` and `agentnative://open`. | Optional `link` metadata |
205
- | MCP clients | Shipping | The app can also consume local, remote, or hub-shared MCP servers as `mcp__...` tools. | `mcp.config.json` or settings |
206
- | 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 |
207
- | Agent Web | Shipping | Public pages can publish `robots.txt`, `sitemap.xml`, `llms.txt`, markdown mirrors, and structured metadata. | Route access plus `agentWeb` config |
208
- | Extensions | Shipping | Sandboxed mini-apps call app actions, persist extension data, and use proxied fetch helpers. | Extension HTML using `appAction()` |
209
- | ACP | Coding-agent/editor | Useful for coding agents inside editors/IDEs; not the general BYO app-chat runtime contract. | Editor/agent adapter work |
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, and typed app results in chat. | Structured action results |
198
+ | AgentChatRuntime connectors | Shipping | The chat shell can sit on top of OpenAI Agents, OpenAI Responses, Claude Agent SDK, Vercel AI SDK, AG-UI, or normalized HTTP streams. | Pick a runtime helper or stream normalized events |
199
+ | HTTP and CLI | Shipping | Actions auto-mount at `/_agent-native/actions/:name`, run via `pnpm action <name>`, and can be driven by the headless app-agent loop with `pnpm agent`. | The same action |
200
+ | 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` |
201
+ | MCP OAuth | Shipping | Standard remote MCP OAuth, PKCE, dynamic client registration, refresh tokens, and `mcp:read` / `mcp:write` / `mcp:apps` scopes. | Nothing per action |
202
+ | MCP Apps | Shipping | External hosts that support app resources can render iframe/native-host widgets, with deep-link fallback elsewhere. | Optional `mcpApp` metadata |
203
+ | A2A | Shipping | Other agents discover the agent card and call the app over JSON-RPC tasks. | The same actions and agent config |
204
+ | Deep links | Shipping | Action results can round-trip users into the running UI through `/_agent-native/open` and `agentnative://open`. | Optional `link` metadata |
205
+ | MCP clients | Shipping | The app can also consume local, remote, or hub-shared MCP servers as `mcp__...` tools. | `mcp.config.json` or settings |
206
+ | 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 |
207
+ | Agent Web | Shipping | Public pages can publish `robots.txt`, `sitemap.xml`, `llms.txt`, markdown mirrors, and structured metadata. | Route access plus `agentWeb` config |
208
+ | Extensions | Shipping | Sandboxed mini-apps call app actions, persist extension data, and use proxied fetch helpers. | Extension HTML using `appAction()` |
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
210
 
211
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, AgentChatRuntime connectors, CLI commands, and deep-link handoffs are adapters around that same core.
212
212
 
@@ -38,12 +38,12 @@ Server actions should import the server-safe helpers and schemas from
38
38
  `@agent-native/core/client/chat` or `@agent-native/core/client`.
39
39
 
40
40
  ```ts
41
+ import { defineAction } from "@agent-native/core/action";
42
+ import { ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER } from "@agent-native/core/action-ui";
41
43
  import {
42
- ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,
44
+ createDataInsightsWidgetResult,
43
45
  dataInsightsWidgetResultSchema,
44
- defineAction,
45
- } from "@agent-native/core";
46
- import { createDataInsightsWidgetResult } from "@agent-native/core/data-widgets";
46
+ } from "@agent-native/core/data-widgets";
47
47
 
48
48
  export default defineAction({
49
49
  description: "Analyze form responses.",
@@ -1,16 +1,18 @@
1
1
  ---
2
2
  title: "Pure-Agent Apps"
3
- description: "Apps where the agent is the whole product open it, ask for what you want, and the agent does the rest."
3
+ description: "Apps where the first product surface is the app-agent loop: define actions, run them locally, and add UI only when users need it."
4
4
  ---
5
5
 
6
6
  # Pure-Agent Apps
7
7
 
8
- This is the minimal end of agent-native for the full-UI end, start from a [template](/docs/cloneable-saas). If you are choosing between headless, chat-first, embedded, and full-app shapes, start with [Agent Surfaces](/docs/agent-surfaces).
8
+ This is the minimal end of agent-native: an app whose first user-facing surface is the agent loop, not a dashboard. For the full-UI end, start from a [template](/docs/cloneable-saas). If you are choosing between headless, chat-first, embedded, and full-app shapes, start with [Agent Surfaces](/docs/agent-surfaces).
9
9
 
10
- Imagine opening an app and seeing just a chat. No dashboard. No sidebar full of menus. No forms. You ask for what you want "summarize my unread emails," "post the daily metrics to Slack," "find the candidates who replied last week" and the agent goes off and does it. The output shows up in chat, in Slack, in your inbox, wherever it belongs.
10
+ Imagine opening an app and seeing just a chat. No dashboard. No sidebar full of menus. No forms. You ask for what you want - "summarize my unread emails," "post the daily metrics to Slack," "find the candidates who replied last week" - and the agent goes off and does it. The output shows up in chat, in Slack, in your inbox, wherever it belongs.
11
11
 
12
12
  That's a pure-agent app. The agent _is_ the product.
13
13
 
14
+ It is still an app, not a stateless prompt. Actions, auth sessions, app state, thread history, run history, settings, credentials, and share records live in SQL. Locally that defaults to SQLite; hosted deployments should use a persistent SQL database.
15
+
14
16
  ## What it feels like to use one {#user-experience}
15
17
 
16
18
  Most apps are built around a UI: a database table you browse, a form you fill, a chart you read. The agent is a sidekick.
@@ -35,7 +37,7 @@ Pick the pure-agent pattern when:
35
37
  - **The domain is one-shot.** Research bot, summary generator, report writer. There's no persistent object that needs a list view.
36
38
  - **You're prototyping.** Ship the agent now; add a richer UI later if it turns out users actually want one.
37
39
 
38
- If your product is built around persistent objects users browse, pivot, and share emails, events, documents, charts pick a [template](/docs/cloneable-saas) instead. Those have full UIs _plus_ the agent.
40
+ If your product is built around persistent objects users browse, pivot, and share - emails, events, documents, charts - pick a [template](/docs/cloneable-saas) instead. Those have full UIs _plus_ the agent.
39
41
 
40
42
  ## What ships in the box {#minimum-ui}
41
43
 
@@ -62,15 +64,17 @@ The trade-off: pure-agent apps don't give users a "browse-everything-at-a-glance
62
64
 
63
65
  If you're not a developer, you can usually start with the [Dispatch template](/docs/template-dispatch) — it's a workspace-style pure-agent app with Slack/Telegram, scheduled jobs, and shared secrets out of the box.
64
66
 
65
- For developers who want the absolute minimum, start from the **Starter** template:
67
+ For developers who want the absolute minimum, start from a headless scaffold:
66
68
 
67
69
  ```bash
68
- npx @agent-native/core@latest create my-agent --template starter
70
+ npx @agent-native/core@latest create my-agent --headless
69
71
  ```
70
72
 
71
- Starter gives you the architecture, the agent panel, the workspace, auth, polling, and one example action and nothing else. Add your own actions in `actions/`, connect any MCP servers you need, write the relevant skills into the workspace, and you're done.
73
+ This gives you the framework runtime, SQL-backed state, an `actions/` directory, and `pnpm agent` for running the local app-agent loop. Add one useful `defineAction()` and you have a real agent-native app. The same action can later render in chat, appear behind a button, expose an MCP tool, or move into a full UI without changing the core operation.
74
+
75
+ Use [**Chat**](/docs/template-chat) when you are ready to add a browser UI but do not want a domain template. Chat is the add-UI scaffold path, not the required default for a pure-agent app.
72
76
 
73
- If you really want _zero_ UI except the agent, `app/routes/index.tsx` can render `<AgentPanel defaultMode="chat" />` fullscreen. The only thing the user sees is the chat. Everything else job history, workspace, settings is one click away in the panel's tabs.
77
+ If you really want _zero_ custom UI except the agent, keep the app route focused on the built-in chat surface. The only thing the user sees is the chat. Everything else - job history, workspace, settings - is one click away in the panel's tabs.
74
78
 
75
79
  ### What you still get for free {#still-free}
76
80
 
@@ -80,16 +84,36 @@ Even with no custom UI, you still inherit every framework benefit:
80
84
  - **Recurring jobs** for scheduled work — "every morning at 7, summarize my unread emails and post to Slack."
81
85
  - **The workspace** for per-user customization, skills, memory, MCP connections.
82
86
  - **Sub-agent delegation** via [agent teams](/docs/agent-teams).
83
- - **Portability** — deploys to any serverless host, any SQL database.
87
+ - **Portability** — deploys to any serverless host with any supported SQL database.
84
88
  - **Multi-tenant by default** — each user gets their own workspace without a dev-box.
85
89
 
86
90
  ### Adding a tiny bit of UI {#tiny-ui}
87
91
 
88
92
  Most pure-agent apps eventually want a little custom UI — not a dashboard, but maybe a status page, a job history, or a config screen. The [drop-in agent](/docs/drop-in-agent) components coexist with anything else you render. Add a single `/status` route that lists recent runs; keep everything else in the chat. That's usually enough.
89
93
 
94
+ Future UI-grafting tooling should use a distinct verb or namespace. `agent-native add` already means integration blueprints such as providers, channels, and sandbox adapters, so it should not also mean "add UI to this headless app."
95
+
96
+ ## Repo access for cloud headless {#repo-access}
97
+
98
+ Local headless apps run against the folder on your machine. For cloud headless
99
+ apps that need repository access, the intended model is connector-scoped access:
100
+ a GitHub connector and token CRUD that can list repositories, search files, read
101
+ files, create or edit files, and delete files with the user's permission.
102
+
103
+ Do not design this as "clone the user's repo into our VM" or "give the agent a long-lived sandbox copy of the repo" as the primary model. Sandboxes are useful for isolated code execution, but repo access should be a provider integration with explicit tokens, scoped permissions, auditability, and revocation.
104
+
105
+ ## Sharing sessions and runs {#sharing-runs}
106
+
107
+ Pure-agent work produces durable sessions and runs. Shareability should roll out in phases:
108
+
109
+ - **First:** read-only share links so a teammate can open a thread or run, inspect the sanitized transcript, outputs, and status, and follow along without taking control.
110
+ - **Later:** permissioned writable collaboration, such as continuing a run, editing schedules, approving actions, or changing configuration with explicit access checks.
111
+
112
+ That staged model keeps the first sharing surface useful without pretending collaborative control is solved before the permission model is ready.
113
+
90
114
  ## What's next
91
115
 
92
- - [**Getting Started**](/docs/getting-started) — clone the Starter template
116
+ - [**Getting Started**](/docs/getting-started) — create a chat app or headless action first
93
117
  - [**Agent Surfaces**](/docs/agent-surfaces) — choose headless, rich chat, embedded sidecar, or full app
94
118
  - [**Messaging the agent**](/docs/messaging) — how users talk to the agent across web, Slack, Telegram, email
95
119
  - [**Recurring Jobs**](/docs/recurring-jobs) — scheduled prompts the agent runs on its own
@@ -28,7 +28,7 @@ Use `defineAction` with a Zod `schema:` for every action. The framework validate
28
28
 
29
29
  ```typescript
30
30
  import { z } from "zod";
31
- import { defineAction } from "@agent-native/core";
31
+ import { defineAction } from "@agent-native/core/action";
32
32
 
33
33
  export default defineAction({
34
34
  description: "Create a note",
@@ -65,7 +65,7 @@ hatch.
65
65
 
66
66
  ```ts
67
67
  // actions/classify-message.ts
68
- import { defineAction } from "@agent-native/core";
68
+ import { defineAction } from "@agent-native/core/action";
69
69
  import { completeText } from "@agent-native/core/server";
70
70
  import { z } from "zod";
71
71