@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.
- package/dist/a2a/index.d.ts +2 -0
- package/dist/a2a/index.d.ts.map +1 -1
- package/dist/a2a/index.js +1 -0
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/invoke.d.ts +63 -0
- package/dist/a2a/invoke.d.ts.map +1 -0
- package/dist/a2a/invoke.js +157 -0
- package/dist/a2a/invoke.js.map +1 -0
- package/dist/agent/run-store.d.ts +15 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +28 -0
- package/dist/agent/run-store.js.map +1 -1
- package/dist/chat-threads/store.d.ts +21 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +128 -0
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/agent.d.ts +23 -0
- package/dist/cli/agent.d.ts.map +1 -0
- package/dist/cli/agent.js +300 -0
- package/dist/cli/agent.js.map +1 -0
- package/dist/cli/agents.d.ts +14 -0
- package/dist/cli/agents.d.ts.map +1 -0
- package/dist/cli/agents.js +95 -0
- package/dist/cli/agents.js.map +1 -0
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +264 -2
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/create.d.ts +3 -2
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +154 -83
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +50 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/invoke.d.ts +26 -0
- package/dist/cli/invoke.d.ts.map +1 -0
- package/dist/cli/invoke.js +227 -0
- package/dist/cli/invoke.js.map +1 -0
- package/dist/cli/templates-meta.d.ts +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +9 -8
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/cli/workspacify.d.ts +1 -1
- package/dist/cli/workspacify.d.ts.map +1 -1
- package/dist/cli/workspacify.js +6 -6
- package/dist/cli/workspacify.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +5 -4
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/blocks/library/diagram.d.ts.map +1 -1
- package/dist/client/blocks/library/diagram.js +23 -17
- package/dist/client/blocks/library/diagram.js.map +1 -1
- package/dist/client/blocks/types.d.ts +2 -0
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/chat/index.d.ts +1 -1
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts +13 -0
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +41 -0
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +2 -2
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/onboarding/default-steps.d.ts.map +1 -1
- package/dist/onboarding/default-steps.js +102 -0
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/provider-api/actions/github-repo-files.d.ts +84 -0
- package/dist/provider-api/actions/github-repo-files.d.ts.map +1 -0
- package/dist/provider-api/actions/github-repo-files.js +213 -0
- package/dist/provider-api/actions/github-repo-files.js.map +1 -0
- package/dist/provider-api/github-repo.d.ts +11 -0
- package/dist/provider-api/github-repo.d.ts.map +1 -0
- package/dist/provider-api/github-repo.js +553 -0
- package/dist/provider-api/github-repo.js.map +1 -0
- package/dist/provider-api/index.d.ts +184 -11
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +519 -0
- package/dist/provider-api/index.js.map +1 -1
- package/dist/scripts/docs/search.d.ts.map +1 -1
- package/dist/scripts/docs/search.js +38 -13
- package/dist/scripts/docs/search.js.map +1 -1
- package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
- package/dist/secrets/register-framework-secrets.js +11 -0
- package/dist/secrets/register-framework-secrets.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +32 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +297 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth-marketing.d.ts.map +1 -1
- package/dist/server/auth-marketing.js +17 -7
- package/dist/server/auth-marketing.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +6 -0
- package/dist/server/auth.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +18 -98
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/styles/blocks.css +30 -8
- package/dist/styles/rich-markdown-editor.css +10 -4
- package/dist/templates/{starter-shell-sync.spec.ts → chat-shell-sync.spec.ts} +21 -21
- package/dist/templates/default/.agents/skills/actions/SKILL.md +5 -5
- package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/dist/templates/default/AGENTS.md +22 -1
- package/dist/templates/default/actions/hello.ts +1 -1
- package/dist/templates/default/actions/navigate.ts +1 -1
- package/dist/templates/default/actions/view-screen.ts +1 -1
- package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/dist/templates/headless/.env.example +4 -0
- package/dist/templates/headless/.prettierrc +5 -0
- package/dist/templates/headless/AGENTS.md +58 -0
- package/dist/templates/headless/DEVELOPING.md +22 -0
- package/dist/templates/headless/_gitignore +36 -0
- package/dist/templates/headless/actions/hello.ts +14 -0
- package/dist/templates/headless/actions/run.ts +3 -0
- package/dist/templates/headless/package.json +22 -0
- package/dist/templates/headless/tsconfig.json +7 -0
- package/dist/templates/ui-primitives-sync.spec.ts +2 -2
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -5
- package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +93 -0
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +1 -1
- package/dist/templates/workspace-core/AGENTS.md +20 -3
- package/dist/templates/workspace-core/src/server/index.ts +1 -1
- package/dist/templates/workspace-root/AGENTS.md +25 -5
- package/dist/templates/workspace-root/README.md +7 -7
- package/dist/triggers/dispatcher.d.ts +2 -3
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +2 -3
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/triggers/routes.d.ts +38 -0
- package/dist/triggers/routes.d.ts.map +1 -0
- package/dist/triggers/routes.js +202 -0
- package/dist/triggers/routes.js.map +1 -0
- package/docs/AGENTS.md +57 -0
- package/docs/SKILL.md +40 -0
- package/docs/content/a2a-protocol.md +1 -1
- package/docs/content/actions.md +48 -8
- package/docs/content/agent-surfaces.md +76 -14
- package/docs/content/cli-adapters.md +1 -1
- package/docs/content/cloneable-saas.md +5 -4
- package/docs/content/code-agents-ui.md +1 -1
- package/docs/content/components.md +1 -1
- package/docs/content/context-awareness.md +1 -1
- package/docs/content/creating-templates.md +9 -7
- package/docs/content/drop-in-agent.md +1 -1
- package/docs/content/faq.md +6 -4
- package/docs/content/getting-started.md +63 -73
- package/docs/content/key-concepts.md +24 -24
- package/docs/content/native-chat-ui.md +4 -4
- package/docs/content/pure-agent-apps.md +34 -10
- package/docs/content/security.md +1 -1
- package/docs/content/server.md +1 -1
- package/docs/content/template-chat.md +85 -0
- package/docs/content/template-dispatch.md +1 -1
- package/docs/content/tracking.md +1 -1
- package/docs/content/what-is-agent-native.md +7 -6
- package/package.json +10 -1
- package/src/templates/{starter-shell-sync.spec.ts → chat-shell-sync.spec.ts} +21 -21
- package/src/templates/default/.agents/skills/actions/SKILL.md +5 -5
- package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/src/templates/default/AGENTS.md +22 -1
- package/src/templates/default/actions/hello.ts +1 -1
- package/src/templates/default/actions/navigate.ts +1 -1
- package/src/templates/default/actions/view-screen.ts +1 -1
- package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/src/templates/headless/.env.example +4 -0
- package/src/templates/headless/.prettierrc +5 -0
- package/src/templates/headless/AGENTS.md +58 -0
- package/src/templates/headless/DEVELOPING.md +22 -0
- package/src/templates/headless/_gitignore +36 -0
- package/src/templates/headless/actions/hello.ts +14 -0
- package/src/templates/headless/actions/run.ts +3 -0
- package/src/templates/headless/package.json +22 -0
- package/src/templates/headless/tsconfig.json +7 -0
- package/src/templates/ui-primitives-sync.spec.ts +2 -2
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -5
- package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +93 -0
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +1 -1
- package/src/templates/workspace-core/AGENTS.md +20 -3
- package/src/templates/workspace-core/src/server/index.ts +1 -1
- package/src/templates/workspace-root/AGENTS.md +25 -5
- package/src/templates/workspace-root/README.md +7 -7
- 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
|
|
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
|
|
20
|
+
## Start from Chat {#start-from-chat}
|
|
21
21
|
|
|
22
|
-
Use the
|
|
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
|
|
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
|
|
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
|
-
|
|
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({
|
package/docs/content/faq.md
CHANGED
|
@@ -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
|
|
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.
|
|
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 [
|
|
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: "
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
28
|
-
cd my-
|
|
29
|
-
pnpm install
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
Open the URL
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
47
|
+
Run that action directly:
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
```bash
|
|
50
|
+
pnpm action hello --name Steve
|
|
51
|
+
```
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
Then run the same app-agent loop from the terminal:
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
```bash
|
|
56
|
+
pnpm agent "Call the hello action for Steve and explain what happened."
|
|
57
|
+
```
|
|
57
58
|
|
|
58
|
-
|
|
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
|
-
##
|
|
61
|
+
## Start headless instead {#headless}
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
Use headless mode when you want no browser app yet:
|
|
63
64
|
|
|
64
65
|
```bash
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
npx @agent-native/core@latest create my-agent --headless
|
|
67
|
+
cd my-agent
|
|
67
68
|
pnpm install
|
|
68
|
-
pnpm
|
|
69
|
+
pnpm action hello --name Steve
|
|
70
|
+
pnpm agent "Call the hello action for Steve and explain what happened."
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
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
|
-
|
|
75
|
+
### Agent credentials {#agent-credentials}
|
|
74
76
|
|
|
75
|
-
|
|
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
|
-
##
|
|
79
|
+
## What just happened? {#what-just-happened}
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
You now have a real app-agent loop:
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
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
|
|
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
|
|
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/`.
|
|
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
|
|
106
|
+
Once your agent is running, the usual next step is small and concrete:
|
|
118
107
|
|
|
119
|
-
- **Ask the built-in agent what it
|
|
120
|
-
- **
|
|
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:
|
|
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
|
|
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** —
|
|
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
|
-
|
|
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
|
|
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
|
|
194
|
-
| --------------------------- | ------------------- |
|
|
195
|
-
| Agent tool calling | Shipping | The in-app agent sees actions as function tools with zod-derived JSON Schema.
|
|
196
|
-
| UI actions | Shipping | React calls the same action through `useActionMutation()` / `useActionQuery()`.
|
|
197
|
-
| Native chat widgets | Shipping | Tool results with explicit widget discriminants can render native tables, charts, and typed app results in chat.
|
|
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.
|
|
199
|
-
| HTTP and CLI | Shipping | Actions auto-mount at `/_agent-native/actions/:name
|
|
200
|
-
| MCP server | Shipping | External MCP hosts get Streamable HTTP tools, the `ask-agent` meta-tool, and optional MCP Apps resources.
|
|
201
|
-
| MCP OAuth | Shipping | Standard remote MCP OAuth, PKCE, dynamic client registration, refresh tokens, and `mcp:read` / `mcp:write` / `mcp:apps` scopes.
|
|
202
|
-
| MCP Apps | Shipping | External hosts that support app resources can render iframe/native-host widgets, with deep-link fallback elsewhere.
|
|
203
|
-
| A2A | Shipping | Other agents discover the agent card and call the app over JSON-RPC tasks.
|
|
204
|
-
| Deep links | Shipping | Action results can round-trip users into the running UI through `/_agent-native/open` and `agentnative://open`.
|
|
205
|
-
| MCP clients | Shipping | The app can also consume local, remote, or hub-shared MCP servers as `mcp__...` tools.
|
|
206
|
-
| Instructions and skills | Shipping | `AGENTS.md`, skills, memory, slash commands, sub-agents, jobs, and automations live in the SQL-backed workspace.
|
|
207
|
-
| Agent Web | Shipping | Public pages can publish `robots.txt`, `sitemap.xml`, `llms.txt`, markdown mirrors, and structured metadata.
|
|
208
|
-
| Extensions | Shipping | Sandboxed mini-apps call app actions, persist extension data, and use proxied fetch helpers.
|
|
209
|
-
| ACP | Coding-agent/editor | Useful for coding agents inside editors/IDEs; not the general BYO app-chat runtime contract.
|
|
193
|
+
| Surface | Status | What agent-native provides | What you write |
|
|
194
|
+
| --------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
|
|
195
|
+
| Agent tool calling | Shipping | The in-app agent sees actions as function tools with zod-derived JSON Schema. | `defineAction()` |
|
|
196
|
+
| UI actions | Shipping | React calls the same action through `useActionMutation()` / `useActionQuery()`. | The same action |
|
|
197
|
+
| Native chat widgets | Shipping | Tool results with explicit widget discriminants can render native tables, charts, 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
|
-
|
|
44
|
+
createDataInsightsWidgetResult,
|
|
43
45
|
dataInsightsWidgetResultSchema,
|
|
44
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 --
|
|
70
|
+
npx @agent-native/core@latest create my-agent --headless
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
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,
|
|
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
|
|
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) —
|
|
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
|
package/docs/content/security.md
CHANGED
|
@@ -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",
|
package/docs/content/server.md
CHANGED