@agent-native/core 0.164.3 → 0.164.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +36 -47
- package/corpus/templates/calendar/app/components/calendar/DayView.tsx +3 -0
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +18 -1
- package/corpus/templates/calendar/app/components/calendar/InlineEventPickers.tsx +256 -38
- package/corpus/templates/calendar/app/hooks/use-google-auth.ts +43 -3
- package/corpus/templates/calendar/app/i18n-data.ts +120 -0
- package/corpus/templates/calendar/app/lib/event-form-utils.ts +113 -0
- package/corpus/templates/calendar/server/handlers/google-auth.ts +119 -3
- package/corpus/templates/calendar/server/routes/[base]/_agent-native/google/add-account/auth-url.post.ts +1 -0
- package/corpus/templates/calendar/server/routes/[base]/_agent-native/google/auth-url.post.ts +1 -0
- package/corpus/templates/calendar/server/routes/_agent-native/google/add-account/auth-url.post.ts +1 -0
- package/corpus/templates/calendar/server/routes/_agent-native/google/auth-url.post.ts +1 -0
- package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +1 -1
- package/corpus/templates/clips/app/components/player/video-player.tsx +12 -0
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +18 -4
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +114 -20
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +86 -78
- package/corpus/templates/clips/changelog/2026-08-19-clips-nightly-builds-are-available-for-trying-the-latest-upd.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-19-social-preview-video-frames.md +6 -0
- package/corpus/templates/clips/desktop/README.md +19 -4
- package/corpus/templates/clips/desktop/src/app.tsx +78 -16
- package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +3 -2
- package/corpus/templates/clips/desktop/src-tauri/tauri.conf.json +1 -0
- package/corpus/templates/clips/server/lib/slack-unfurls.ts +7 -13
- package/corpus/templates/clips/server/routes/[base]/_agent-native/google/auth-url.post.ts +1 -0
- package/corpus/templates/clips/server/routes/_agent-native/google/auth-url.get.ts +41 -3
- package/corpus/templates/clips/server/routes/_agent-native/google/auth-url.post.ts +1 -0
- package/corpus/templates/clips/server/routes/_agent-native/google/callback.get.ts +22 -1
- package/corpus/templates/clips/server/routes/api/clips-updater.json.get.ts +41 -22
- package/corpus/templates/clips/shared/share-meta.ts +67 -3
- package/corpus/templates/content/actions/list-content-databases.ts +95 -1
- package/corpus/templates/content/changelog/2026-08-11-content-mutations-delegated-from-verified-slack-dms-now-use-.md +6 -0
- package/corpus/templates/content/shared/api.ts +11 -0
- package/corpus/templates/factory/AGENTS.md +1 -1
- package/corpus/templates/factory/actions/list-factory-automations.ts +4 -0
- package/corpus/templates/factory/actions/start-builder-for-item.ts +19 -17
- package/corpus/templates/factory/app/components/factory/FactoryAuditView.tsx +100 -36
- package/corpus/templates/factory/app/i18n/en-US.ts +4 -0
- package/corpus/templates/factory/app/routes/factory.tsx +209 -46
- package/corpus/templates/factory/server/connectors/slack.ts +44 -2
- package/corpus/templates/factory/server/plugins/agent-chat.ts +9 -7
- package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +13 -0
- package/corpus/templates/factory/server/triage/slack-client.ts +5 -0
- package/corpus/templates/factory/server/triage/slack-poller.ts +72 -4
- package/corpus/templates/mail/actions/view-screen.ts +1 -1
- package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +100 -18
- package/corpus/templates/mail/server/handlers/google-auth.ts +125 -24
- package/corpus/templates/mail/server/lib/gmail-query.ts +5 -2
- package/corpus/templates/mail/server/routes/[base]/_agent-native/google/add-account/auth-url.post.ts +1 -0
- package/corpus/templates/mail/server/routes/[base]/_agent-native/google/auth-url.post.ts +1 -0
- package/corpus/templates/mail/server/routes/_agent-native/google/add-account/auth-url.post.ts +1 -0
- package/corpus/templates/mail/server/routes/_agent-native/google/auth-url.post.ts +1 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +0 -12
- package/corpus/templates/plan/changelog/2026-08-19-plan-prompts-now-guide-you-to-connect-ai-before-sending-and-.md +6 -0
- package/corpus/templates/slides/actions/approve-deck-access-request.ts +234 -0
- package/corpus/templates/slides/actions/get-deck-access-status.ts +35 -2
- package/corpus/templates/slides/actions/request-deck-access.ts +263 -64
- package/corpus/templates/slides/app/components/editor/MissingDeckAccessPane.tsx +196 -0
- package/corpus/templates/slides/app/components/editor/RequestDeckAccessDialog.tsx +101 -0
- package/corpus/templates/slides/app/hooks/use-deck-access.ts +7 -4
- package/corpus/templates/slides/app/i18n/en-US.ts +29 -6
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +147 -169
- package/corpus/templates/slides/app/routes/access-request.approve.tsx +250 -0
- package/corpus/templates/slides/server/db/schema.ts +8 -0
- package/corpus/templates/slides/server/lib/access-request-email.ts +36 -0
- package/corpus/templates/slides/server/lib/emails.ts +26 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +7 -0
- package/corpus/templates/slides/server/plugins/db.ts +50 -0
- package/corpus/templates/slides/shared/deck-access.ts +31 -0
- package/dist/a2a/artifact-response.d.ts +50 -0
- package/dist/a2a/artifact-response.js +266 -39
- package/dist/a2a/index.d.ts +2 -0
- package/dist/a2a/index.js +1 -0
- package/dist/a2a/task-store.d.ts +1 -0
- package/dist/a2a/task-store.js +1 -1
- package/dist/agent/observational-memory/store.d.ts +1 -0
- package/dist/agent/observational-memory/store.js +1 -1
- package/dist/agent/run-store.d.ts +1 -0
- package/dist/agent/run-store.js +1 -1
- package/dist/agent/tool-approval-store.d.ts +1 -0
- package/dist/agent/tool-approval-store.js +1 -1
- package/dist/application-state/store.d.ts +1 -0
- package/dist/application-state/store.js +1 -1
- package/dist/browser-sessions/store.d.ts +1 -0
- package/dist/browser-sessions/store.js +1 -1
- package/dist/checkpoints/store.d.ts +1 -0
- package/dist/checkpoints/store.js +1 -1
- package/dist/cli/code-agent-schedules.d.ts +11 -0
- package/dist/cli/code-agent-schedules.js +44 -5
- package/dist/client/AgentPanel.d.ts +5 -1
- package/dist/client/AgentPanel.js +2 -2
- package/dist/client/AssistantChat.d.ts +5 -1
- package/dist/client/AssistantChat.js +40 -6
- package/dist/client/EnvironmentBadge.d.ts +7 -13
- package/dist/client/EnvironmentBadge.js +43 -92
- package/dist/client/agent-chat/index.d.ts +1 -0
- package/dist/client/agent-chat/index.js +1 -0
- package/dist/client/agent-chat-adapter.js +76 -50
- package/dist/client/app-providers.js +4 -4
- package/dist/client/chat/message-components.d.ts +4 -0
- package/dist/client/chat/message-components.js +28 -1
- package/dist/client/chat/run-recovery.js +26 -0
- package/dist/client/chat-first/apps-rail.d.ts +1 -0
- package/dist/client/chat-first/apps-rail.js +28 -2
- package/dist/client/sse-event-processor.js +13 -8
- package/dist/client/use-active-agent-chat-run.d.ts +2 -0
- package/dist/client/use-active-agent-chat-run.js +22 -0
- package/dist/coding-tools/sandbox/executions-store.d.ts +1 -0
- package/dist/coding-tools/sandbox/executions-store.js +1 -1
- package/dist/collab/awareness-store.d.ts +1 -0
- package/dist/collab/awareness-store.js +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/storage.d.ts +1 -0
- package/dist/collab/storage.js +1 -1
- package/dist/db/client.js +3 -3
- package/dist/db/ddl-guard.js +8 -0
- package/dist/db/migration-runtime.d.ts +23 -0
- package/dist/db/migration-runtime.js +41 -0
- package/dist/db/migrations.d.ts +1 -2
- package/dist/db/migrations.js +2 -24
- package/dist/email-catalog/log.d.ts +1 -0
- package/dist/email-catalog/log.js +1 -1
- package/dist/guards/index.d.ts +1 -0
- package/dist/guards/index.js +1 -0
- package/dist/guards/release-schema-complete.d.ts +22 -0
- package/dist/guards/release-schema-complete.js +144 -0
- package/dist/integrations/a2a-continuations-store.d.ts +1 -0
- package/dist/integrations/a2a-continuations-store.js +1 -1
- package/dist/integrations/adapters/slack.js +58 -7
- package/dist/integrations/awaiting-input-store.d.ts +1 -0
- package/dist/integrations/awaiting-input-store.js +1 -1
- package/dist/integrations/config-store.d.ts +1 -0
- package/dist/integrations/config-store.js +1 -1
- package/dist/integrations/controls-store.d.ts +1 -0
- package/dist/integrations/controls-store.js +1 -1
- package/dist/integrations/identity-links-store.d.ts +1 -0
- package/dist/integrations/identity-links-store.js +1 -1
- package/dist/integrations/installations-store.d.ts +1 -0
- package/dist/integrations/installations-store.js +1 -1
- package/dist/integrations/remote-commands-store.d.ts +1 -0
- package/dist/integrations/remote-commands-store.js +1 -1
- package/dist/integrations/remote-devices-store.d.ts +1 -0
- package/dist/integrations/remote-devices-store.js +1 -1
- package/dist/integrations/remote-push-store.d.ts +1 -0
- package/dist/integrations/remote-push-store.js +1 -1
- package/dist/integrations/remote-run-events-store.d.ts +1 -0
- package/dist/integrations/remote-run-events-store.js +1 -1
- package/dist/integrations/scope-store.d.ts +1 -0
- package/dist/integrations/scope-store.js +1 -1
- package/dist/integrations/thread-mapping-store.d.ts +1 -0
- package/dist/integrations/thread-mapping-store.js +1 -1
- package/dist/integrations/usage-budget-store.d.ts +1 -0
- package/dist/integrations/usage-budget-store.js +1 -1
- package/dist/jobs/background-automation-runner.js +111 -9
- package/dist/jobs/run-history.d.ts +1 -0
- package/dist/jobs/run-history.js +1 -1
- package/dist/jobs/scheduler-health.d.ts +1 -0
- package/dist/jobs/scheduler-health.js +1 -1
- package/dist/mcp/approval-store.d.ts +1 -0
- package/dist/mcp/approval-store.js +1 -1
- package/dist/mcp/connect-store.d.ts +1 -0
- package/dist/mcp/connect-store.js +1 -1
- package/dist/mcp/oauth-store.d.ts +1 -0
- package/dist/mcp/oauth-store.js +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/notifications/store.d.ts +1 -0
- package/dist/notifications/store.js +1 -1
- package/dist/oauth-tokens/store.d.ts +1 -0
- package/dist/oauth-tokens/store.js +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/progress/store.d.ts +1 -0
- package/dist/progress/store.js +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +5 -5
- package/dist/provider-api/actions/provider-api.d.ts +4 -4
- package/dist/provider-api/corpus-jobs-store.d.ts +1 -0
- package/dist/provider-api/corpus-jobs-store.js +1 -1
- package/dist/provider-api/custom-registry.d.ts +1 -0
- package/dist/provider-api/custom-registry.js +1 -1
- package/dist/provider-api/quota-governor.d.ts +1 -0
- package/dist/provider-api/quota-governor.js +1 -1
- package/dist/provider-api/staged-datasets-store.d.ts +1 -0
- package/dist/provider-api/staged-datasets-store.js +1 -1
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/resources/store.d.ts +1 -0
- package/dist/resources/store.js +1 -1
- package/dist/scripts/dev/index.js +15 -1
- package/dist/search/index.js +3 -0
- package/dist/secrets/storage.d.ts +1 -0
- package/dist/secrets/storage.js +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +2 -1
- package/dist/server/agent-chat/action-filters-a2a.js +10 -2
- package/dist/server/agent-chat-plugin.js +71 -20
- package/dist/server/agent-teams-run-queue.d.ts +1 -0
- package/dist/server/agent-teams-run-queue.js +1 -1
- package/dist/server/auth-marketing.js +3 -1
- package/dist/server/auth.d.ts +18 -1
- package/dist/server/auth.js +370 -154
- package/dist/server/embed-session.d.ts +1 -0
- package/dist/server/embed-session.js +1 -1
- package/dist/server/google-auth-plugin.js +3 -1
- package/dist/server/google-oauth.d.ts +10 -0
- package/dist/server/google-oauth.js +25 -1
- package/dist/server/identity-sso-store.d.ts +1 -0
- package/dist/server/identity-sso-store.js +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/onboarding-html.js +200 -31
- package/dist/server/poll.d.ts +2 -0
- package/dist/server/poll.js +19 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/release-migrations.js +5 -0
- package/dist/server/release-schema.d.ts +46 -0
- package/dist/server/release-schema.js +307 -0
- package/dist/settings/store.d.ts +1 -0
- package/dist/settings/store.js +1 -1
- package/dist/shared/environment-lanes.d.ts +28 -0
- package/dist/shared/environment-lanes.js +61 -0
- package/dist/sharing/actions/share-resource.js +22 -2
- package/dist/styles/agent-native.css +17 -15
- package/dist/triggers/routes.d.ts +11 -0
- package/dist/triggers/routes.js +10 -0
- package/dist/usage/alerts-store.d.ts +1 -0
- package/dist/usage/alerts-store.js +1 -1
- package/dist/usage/store.d.ts +1 -0
- package/dist/usage/store.js +1 -1
- package/docs/content/drop-in-agent.mdx +4 -4
- package/docs/content/faq.mdx +15 -15
- package/docs/content/getting-started.mdx +173 -41
- package/docs/content/key-concepts.mdx +10 -10
- package/docs/content/using-your-agent.mdx +2 -2
- package/docs/content/what-is-agent-native.mdx +79 -228
- package/package.json +2 -2
package/docs/content/faq.mdx
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "FAQ"
|
|
3
|
-
description: "Common questions about
|
|
3
|
+
description: "Common questions about Agent-Native — what it is, who it's for, what you can build, and how it works."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# FAQ
|
|
7
7
|
|
|
8
|
-
Common questions about
|
|
8
|
+
Common questions about Agent-Native, organized from "I'm just looking" to "I'm wiring up auth right now."
|
|
9
9
|
|
|
10
10
|
## The basics {#general}
|
|
11
11
|
|
|
12
|
-
### What is
|
|
12
|
+
### What is Agent-Native? {#what-is-agent-native}
|
|
13
13
|
|
|
14
|
-
Agent-
|
|
14
|
+
Agent-Native is a framework for building apps where the AI agent and the product surface around it are equal partners. The usual path starts with chat, adds typed actions, renders structured results inline, and grows into durable pages around the same SQL state. 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
|
-
Agent-
|
|
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
21
|
- **Start with Chat** if you want the default from-scratch path: users can talk to the agent immediately, then you extend with actions, native results, and screens — start with [Getting Started](/docs/getting-started) or [Chat](/docs/template-chat).
|
|
22
22
|
- **Start automation-first** if you are building scheduled jobs, queues, scripts, integration workers, or external-agent workflows with no browser UI yet — start with [Automation-First Apps](/docs/pure-agent-apps).
|
|
23
23
|
- **Start from a template and customize it** if you want your own SaaS product with auth, database, UI, and agent actions already wired — see [Templates](/docs/cloneable-saas).
|
|
24
24
|
- **Build from scratch** if you want the framework primitives for a new agent-driven product — start with [Getting Started](/docs/getting-started).
|
|
25
|
-
- **Connect another agent or code tool** if you want Claude, ChatGPT, Codex, Cursor, or GitHub Copilot / VS Code to use an
|
|
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).
|
|
26
26
|
|
|
27
27
|
### How is this different from adding AI to an existing app? {#how-is-this-different}
|
|
28
28
|
|
|
29
|
-
Most apps bolt AI on as an afterthought that can't actually _do_ things in the app. In an
|
|
29
|
+
Most apps bolt AI on as an afterthought that can't actually _do_ things in the app. In an Agent-Native app the agent is a first-class citizen that shares the same actions, database, and state as the UI, so it can do anything the buttons can. See [Why build apps this way](/docs/what-is-agent-native#why-build-apps-this-way).
|
|
30
30
|
|
|
31
|
-
<Diagram id="doc-block-1s6b04" title="Bolted-on AI vs.
|
|
31
|
+
<Diagram id="doc-block-1s6b04" title="Bolted-on AI vs. Agent-Native" summary="A bolted-on chat sidebar lives in its own world. An Agent-Native agent shares the same actions, database, and state as the UI.">
|
|
32
32
|
|
|
33
33
|
```html
|
|
34
34
|
<div class="diagram-vs">
|
|
@@ -45,7 +45,7 @@ Most apps bolt AI on as an afterthought that can't actually _do_ things in the a
|
|
|
45
45
|
</div>
|
|
46
46
|
<div class="diagram-divider" aria-hidden="true"></div>
|
|
47
47
|
<div class="diagram-col">
|
|
48
|
-
<span class="diagram-pill ok">Agent-
|
|
48
|
+
<span class="diagram-pill ok">Agent-Native</span>
|
|
49
49
|
<div class="diagram-row2">
|
|
50
50
|
<div class="diagram-node">UI</div>
|
|
51
51
|
<div class="diagram-node">Agent</div>
|
|
@@ -114,9 +114,9 @@ Anthropic Claude, OpenAI (GPT-5 family), Google Gemini, and any provider that sp
|
|
|
114
114
|
|
|
115
115
|
No. You don't train models, fine-tune, or deal with embeddings. You build a regular web app — and on the hosted version, you barely build anything at all. The framework handles the agent integration: routing messages, running actions, syncing state.
|
|
116
116
|
|
|
117
|
-
### Can I migrate an existing app to
|
|
117
|
+
### Can I migrate an existing app to Agent-Native? {#can-i-use-existing-code}
|
|
118
118
|
|
|
119
|
-
You can, but
|
|
119
|
+
You can, but Agent-Native works best when built from the ground up. The architecture — shared database, polling sync, actions, application state — needs to be integrated throughout. Starting from an app and customizing it is the recommended path. Think of it like the shift from desktop-first to mobile-first: you _can_ retrofit, but building native is better.
|
|
120
120
|
|
|
121
121
|
## Templates and what you can build {#templates}
|
|
122
122
|
|
|
@@ -148,7 +148,7 @@ Yes. The same agent runs in your web UI, in Slack, in Telegram, over email, and
|
|
|
148
148
|
|
|
149
149
|
### Can agents talk to each other? {#can-agents-talk-to-each-other}
|
|
150
150
|
|
|
151
|
-
Yes, via the [A2A (Agent-to-Agent) protocol](/docs/a2a-protocol). Every
|
|
151
|
+
Yes, via the [A2A (Agent-to-Agent) protocol](/docs/a2a-protocol). Every Agent-Native app automatically gets an A2A endpoint. From the mail app, you can tag the analytics agent to query data. An agent discovers what other agents are available, calls them over the protocol, and shows results in the UI. No configuration needed — the agent card is auto-generated from your template's actions.
|
|
152
152
|
|
|
153
153
|
### What can the agent see in the app? {#what-can-the-agent-see}
|
|
154
154
|
|
|
@@ -156,7 +156,7 @@ The agent always knows what the user is currently viewing. The UI writes navigat
|
|
|
156
156
|
|
|
157
157
|
## Development questions {#development}
|
|
158
158
|
|
|
159
|
-
### Which AI coding tools work with
|
|
159
|
+
### Which AI coding tools work with Agent-Native? {#which-ai-tools-work}
|
|
160
160
|
|
|
161
161
|
Any AI coding tool that reads project instructions. The framework uses AGENTS.md as the universal standard:
|
|
162
162
|
|
|
@@ -227,7 +227,7 @@ SSE gives same-process writes an immediate path to the browser, and a lightweigh
|
|
|
227
227
|
|
|
228
228
|
AI is non-deterministic, so you need conversation flow to give feedback and iterate — not one-shot buttons — and the agent already has your codebase, instructions, skills, and history that an inline call lacks. Routing everything through the agent is also what lets the app be driven from Slack, Telegram, or another agent. See [Key Concepts — Agent chat bridge](/docs/key-concepts#agent-chat-bridge).
|
|
229
229
|
|
|
230
|
-
### How do I upgrade an older Agent
|
|
230
|
+
### How do I upgrade an older Agent-Native app? {#upgrade-older-app}
|
|
231
231
|
|
|
232
232
|
Run the supported upgrade path from the app or workspace root:
|
|
233
233
|
|
|
@@ -251,7 +251,7 @@ The shared database, live sync, actions system, and application state only work
|
|
|
251
251
|
## What's next
|
|
252
252
|
|
|
253
253
|
- [**Getting Started**](/docs/getting-started) — build your first action and render it inline in chat
|
|
254
|
-
- [**What
|
|
254
|
+
- [**What is Agent-Native?**](/docs/what-is-agent-native) — the full explanation behind the answers above
|
|
255
255
|
- [**Templates**](/docs/cloneable-saas) — start from a complete SaaS product instead of starting from scratch
|
|
256
256
|
- [**Key Concepts**](/docs/key-concepts) — the architecture: SQL, actions, polling sync, and portability
|
|
257
257
|
- [**Deployment**](/docs/deployment) — host on your own domain or any Nitro-compatible provider
|
|
@@ -1,69 +1,201 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Getting Started"
|
|
3
|
-
description: "Create
|
|
3
|
+
description: "Create an Agent-Native app and call the same action from the agent and the UI."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Getting Started
|
|
7
7
|
|
|
8
|
-
Agent-Native
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
Agent-Native is an open-source TypeScript framework for building apps that
|
|
9
|
+
serve both people and AI agents. You define your app's functionality once as
|
|
10
|
+
[actions](/docs/actions-overview)—typed functions that your React UI calls
|
|
11
|
+
from code and agents use as tools.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
In this guide, you'll create a Chat app and call its included `hello` action
|
|
14
|
+
from the agent and the UI.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
## Prerequisites
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
- [Node.js](https://nodejs.org) 22 or later
|
|
19
|
+
- [pnpm](https://pnpm.io)
|
|
20
|
+
- An LLM connection for the agent: Builder.io, an Anthropic or OpenAI API key,
|
|
21
|
+
or a local Ollama model
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
## Create an app
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
In a new directory, create a Chat app:
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
```bash
|
|
28
|
+
npx @agent-native/core@latest create my-app --standalone --template chat
|
|
29
|
+
cd my-app
|
|
30
|
+
pnpm install
|
|
31
|
+
```
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
The template includes a browser app, authentication, durable conversations,
|
|
34
|
+
live sync, application context, and an `actions/` directory. It also includes a
|
|
35
|
+
small `hello` action that you'll use throughout this guide.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
## Start the development server
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
Start the app:
|
|
36
40
|
|
|
37
41
|
```bash
|
|
38
|
-
npx @agent-native/core@latest create my-app --template chat
|
|
39
|
-
cd my-app
|
|
40
|
-
pnpm install
|
|
41
42
|
pnpm dev
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
The app opens at `http://localhost:8080`. If
|
|
45
|
-
|
|
45
|
+
The app opens at `http://localhost:8080`. If it doesn't open automatically,
|
|
46
|
+
visit that URL in your browser.
|
|
47
|
+
|
|
48
|
+
<Callout tone="info">
|
|
49
|
+
|
|
50
|
+
On the Welcome screen, select **Continue as local dev**. You don't need to
|
|
51
|
+
enter an email or password for local development.
|
|
52
|
+
|
|
53
|
+
</Callout>
|
|
54
|
+
|
|
55
|
+
Next, connect an LLM. Select **Connect Builder.io** to use free credits, or
|
|
56
|
+
select **Custom keys**, choose a provider, and enter the requested connection
|
|
57
|
+
details.
|
|
58
|
+
|
|
59
|
+
## Run the action from the agent
|
|
60
|
+
|
|
61
|
+
An action is a typed function that your React UI can call from code and agents
|
|
62
|
+
can use as a tool. The Chat template includes a simple `hello` action so you
|
|
63
|
+
can try the pattern before writing one yourself.
|
|
64
|
+
|
|
65
|
+
In the app, ask:
|
|
66
|
+
|
|
67
|
+
> Call the hello action for Alex.
|
|
68
|
+
|
|
69
|
+
The agent finds `hello` from its description and input schema, passes `Alex` as
|
|
70
|
+
the `name` input, and responds:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
Hello, Alex!
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Inspect the action
|
|
77
|
+
|
|
78
|
+
Open `actions/hello.ts`:
|
|
79
|
+
|
|
80
|
+
```ts filename="actions/hello.ts"
|
|
81
|
+
import { defineAction } from "@agent-native/core/action";
|
|
82
|
+
import { z } from "zod";
|
|
83
|
+
|
|
84
|
+
export default defineAction({
|
|
85
|
+
description: "Return a friendly greeting.",
|
|
86
|
+
schema: z.object({
|
|
87
|
+
name: z.string().default("world").describe("Name to greet"),
|
|
88
|
+
}),
|
|
89
|
+
http: { method: "GET" },
|
|
90
|
+
run: async ({ name }) => {
|
|
91
|
+
return { message: `Hello, ${name}!` };
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
For now, focus on four parts:
|
|
97
|
+
|
|
98
|
+
- `description` tells the agent when to use the action.
|
|
99
|
+
- `schema` validates the input and gives the agent a typed tool definition.
|
|
100
|
+
- `http` exposes this read-only action through `GET`, which lets
|
|
101
|
+
`useActionQuery` call it from React.
|
|
102
|
+
- `run` contains the application logic shared by the agent and the UI.
|
|
103
|
+
|
|
104
|
+
Read [Defining Actions](/docs/actions-defining) for the complete API.
|
|
105
|
+
|
|
106
|
+
## Call the action from React
|
|
107
|
+
|
|
108
|
+
Add a route at `app/routes/hello.tsx`:
|
|
109
|
+
|
|
110
|
+
```tsx filename="app/routes/hello.tsx"
|
|
111
|
+
import { useActionQuery } from "@agent-native/core/client/hooks";
|
|
112
|
+
import { useState } from "react";
|
|
113
|
+
|
|
114
|
+
import { Input } from "@/components/ui/input";
|
|
115
|
+
import { Label } from "@/components/ui/label";
|
|
116
|
+
|
|
117
|
+
export default function HelloRoute() {
|
|
118
|
+
const [name, setName] = useState("Alex");
|
|
119
|
+
const { data } = useActionQuery("hello", { name });
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<main className="mx-auto grid w-full max-w-xl gap-6 p-6">
|
|
123
|
+
<h1 className="text-2xl font-semibold">Hello action</h1>
|
|
124
|
+
<div className="grid gap-2">
|
|
125
|
+
<Label htmlFor="name">Name</Label>
|
|
126
|
+
<Input
|
|
127
|
+
id="name"
|
|
128
|
+
value={name}
|
|
129
|
+
onChange={(event) => setName(event.target.value)}
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
<p className="text-xl font-medium">{data?.message}</p>
|
|
133
|
+
</main>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
<Callout tone="warning">
|
|
139
|
+
|
|
140
|
+
Restart the development server so it discovers the new route, then open
|
|
141
|
+
`http://localhost:8080/hello`.
|
|
142
|
+
|
|
143
|
+
</Callout>
|
|
144
|
+
|
|
145
|
+
As you type a name, `useActionQuery` calls `hello` and renders the result. It
|
|
146
|
+
infers the action's input and result types, so the page doesn't need a custom
|
|
147
|
+
API route or a second implementation of the greeting.
|
|
148
|
+
|
|
149
|
+
## Change the action
|
|
150
|
+
|
|
151
|
+
In `actions/hello.ts`, change the return value:
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
return { message: `Welcome, ${name}.` };
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Refresh `/hello`, then ask the agent to call `hello` again. Both return the
|
|
158
|
+
updated greeting because they call the same action.
|
|
159
|
+
|
|
160
|
+
## Call actions in other ways
|
|
161
|
+
|
|
162
|
+
You called the same action from the agent and UI. The same action can also be
|
|
163
|
+
called from:
|
|
164
|
+
|
|
165
|
+
| Call from | Use it to |
|
|
166
|
+
| --------------------------------------- | ------------------------------------------------------------- |
|
|
167
|
+
| [HTTP API](/docs/http-api) | Call an action from a script, backend, or integration. |
|
|
168
|
+
| [CLI](/docs/actions-other-surfaces#cli) | Run or test an action from a terminal. |
|
|
169
|
+
| [MCP](/docs/actions-other-surfaces#mcp) | Let an external AI client discover and call actions as tools. |
|
|
170
|
+
| [A2A](/docs/actions-other-surfaces#a2a) | Let another Agent-Native app ask this app to do work. |
|
|
171
|
+
|
|
172
|
+
Every caller uses the same action definition. You do not need a separate
|
|
173
|
+
implementation for each one. This shared action model is central to
|
|
174
|
+
Agent-Native: behavior, validation, and permissions stay aligned across the
|
|
175
|
+
UI, agents, and integrations as the app changes.
|
|
176
|
+
|
|
177
|
+
## What you built
|
|
178
|
+
|
|
179
|
+
You created an Agent-Native app, called its `hello` action from the agent and a
|
|
180
|
+
React UI, then changed the greeting once and watched both update. Every action
|
|
181
|
+
you write from here follows that same pattern.
|
|
182
|
+
|
|
183
|
+
## Next steps
|
|
46
184
|
|
|
47
|
-
|
|
48
|
-
`actions/` directory, and the standard `view-screen` and `navigate` actions.
|
|
185
|
+
<Cards>
|
|
49
186
|
|
|
50
|
-
###
|
|
187
|
+
### [What is Agent-Native?](/docs/what-is-agent-native)
|
|
51
188
|
|
|
52
|
-
|
|
53
|
-
choose another option in the CLI. See [Creating Templates](/docs/creating-templates)
|
|
54
|
-
for the other paths.
|
|
189
|
+
Understand why the UI and agent share actions, data, and context.
|
|
55
190
|
|
|
56
|
-
|
|
191
|
+
### [Key Concepts](/docs/key-concepts)
|
|
57
192
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
to configure a model and provider.
|
|
193
|
+
Learn how actions, SQL data, application context, access, and live sync fit
|
|
194
|
+
together.
|
|
61
195
|
|
|
62
|
-
|
|
196
|
+
### [Actions](/docs/actions-overview)
|
|
63
197
|
|
|
64
|
-
|
|
198
|
+
Define actions for reads, writes, and approvals, then call them from the UI,
|
|
199
|
+
agents, and external clients.
|
|
65
200
|
|
|
66
|
-
|
|
67
|
-
- [Chat Template](/docs/template-chat): what the starter app includes.
|
|
68
|
-
- [Database](/docs/database): add app-owned tables when your app needs domain data.
|
|
69
|
-
- [FAQ](/docs/faq): answers about models, hosting, and templates.
|
|
201
|
+
</Cards>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Key Concepts"
|
|
3
|
-
description: "How
|
|
3
|
+
description: "How Agent-Native apps work across three layers: the Core framework, optional Toolkit building blocks, and optional Templates, plus the shared actions, SQL database, app-agent loop, and portability rules."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Key Concepts
|
|
7
7
|
|
|
8
|
-
How
|
|
8
|
+
How Agent-Native apps work under the hood: the principles and the architecture. This page is the contract: the fixed rules an app has to follow to count as Agent-Native. For the vision and the case for building this way, see [What is Agent-Native?](/docs/what-is-agent-native).
|
|
9
9
|
|
|
10
10
|
## The three layers {#three-layers}
|
|
11
11
|
|
|
12
|
-
Agent
|
|
12
|
+
Agent-Native is a framework with three layers:
|
|
13
13
|
|
|
14
14
|
| Layer | What it is |
|
|
15
15
|
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -21,7 +21,7 @@ Core is the foundation. Toolkit and Templates are optional: a template can use T
|
|
|
21
21
|
|
|
22
22
|
## The architecture {#the-architecture}
|
|
23
23
|
|
|
24
|
-
At runtime, every
|
|
24
|
+
At runtime, every Agent-Native app is three things working together:
|
|
25
25
|
|
|
26
26
|
- **Agent:** The autonomous AI. It reads data, writes data, runs actions, and uses whatever tools are configured. When its frame is intentionally granted workspace access and write tooling, it can also modify the app's own source. Customizable with skills and instructions.
|
|
27
27
|
- **Application:** The product surface around the agent. It may start as chat, add native inline results, grow into a small control plane, or become a full React UI with dashboards, flows, and visualizations.
|
|
@@ -94,7 +94,7 @@ That same agent-application-computer loop is what runs locally and in production
|
|
|
94
94
|
|
|
95
95
|
## Agent building blocks {#agent-building-blocks}
|
|
96
96
|
|
|
97
|
-
Every
|
|
97
|
+
Every Agent-Native app has the same agent building blocks, regardless of whether
|
|
98
98
|
the product surface is chat-first, automation-first, or a full UI. Each one lives
|
|
99
99
|
in its own file:
|
|
100
100
|
|
|
@@ -141,7 +141,7 @@ Five rules govern the architecture:
|
|
|
141
141
|
|
|
142
142
|
## The four-area checklist {#four-area-checklist}
|
|
143
143
|
|
|
144
|
-
Every user-facing feature should update all applicable areas. Skipping an applicable area breaks the
|
|
144
|
+
Every user-facing feature should update all applicable areas. Skipping an applicable area breaks the Agent-Native contract; forcing a screen onto an automation that no human needs to browse is also a smell.
|
|
145
145
|
|
|
146
146
|
- **1. UI:** Page, component, or dialog the user interacts with.
|
|
147
147
|
- **2. Action:** Agent-callable action in `actions/` for the same operation.
|
|
@@ -150,13 +150,13 @@ Every user-facing feature should update all applicable areas. Skipping an applic
|
|
|
150
150
|
|
|
151
151
|
A feature with only UI is invisible to the agent. A full UI feature with only actions is invisible to the user. A feature without app-state means the agent is blind to what the user is doing. An automation-first operation can legitimately start with action + instructions and add chat, UI, or app-state later when humans need to browse, approve, configure, or share it.
|
|
152
152
|
|
|
153
|
-
## What Agent
|
|
153
|
+
## What Agent-Native includes {#what-you-get-for-free}
|
|
154
154
|
|
|
155
155
|
Adopting the framework is valuable mostly because of what you stop having to build. The moment your app follows the five rules above, you inherit:
|
|
156
156
|
|
|
157
157
|
| Feature | What it gives you |
|
|
158
158
|
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
159
|
-
| One action = every surface | Every action defined with `defineAction()` is simultaneously an agent tool, a typesafe frontend hook (`useActionQuery` / `useActionMutation`), a framework-owned HTTP transport, a CLI command, an MCP tool for external clients, and an A2A tool for other
|
|
159
|
+
| One action = every surface | Every action defined with `defineAction()` is simultaneously an agent tool, a typesafe frontend hook (`useActionQuery` / `useActionMutation`), a framework-owned HTTP transport, a CLI command, an MCP tool for external clients, and an A2A tool for other Agent-Native apps. Optional `link` and `mcpApp` metadata add deep links and MCP Apps UI without a second implementation. |
|
|
160
160
|
| Full agent resources per user | Skills, shared `LEARNINGS.md`, personal `memory/MEMORY.md`, `AGENTS.md`, custom sub-agents, scheduled jobs, and connected MCP servers. All SQL-backed, no dev-box required. See [Agent Resources](/docs/agent-resources). |
|
|
161
161
|
| Drop-in React components | `<AgentPanel />` and `<AgentSidebar />` render chat + resources anywhere in your app. See [Drop-in Agent](/docs/drop-in-agent). |
|
|
162
162
|
| BYO agent chat runtimes | The same chat UI can sit on top of OpenAI Agents, OpenAI Responses, Claude Agent SDK, Vercel AI SDK, AG-UI, or your own normalized HTTP stream. See [Native Chat UI](/docs/native-chat-ui#byo-agent-runtimes). |
|
|
@@ -441,7 +441,7 @@ This works in all deployment environments, including serverless and edge, becaus
|
|
|
441
441
|
|
|
442
442
|
A _frame_ is the environment that hosts the agent next to your app. Locally that's the embedded panel; in the cloud it's Builder.io's managed surface. See [Frames](/docs/frames).
|
|
443
443
|
|
|
444
|
-
Agent-
|
|
444
|
+
Agent-Native apps include an embedded agent panel that provides the AI agent alongside the app UI. This is what makes the architecture work: the agent needs a computer (database, browser, code execution), and the app needs the agent for AI work.
|
|
445
445
|
|
|
446
446
|
- **Embedded Agent Panel:** Chat and optional CLI terminal built into every app. Supports Claude Code, Codex, Gemini, OpenCode, and Builder.io. Runs locally, free and open source.
|
|
447
447
|
- **Cloud:** Deploy to any cloud with real-time collaboration, visual editing, roles, and permissions. Best for teams.
|
|
@@ -503,7 +503,7 @@ These sit on top of the same contract and have their own deep dives:
|
|
|
503
503
|
|
|
504
504
|
<Cards>
|
|
505
505
|
|
|
506
|
-
### [What
|
|
506
|
+
### [What is Agent-Native?](/docs/what-is-agent-native)
|
|
507
507
|
|
|
508
508
|
The vision and philosophy behind these rules.
|
|
509
509
|
|
|
@@ -5,7 +5,7 @@ description: "The day-to-day loop of working with the agent: it sees what you're
|
|
|
5
5
|
|
|
6
6
|
# Using Your Agent
|
|
7
7
|
|
|
8
|
-
The defining idea behind
|
|
8
|
+
The defining idea behind Agent-Native is that the agent and the UI are **equal partners** — see [What is Agent-Native?](/docs/what-is-agent-native) for the reasoning. This section is about the other half of that promise: what it feels like to actually work with the agent once it's docked next to your app.
|
|
9
9
|
|
|
10
10
|
There's a simple through-line. The agent **sees** what you're looking at, you **direct** it toward what you want, you can **embed** it anywhere, you can go fully **UI-light** when that's the better fit, and you can **co-edit** the same documents at the same time. Each of those is a page in this section.
|
|
11
11
|
|
|
@@ -105,7 +105,7 @@ A few examples of what that looks like in practice:
|
|
|
105
105
|
|
|
106
106
|
## You embed it {#you-embed-it}
|
|
107
107
|
|
|
108
|
-
The agent isn't a separate app you tab over to. Wherever you see a chat panel in an
|
|
108
|
+
The agent isn't a separate app you tab over to. Wherever you see a chat panel in an Agent-Native app, it can be docked next to any screen — toggle it open, and it's right there next to whatever you're working on. App builders can also wire a button to hand a specific task straight to the agent instead of building a one-off "AI" feature for it. If you're building the app rather than using it, see [Drop-in Agent](/docs/drop-in-agent) for the components that make this work.
|
|
109
109
|
|
|
110
110
|
## You can go UI-light {#ui-light}
|
|
111
111
|
|