@agent-native/core 0.144.0 → 0.144.1
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/analytics/actions/migrate-first-party-analytics-to-bigquery.ts +1 -1
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +36 -14
- package/corpus/templates/clips/app/components/player/player-controls.tsx +0 -3
- package/corpus/templates/clips/app/components/player/scrubber.tsx +2 -33
- package/corpus/templates/clips/app/components/player/video-player.tsx +58 -11
- package/corpus/templates/clips/changelog/2026-08-06-trimmed-clips-play-on-a-clean-timeline-without-cut-markers.md +6 -0
- package/corpus/templates/dispatch/AGENTS.md +8 -1
- package/corpus/templates/dispatch/app/dispatch-extensions.tsx +1 -0
- package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +30 -15
- package/corpus/templates/dispatch/app/i18n-data.ts +131 -0
- package/corpus/templates/dispatch/app/routes/admin._index.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/admin.agents.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.approvals.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.apps.$appId.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.apps.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.audit.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.automations.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.destinations.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/admin.dreams.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.identities.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.integrations.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/admin.messaging.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.metrics.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.new-app.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.operations.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.thread-debug.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/admin.transactional-email.$appId.$id.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/admin.transactional-email.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/admin.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.vault.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/admin.workspace.tsx +1 -0
- package/corpus/templates/dispatch/changelog/2026-08-06-dispatch-keeps-everyday-navigation-focused-while-management-.md +6 -0
- package/corpus/templates/slides/AGENTS.md +10 -12
- package/corpus/templates/slides/actions/export-pptx.ts +68 -0
- package/corpus/templates/slides/actions/get-deck.ts +12 -0
- package/corpus/templates/slides/actions/import-file.ts +130 -55
- package/corpus/templates/slides/actions/import-pptx.ts +108 -8
- package/corpus/templates/slides/actions/patch-deck.ts +51 -0
- package/corpus/templates/slides/actions/update-slide.ts +29 -3
- package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +11 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +72 -11
- package/corpus/templates/slides/app/lib/import-uploaded-deck.ts +89 -0
- package/corpus/templates/slides/app/pages/Index.tsx +85 -18
- package/corpus/templates/slides/changelog/2026-08-06-uploaded-decks-keep-their-slides-and-visuals-when-you-improv.md +6 -0
- package/corpus/templates/slides/server/handlers/import/html-converter.ts +13 -2
- package/corpus/templates/slides/server/lib/chat-attachments.ts +2 -2
- package/corpus/templates/slides/server/lib/source-import.ts +167 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +8 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/jobs/scheduler.js +79 -23
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/realtime-token.d.ts +1 -1
- package/docs/content/creating-templates.mdx +1 -1
- package/docs/content/getting-started-actions.mdx +38 -189
- package/docs/content/getting-started-database.mdx +80 -164
- package/docs/content/getting-started-pages.mdx +44 -155
- package/docs/content/getting-started.mdx +26 -106
- package/package.json +1 -1
|
@@ -1,66 +1,57 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Add a Page"
|
|
3
|
-
description: "Build a React route that displays your saved data and
|
|
3
|
+
description: "Build a React route that displays your saved data and lets the agent open it."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Add a Page
|
|
7
7
|
|
|
8
|
-
This is part four of the Getting Started series. In [Persist Data in SQL](/docs/getting-started-database)
|
|
8
|
+
This is part four of the Getting Started series. In [Persist Data in SQL](/docs/getting-started-database)
|
|
9
|
+
you saved analysis results. Here you'll build a route that reads those same rows
|
|
10
|
+
through `list-text-analyses`.
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## Create the route {#add-a-page}
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
adds a React route that displays everything saved in `text_analyses`, using the
|
|
15
|
-
same `list-text-analyses` and `delete-text-analysis` actions you already wrote.
|
|
16
|
-
There's no second data layer. The page is just a view over the same SQL state
|
|
17
|
-
the agent reads and writes.
|
|
18
|
-
|
|
19
|
-
Create the route file at `app/routes/text-analyses.tsx`. Route files in
|
|
20
|
-
`app/routes/` are automatically picked up by the framework. The filename
|
|
21
|
-
becomes the URL path, so this page will be available at
|
|
14
|
+
Route files in `app/routes/` are picked up automatically. Create
|
|
15
|
+
`app/routes/text-analyses.tsx`; it will be available at
|
|
22
16
|
`http://localhost:8080/text-analyses`.
|
|
23
17
|
|
|
24
18
|
```tsx filename="app/routes/text-analyses.tsx"
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
import { useActionQuery } from "@agent-native/core/client/hooks";
|
|
20
|
+
|
|
21
|
+
type TextAnalysis = {
|
|
22
|
+
id: string;
|
|
23
|
+
input: string;
|
|
24
|
+
charCount: number;
|
|
25
|
+
wordCount: number;
|
|
26
|
+
sentenceCount: number;
|
|
27
|
+
paragraphCount: number;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
};
|
|
29
30
|
|
|
30
31
|
export default function TextAnalysesRoute() {
|
|
31
|
-
const analyses = useActionQuery(
|
|
32
|
-
|
|
32
|
+
const { data: analyses = [] } = useActionQuery<TextAnalysis[]>(
|
|
33
|
+
"list-text-analyses",
|
|
34
|
+
{},
|
|
35
|
+
);
|
|
33
36
|
|
|
34
37
|
return (
|
|
35
38
|
<main className="mx-auto flex max-w-3xl flex-col gap-6 p-6">
|
|
36
39
|
<header>
|
|
37
40
|
<h1 className="text-2xl font-semibold">Text analyses</h1>
|
|
38
|
-
<p className="text-muted-foreground">
|
|
39
|
-
Results saved by the agent or triggered manually.
|
|
40
|
-
</p>
|
|
41
|
+
<p className="text-muted-foreground">Results saved by the agent.</p>
|
|
41
42
|
</header>
|
|
42
43
|
<section className="flex flex-col gap-3">
|
|
43
|
-
{analyses.
|
|
44
|
+
{analyses.length === 0 && (
|
|
44
45
|
<p className="text-muted-foreground">No analyses saved yet.</p>
|
|
45
46
|
)}
|
|
46
|
-
{analyses.
|
|
47
|
-
<article
|
|
48
|
-
|
|
49
|
-
className="
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{row.word_count} words · {row.char_count} characters ·{" "}
|
|
55
|
-
{row.sentence_count} sentences
|
|
56
|
-
</p>
|
|
57
|
-
</div>
|
|
58
|
-
<button
|
|
59
|
-
className="text-xs text-destructive hover:underline"
|
|
60
|
-
onClick={() => deleteAnalysis.mutate({ id: row.id })}
|
|
61
|
-
>
|
|
62
|
-
Delete
|
|
63
|
-
</button>
|
|
47
|
+
{analyses.map((analysis) => (
|
|
48
|
+
<article key={analysis.id} className="rounded-lg border p-4">
|
|
49
|
+
<p className="text-sm font-medium">{analysis.input}</p>
|
|
50
|
+
<p className="text-xs text-muted-foreground">
|
|
51
|
+
{analysis.wordCount} words, {analysis.charCount} characters,{" "}
|
|
52
|
+
{analysis.sentenceCount} sentences, {analysis.paragraphCount}{" "}
|
|
53
|
+
paragraphs
|
|
54
|
+
</p>
|
|
64
55
|
</article>
|
|
65
56
|
))}
|
|
66
57
|
</section>
|
|
@@ -69,122 +60,20 @@ export default function TextAnalysesRoute() {
|
|
|
69
60
|
}
|
|
70
61
|
```
|
|
71
62
|
|
|
72
|
-
`useActionQuery` calls
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
then invalidates the query so the list refreshes.
|
|
76
|
-
|
|
77
|
-
Open `http://localhost:8080/text-analyses` in your browser. If you saved an
|
|
78
|
-
analysis in the previous step you'll see it listed. Then ask the agent in chat:
|
|
79
|
-
|
|
80
|
-
> Open the text analyses page.
|
|
81
|
-
|
|
82
|
-
If you get a 404, try restarting your dev server.
|
|
83
|
-
|
|
84
|
-
The agent calls the `navigate` action (already included in the Chat
|
|
85
|
-
template) to send the browser to `/text-analyses`. This is what it looks like
|
|
86
|
-
with a few saved rows:
|
|
87
|
-
|
|
88
|
-
<WireframeBlock id="doc-block-response-insights-page-wireframe">
|
|
89
|
-
<Screen
|
|
90
|
-
surface="desktop"
|
|
91
|
-
html={
|
|
92
|
-
"<main style='min-height:400px;box-sizing:border-box;padding:28px;background:var(--wf-bg)'><div style='max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:20px'><header><h2 style='margin:0 0 4px;font-size:24px;font-weight:600'>Text analyses</h2><p class='wf-muted' style='margin:0;font-size:14px'>Results saved by the agent or triggered manually.</p></header><section style='display:flex;flex-direction:column;gap:10px'><article class='wf-card' data-rough style='display:flex;align-items:center;justify-content:space-between;padding:14px 16px'><div><p style='margin:0 0 4px;font-size:14px;font-weight:500'>Hello world</p><p class='wf-muted' style='margin:0;font-size:12px'>2 words · 11 characters · 1 sentence</p></div><span class='wf-muted' style='font-size:12px'>Delete</span></article><article class='wf-card' data-rough style='display:flex;align-items:center;justify-content:space-between;padding:14px 16px'><div><p style='margin:0 0 4px;font-size:14px;font-weight:500'>The quick brown fox jumps over the lazy dog.</p><p class='wf-muted' style='margin:0;font-size:12px'>9 words · 44 characters · 1 sentence</p></div><span class='wf-muted' style='font-size:12px'>Delete</span></article><article class='wf-card' data-rough style='display:flex;align-items:center;justify-content:space-between;padding:14px 16px'><div><p style='margin:0 0 4px;font-size:14px;font-weight:500'>Pack my box with five dozen liquor jugs.</p><p class='wf-muted' style='margin:0;font-size:12px'>8 words · 40 characters · 1 sentence</p></div><span class='wf-muted' style='font-size:12px'>Delete</span></article></section></div></main>"
|
|
93
|
-
}
|
|
94
|
-
/>
|
|
95
|
-
</WireframeBlock>
|
|
96
|
-
|
|
97
|
-
## Extend the navigation {#extend-navigation}
|
|
98
|
-
|
|
99
|
-
The sidebar's links are a plain array in `app/components/layout/Sidebar.tsx`,
|
|
100
|
-
not a separate config file. Open it and add an entry for the Text analyses
|
|
101
|
-
page next to the existing Chat entry:
|
|
102
|
-
|
|
103
|
-
```tsx filename="app/components/layout/Sidebar.tsx"
|
|
104
|
-
import { IconList, IconMessageCircle } from "@tabler/icons-react";
|
|
105
|
-
|
|
106
|
-
const navItems = [
|
|
107
|
-
{
|
|
108
|
-
icon: IconMessageCircle,
|
|
109
|
-
labelKey: "navigation.chat",
|
|
110
|
-
href: "/",
|
|
111
|
-
view: "chat",
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
icon: IconList,
|
|
115
|
-
labelKey: "navigation.textAnalyses",
|
|
116
|
-
href: "/text-analyses",
|
|
117
|
-
view: "text-analyses",
|
|
118
|
-
},
|
|
119
|
-
];
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
`icon` takes an imported Tabler icon component, not a string name. `labelKey`
|
|
123
|
-
looks up a string in the i18n catalog (`app/i18n/en-US.ts` and the other
|
|
124
|
-
locale files); an unregistered key still renders — it falls back to a
|
|
125
|
-
humanized version of the key (`navigation.textAnalyses` becomes "Text
|
|
126
|
-
analyses") — but add it to the catalogs if you want the label translated. See
|
|
127
|
-
[Internationalization](/docs/internationalization).
|
|
128
|
-
|
|
129
|
-
Save the file. The dev server picks up the change automatically and the sidebar
|
|
130
|
-
updates without a restart.
|
|
131
|
-
|
|
132
|
-
### Agent navigation
|
|
133
|
-
|
|
134
|
-
The sidebar link lets users navigate manually. The agent can also open pages on
|
|
135
|
-
its own using two built-in actions that ship with the Chat template:
|
|
136
|
-
|
|
137
|
-
- **`view-screen`** reads the current route and returns a compact summary of
|
|
138
|
-
what the user is looking at.
|
|
139
|
-
- **`navigate`** writes a same-origin path to the browser's history.
|
|
140
|
-
|
|
141
|
-
As you add more pages, keep `navigate` updated so the agent knows what
|
|
142
|
-
destinations exist. Document available paths in `AGENTS.md` so the model can
|
|
143
|
-
reason about them.
|
|
144
|
-
|
|
145
|
-
When the app has both a full-page chat route and an app page, use the shared chat
|
|
146
|
-
handoff helpers described in [Agent Surfaces](/docs/agent-surfaces#rich-chat):
|
|
147
|
-
`AgentChatSurface`, `AgentSidebar`, `useAgentChatHomeHandoff`,
|
|
148
|
-
`useAgentChatHomeHandoffLinks`, and `chatViewTransition`. That lets the full
|
|
149
|
-
chat slide into the side panel as the page opens, keeping the same thread while
|
|
150
|
-
the user inspects durable data.
|
|
151
|
-
|
|
152
|
-
## Project structure {#project-structure}
|
|
153
|
-
|
|
154
|
-
```text
|
|
155
|
-
my-app/
|
|
156
|
-
actions/ # Agent-callable and UI-callable operations
|
|
157
|
-
app/ # React routes, pages, and chat surfaces
|
|
158
|
-
server/ # Nitro server and SQL schema
|
|
159
|
-
AGENTS.md # Always-on instructions for the app agent
|
|
160
|
-
.agents/ # Skills the agent loads when relevant
|
|
161
|
-
data/app.db # Local SQLite state when DATABASE_URL is unset
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## What's next {#next}
|
|
165
|
-
|
|
166
|
-
You've built a complete agentic app: a working chat interface, an action, inline
|
|
167
|
-
rendering, a database, and a page the agent can navigate to. From here:
|
|
168
|
-
|
|
169
|
-
<Cards>
|
|
170
|
-
|
|
171
|
-
### [Key Concepts](/docs/key-concepts)
|
|
172
|
-
|
|
173
|
-
The architecture underneath this tutorial: SQL, actions, live sync, and context
|
|
174
|
-
awareness.
|
|
175
|
-
|
|
176
|
-
### [Agent Surfaces](/docs/agent-surfaces)
|
|
177
|
-
|
|
178
|
-
Chat, inline UI, app pages, embedded sidecars, automation, and external agents —
|
|
179
|
-
all the ways your app can surface the agent.
|
|
63
|
+
`useActionQuery` calls the same action the agent uses. It also refreshes when a
|
|
64
|
+
mutating action completes, so a newly saved analysis appears without a custom
|
|
65
|
+
API route or a second data layer.
|
|
180
66
|
|
|
181
|
-
|
|
67
|
+
Open `http://localhost:8080/text-analyses`, or ask the agent:
|
|
182
68
|
|
|
183
|
-
|
|
184
|
-
knows what the user is looking at.
|
|
69
|
+
> Navigate to `/text-analyses`.
|
|
185
70
|
|
|
186
|
-
|
|
71
|
+
The route is enough for this tutorial. Add a sidebar entry later if this becomes
|
|
72
|
+
a primary workflow. For the full `view-screen`, `navigate`, and application-state
|
|
73
|
+
patterns, see [Context Awareness](/docs/context-awareness).
|
|
187
74
|
|
|
188
|
-
|
|
75
|
+
## Continue
|
|
189
76
|
|
|
190
|
-
|
|
77
|
+
You've built a chat app with an action, SQL-backed data, and a page that reads
|
|
78
|
+
the same source of truth. Continue with [Key Concepts](/docs/key-concepts) or
|
|
79
|
+
[Agent Surfaces](/docs/agent-surfaces) to explore the architecture behind it.
|
|
@@ -1,45 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Getting Started"
|
|
3
|
-
description: "Create a Chat app and
|
|
3
|
+
description: "Create a Chat app and configure an agent, then extend it with an action, SQL data, and a page."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Getting Started
|
|
7
7
|
|
|
8
|
-
Agent-Native
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
your workflow earns. New to the concept rather than the code? Read
|
|
12
|
-
[What Is Agent-Native?](/docs/what-is-agent-native) first — this page is the
|
|
13
|
-
hands-on build path.
|
|
14
|
-
|
|
15
|
-
The quickest way in is the **Chat template**: a minimal app that gives you a
|
|
16
|
-
working AI chat interface, durable threads, auth, and an `actions/` directory
|
|
17
|
-
ready to extend. This guide is split into four short pages so you can stop at
|
|
18
|
-
any point with a working app.
|
|
8
|
+
Agent-Native apps give the agent and the UI the same [actions](/docs/actions),
|
|
9
|
+
SQL data, and application state. This is the hands-on path: start with chat,
|
|
10
|
+
then add the surfaces your workflow needs.
|
|
19
11
|
|
|
20
12
|
<Steps>
|
|
21
13
|
|
|
22
|
-
### Create a chat app and
|
|
14
|
+
### Create a chat app and configure an agent
|
|
23
15
|
|
|
24
16
|
Scaffold the Chat template, install dependencies, start the dev server, and
|
|
25
|
-
|
|
17
|
+
configure an agent. You'll have a working chat app to extend.
|
|
26
18
|
**You are here.**
|
|
27
19
|
|
|
28
20
|
### Add an action
|
|
29
21
|
|
|
30
|
-
Define
|
|
31
|
-
renderer so the result appears as a bar chart directly inside the chat
|
|
32
|
-
transcript.
|
|
22
|
+
Define a typed text analyzer and render its result as a chart in the chat.
|
|
33
23
|
|
|
34
24
|
### Persist data in SQL
|
|
35
25
|
|
|
36
|
-
|
|
37
|
-
agent can save and recall results across conversations.
|
|
26
|
+
Add a table, a save action, and a list action so results survive conversations.
|
|
38
27
|
|
|
39
28
|
### Add a page
|
|
40
29
|
|
|
41
|
-
Build a React route that lists saved analyses
|
|
42
|
-
and the agent can navigate to it.
|
|
30
|
+
Build a React route that lists saved analyses.
|
|
43
31
|
|
|
44
32
|
</Steps>
|
|
45
33
|
|
|
@@ -56,96 +44,28 @@ pnpm install
|
|
|
56
44
|
pnpm dev
|
|
57
45
|
```
|
|
58
46
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
extend.
|
|
62
|
-
|
|
63
|
-
The dev server starts and opens `http://localhost:8080` in your browser. You may
|
|
64
|
-
notice a few startup log lines like `NitroViteError: Vite environment "nitro" is
|
|
65
|
-
unavailable`. These are a normal race condition during the initial boot and
|
|
66
|
-
resolve on their own. The app is ready once **VITE ready** displays in the
|
|
67
|
-
terminal output.
|
|
68
|
-
|
|
69
|
-
When the app starts, you might find yourself on the login screen rather than in the app. In this case, just sign up with a made-up login to satisfy the login screen. For local development, no email verification is actually required.
|
|
70
|
-
|
|
71
|
-
<Callout tone="info">
|
|
72
|
-
|
|
73
|
-
**Want to attach a real debugger?** Run `agent-native dev --inspect` (or
|
|
74
|
-
`--inspect-brk[=<port>]`) instead of `pnpm dev` to attach the Node inspector
|
|
75
|
-
to the dev server, on port `9229` by default. Override the dev runner with
|
|
76
|
-
the `NITRO_DEV_RUNNER` env var if your setup needs a different one.
|
|
77
|
-
|
|
78
|
-
</Callout>
|
|
79
|
-
|
|
80
|
-
### If you want a different type of app
|
|
81
|
-
|
|
82
|
-
This guide uses the Chat template because it is the shortest path
|
|
83
|
-
to an agentic application: the agent can act on day one, and you have a real app
|
|
84
|
-
surface to grow from. However, if you want to create a different kind of app, run `create` with no flags:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
npx @agent-native/core@latest create my-app
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
The CLI first asks **How do you want to start?** with three choices: **Chat**
|
|
91
|
-
(what this guide uses), **Full template(s)**, or **Headless**. Only picking
|
|
92
|
-
**Full template(s)** takes you to the domain-template multi-select (Mail,
|
|
93
|
-
Calendar, Forms, Analytics, Plan, and more) — Chat and Headless each scaffold a
|
|
94
|
-
single standalone app directly, with no further picker.
|
|
95
|
-
|
|
96
|
-
## 2. Connect an AI engine {#connect-ai}
|
|
97
|
-
|
|
98
|
-
The agent chat can't respond until you connect an AI engine. After you're logged in, click the **Connect AI** button and pick one of two paths:
|
|
99
|
-
|
|
100
|
-
| Path | Steps |
|
|
101
|
-
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
102
|
-
| **Connect Builder** | Click **Connect Builder.io** (free tier available), choose the Builder Space, then click **Authorize**. No keys to manage yourself. |
|
|
103
|
-
| **Bring your own key** | Enter your Anthropic or OpenAI API key in the Setup panel. Get an Anthropic key at [console.anthropic.com](https://console.anthropic.com). |
|
|
104
|
-
|
|
105
|
-
Alternatively, create a `.env` file in the `my-app/` directory (the same
|
|
106
|
-
directory that contains `package.json`) before running `pnpm dev`:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
echo "ANTHROPIC_API_KEY=sk-ant-..." >> .env
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Restart the dev server. Once an AI engine is connected, the Setup panel
|
|
113
|
-
hides itself and the agent is ready to chat.
|
|
114
|
-
|
|
115
|
-
<Callout tone="warning">
|
|
116
|
-
|
|
117
|
-
**Blank screen?** Create a `.env` file in your `my-app/` directory with
|
|
118
|
-
`ANTHROPIC_API_KEY=sk-ant-...`, then restart `pnpm dev`. The in-app Setup
|
|
119
|
-
panel only appears once the app has loaded, so a missing key that prevents
|
|
120
|
-
the app from rendering needs to be fixed via the environment variable rather than
|
|
121
|
-
the UI.
|
|
122
|
-
|
|
123
|
-
</Callout>
|
|
124
|
-
|
|
125
|
-
## What's next {#next}
|
|
126
|
-
|
|
127
|
-
Your app is running and the agent can respond. Continue the series to build it out:
|
|
128
|
-
|
|
129
|
-
<Cards>
|
|
130
|
-
|
|
131
|
-
### [Add an Action](/docs/getting-started-actions)
|
|
47
|
+
The app opens at `http://localhost:8080`. If you see the login screen, sign up
|
|
48
|
+
with a made-up login. Local development does not require email verification.
|
|
132
49
|
|
|
133
|
-
|
|
134
|
-
the
|
|
50
|
+
The Chat template includes durable chat threads, auth, live sync, an
|
|
51
|
+
`actions/` directory, and the standard `view-screen` and `navigate` actions.
|
|
135
52
|
|
|
136
|
-
###
|
|
53
|
+
### Choose a different starting point
|
|
137
54
|
|
|
138
|
-
|
|
139
|
-
|
|
55
|
+
If Chat is not the right starting point, run `create` without `--template` and
|
|
56
|
+
choose another option in the CLI. See [Creating Templates](/docs/creating-templates)
|
|
57
|
+
for the other paths.
|
|
140
58
|
|
|
141
|
-
|
|
59
|
+
## 2. Configure an agent {#connect-ai}
|
|
142
60
|
|
|
143
|
-
|
|
61
|
+
The Chat template opens directly to the chat surface. If the agent is not ready
|
|
62
|
+
to respond, open **Settings > Manage agent** or use **Cmd/Ctrl+K > Manage agent**
|
|
63
|
+
to configure a model and provider.
|
|
144
64
|
|
|
145
|
-
|
|
65
|
+
Once the agent responds, continue with [Add an Action](/docs/getting-started-actions).
|
|
146
66
|
|
|
147
|
-
|
|
67
|
+
## Related docs
|
|
148
68
|
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
69
|
+
- [What Is Agent-Native?](/docs/what-is-agent-native): the architecture behind this path.
|
|
70
|
+
- [Chat Template](/docs/template-chat): what the starter app includes.
|
|
71
|
+
- [FAQ](/docs/faq): answers about models, hosting, and templates.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.144.
|
|
3
|
+
"version": "0.144.1",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|