@agent-native/core 0.210.0-nightly-20261019153056 → 0.210.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/LICENSE +21 -0
- package/dist/agent/action-error-details.d.ts +26 -0
- package/dist/agent/action-error-details.js +99 -0
- package/dist/agent/execution-fence.d.ts +9 -2
- package/dist/agent/execution-fence.js +42 -12
- package/dist/agent/production-agent.js +9 -0
- package/dist/agent/run-manager.js +14 -14
- package/dist/agent/run-store.js +8 -6
- package/dist/agent/tool-error-redaction.d.ts +8 -1
- package/dist/agent/tool-error-redaction.js +70 -7
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/mcp/actions/create-org-service-token.js +6 -3
- package/dist/mcp/actions/set-service-principal-lifecycle.js +1 -0
- package/dist/mcp/actions/set-service-principal-policy.js +1 -0
- package/dist/mcp/direct-action-call.js +39 -10
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/onboarding/workspace-services.js +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-default-model-route.d.ts +1 -1
- package/dist/server/agent-engine-ollama-models-route.d.ts +2 -2
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +2 -2
- package/dist/templates/chat/netlify.toml +0 -1
- package/dist/templates/default/.agents/skills/actions/SKILL.md +2 -2
- package/dist/templates/factory/.agents/skills/review-prs/SKILL.md +44 -21
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +2 -2
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +2 -2
- package/docs/content/actions-defining.mdx +2 -2
- package/docs/content/template-chat-agent.mdx +88 -0
- package/docs/content/template-chat-developers.mdx +586 -104
- package/docs/content/template-chat-features.mdx +158 -0
- package/docs/content/template-chat-integrations.mdx +66 -0
- package/docs/content/template-chat.mdx +36 -166
- package/docs/content/template-clips-developers.mdx +1 -1
- package/docs/content/template-clips-integrations.mdx +50 -5
- package/package.json +4 -4
- package/src/templates/chat/.agents/skills/actions/SKILL.md +2 -2
- package/src/templates/chat/netlify.toml +0 -1
- package/src/templates/default/.agents/skills/actions/SKILL.md +2 -2
- package/src/templates/factory/.agents/skills/review-prs/SKILL.md +44 -21
- package/src/templates/headless/.agents/skills/actions/SKILL.md +2 -2
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +2 -2
- package/docs/content/template-chat-first-edits.mdx +0 -158
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Chat: Features"
|
|
3
|
+
description: "Every feature that ships with Chat, including conversations, connecting a model, the example action, agent settings, teams, and the admin pages, with setup steps for each."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Features
|
|
7
|
+
|
|
8
|
+
Every feature that ships with Chat: how it works, and how to set it up. See
|
|
9
|
+
[Chat](/docs/template-chat) for the overview and
|
|
10
|
+
[Talk to the Agent](/docs/template-chat-agent) for prompts to try.
|
|
11
|
+
|
|
12
|
+
## Conversations
|
|
13
|
+
|
|
14
|
+
After you sign in, Chat opens on the **Get started** page, which has a message box and a few links. Send a message there and the conversation opens full page. **New Chat** starts a fresh conversation under the heading "How can I help?" The box stays centered until you send your first message, then moves to the bottom as the conversation grows.
|
|
15
|
+
|
|
16
|
+
The sidebar lists your conversations in two groups. **Pinned** chats stay at
|
|
17
|
+
the top, and **Recents** shows everything else, newest first. A chat that's
|
|
18
|
+
still working shows a spinner next to its title, so you can start another
|
|
19
|
+
conversation without losing track of the first.
|
|
20
|
+
|
|
21
|
+
- **Start a new chat** with **New Chat** at the top of the sidebar.
|
|
22
|
+
- **Reopen** any chat by selecting it in the list.
|
|
23
|
+
- **Rename, pin, or archive** a chat from the options menu on its row.
|
|
24
|
+
Archiving removes it from the list.
|
|
25
|
+
- **Collapse the sidebar** when you want more room for the conversation.
|
|
26
|
+
|
|
27
|
+
<Steps>
|
|
28
|
+
|
|
29
|
+
### Rename a chat
|
|
30
|
+
|
|
31
|
+
Open the options menu on the chat's row and choose **Rename Chat**. Type the
|
|
32
|
+
new title and press Enter. Titles can be up to 160 characters.
|
|
33
|
+
|
|
34
|
+
### Pin a chat you come back to
|
|
35
|
+
|
|
36
|
+
Choose **Pin Chat** from the same menu. The chat moves to **Pinned** until
|
|
37
|
+
you choose **Unpin Chat**.
|
|
38
|
+
|
|
39
|
+
### Archive a chat you're done with
|
|
40
|
+
|
|
41
|
+
Choose **Archive Chat**. If the archive fails, a message appears and the chat
|
|
42
|
+
stays where it is.
|
|
43
|
+
|
|
44
|
+
</Steps>
|
|
45
|
+
|
|
46
|
+
## Connect a model
|
|
47
|
+
|
|
48
|
+
The agent needs a model to answer. Until one is connected, the message box
|
|
49
|
+
reads "Connect AI to start chatting..." Choose **Use Builder.io** for free
|
|
50
|
+
credits, or **Add your own keys** to use a provider key of your own. Then the
|
|
51
|
+
agent can answer right away.
|
|
52
|
+
|
|
53
|
+
To change the model later, open **Settings** and choose **Model**. That page
|
|
54
|
+
sets the default model and the providers the app can use.
|
|
55
|
+
|
|
56
|
+
<Callout tone="info">
|
|
57
|
+
|
|
58
|
+
Chat doesn't pick a model for you. Which models you can choose from depends
|
|
59
|
+
on the provider you connect.
|
|
60
|
+
|
|
61
|
+
</Callout>
|
|
62
|
+
|
|
63
|
+
## Voice input
|
|
64
|
+
|
|
65
|
+
The message box includes a microphone button. Select it to dictate a message
|
|
66
|
+
instead of typing, then send it like any other. Language and dictation
|
|
67
|
+
options live under **Settings → Preferences**.
|
|
68
|
+
|
|
69
|
+
## The example action
|
|
70
|
+
|
|
71
|
+
Chat includes one example action called **hello**. An action is a single
|
|
72
|
+
thing the app can do, like greeting someone, creating a note, or looking up a
|
|
73
|
+
record. Each action has a name, a description of what it does, and the details
|
|
74
|
+
it needs to run. The agent reads those descriptions to decide which action to
|
|
75
|
+
use for your request.
|
|
76
|
+
|
|
77
|
+
Ask the agent to greet someone, such as "Call the hello action for Alex", and
|
|
78
|
+
it runs hello with that name and shows the result. It exists so you can see
|
|
79
|
+
the full loop once, from your message to the agent running an action and
|
|
80
|
+
showing what came back, before you write your own.
|
|
81
|
+
|
|
82
|
+
Actions are the shared surface of an agent-native app. The agent uses them,
|
|
83
|
+
and so can the app's own screens, so a new action works in both places with
|
|
84
|
+
no extra setup. Developers add their own actions as the app grows. See
|
|
85
|
+
[Actions](/docs/actions-overview) for how they work and
|
|
86
|
+
[Defining Actions](/docs/actions-defining) to write one.
|
|
87
|
+
|
|
88
|
+
## Shape the agent in Settings
|
|
89
|
+
|
|
90
|
+
Open **Settings** and look under the **Agent** group. These pages control how
|
|
91
|
+
the agent behaves in every chat.
|
|
92
|
+
|
|
93
|
+
| Page | What it controls |
|
|
94
|
+
| ------------------- | ------------------------------------------------------------- |
|
|
95
|
+
| **Model** | The default model and provider keys. |
|
|
96
|
+
| **Instructions** | Standing guidance the agent follows in every chat. |
|
|
97
|
+
| **Personalization** | Your own custom instructions and memory preferences. |
|
|
98
|
+
| **Memory** | Things the agent has learned and remembers across chats. |
|
|
99
|
+
| **Skills** | Reusable how-to guides the agent can load for a kind of task. |
|
|
100
|
+
| **Files** | Reference files the agent can read. |
|
|
101
|
+
| **Sub-agents** | Helper agents the main agent can hand work to. |
|
|
102
|
+
|
|
103
|
+
The **Connections** group holds **Integrations** and **API keys**, and the
|
|
104
|
+
**Account** group holds **Profile**, **Preferences**, and **Security**.
|
|
105
|
+
|
|
106
|
+
<Steps>
|
|
107
|
+
|
|
108
|
+
### Open Settings
|
|
109
|
+
|
|
110
|
+
Select the search button at the bottom of the sidebar and choose
|
|
111
|
+
**Settings**.
|
|
112
|
+
|
|
113
|
+
### Pick a page
|
|
114
|
+
|
|
115
|
+
Choose a page from the list on the left. Changes apply to your next message.
|
|
116
|
+
|
|
117
|
+
</Steps>
|
|
118
|
+
|
|
119
|
+
## Sign-in and teams
|
|
120
|
+
|
|
121
|
+
Chat requires sign-in. Login, signup, and sessions are set up from the first
|
|
122
|
+
run, and sign-in methods, members, and roles are managed under the
|
|
123
|
+
**Organization** group in Settings.
|
|
124
|
+
|
|
125
|
+
The organization switcher at the bottom of the sidebar shows which
|
|
126
|
+
organization you're working in and lets you switch. Keep a single
|
|
127
|
+
organization per workspace and add people to it as members. Credentials you
|
|
128
|
+
connect are saved per organization, so a second organization doesn't see the
|
|
129
|
+
keys connected under the first.
|
|
130
|
+
|
|
131
|
+
## Database and Observability
|
|
132
|
+
|
|
133
|
+
Two admin pages ship with Chat. They aren't linked from the sidebar, so open
|
|
134
|
+
them by address.
|
|
135
|
+
|
|
136
|
+
- **Database** at `/database` shows the app's tables and lets you browse the
|
|
137
|
+
rows the agent and the app have saved.
|
|
138
|
+
- **Observability** at `/observability` shows what the agent has been doing,
|
|
139
|
+
with tabs for an overview, conversations, evals, experiments, and feedback.
|
|
140
|
+
|
|
141
|
+
Both are for the person running the app. They're mounted whether or not you
|
|
142
|
+
ever open them.
|
|
143
|
+
|
|
144
|
+
## Mini-apps
|
|
145
|
+
|
|
146
|
+
Chat can run **Extensions**, small sandboxed tools like a calculator or a
|
|
147
|
+
checklist. They're switched off in Chat. There's no Extensions page in
|
|
148
|
+
Settings, and the agent can't build them. A developer turns them on in two
|
|
149
|
+
places. See [Extensions](/docs/extensions) for what they are and how to enable
|
|
150
|
+
them.
|
|
151
|
+
|
|
152
|
+
## What's next
|
|
153
|
+
|
|
154
|
+
- [**Talk to the Agent**](/docs/template-chat-agent) — what the agent can see, and prompts to try
|
|
155
|
+
- [**Chat in a Multi-App Workspace**](/docs/template-chat-integrations) — connecting Chat to Dispatch and other apps
|
|
156
|
+
- [**Developer Guide**](/docs/template-chat-developers) — quick start, actions, the chat route, and adding your first feature
|
|
157
|
+
- [**Chat**](/docs/template-chat) — the overview
|
|
158
|
+
- [**Extensions**](/docs/extensions) — how mini-apps are built and shared
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Chat in a Multi-App Workspace"
|
|
3
|
+
description: "How Chat connects to Dispatch and other apps, and how its agent finds the apps in a workspace and asks them to do work."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Chat in a Multi-App Workspace
|
|
7
|
+
|
|
8
|
+
Chat is one app among many in a [Dispatch](/docs/template-dispatch)
|
|
9
|
+
workspace. This page covers what that means in practice: how the connection
|
|
10
|
+
works, and how Chat's agent can reach the other apps around it. See
|
|
11
|
+
[Chat](/docs/template-chat) for the overview.
|
|
12
|
+
|
|
13
|
+
## How Chat connects to Dispatch
|
|
14
|
+
|
|
15
|
+
Whether this is automatic depends on how Chat and Dispatch were set up
|
|
16
|
+
together, not on whether either one is hosted or running locally.
|
|
17
|
+
|
|
18
|
+
### Same workspace: automatic
|
|
19
|
+
|
|
20
|
+
If Chat and Dispatch were generated or added together into one Agent-Native
|
|
21
|
+
workspace (via `create` or `add-app`) and deployed as one unit, they already
|
|
22
|
+
share one `.env`, one `A2A_SECRET`, and one workspace registry. Discovery and
|
|
23
|
+
authenticated A2A calling both just work, with nothing to set up, whether
|
|
24
|
+
that workspace is running on your machine or in production.
|
|
25
|
+
|
|
26
|
+
### Separate deployments: one manual step
|
|
27
|
+
|
|
28
|
+
If Chat and Dispatch are two independently created Agent-Native projects,
|
|
29
|
+
they don't share a secret and can't call each other yet. Connecting them
|
|
30
|
+
takes one manual step on each side: add a `remote-agents/<id>.json` resource
|
|
31
|
+
with a shared secret, from Settings → Agent → Sub-agents (Connect agent), or
|
|
32
|
+
Dispatch → Agents → Add external agent. See
|
|
33
|
+
[A2A Protocol](/docs/a2a-protocol) for the full walkthrough.
|
|
34
|
+
|
|
35
|
+
To check which situation you're in, ask either app's agent "what apps can you
|
|
36
|
+
see?" If Chat is missing from Dispatch's answer, you're in the second case.
|
|
37
|
+
|
|
38
|
+
## Integration strategies
|
|
39
|
+
|
|
40
|
+
**Asking other apps for help.** Chat's agent can look up which apps are in the
|
|
41
|
+
workspace and what each one can do. It can then ask one of them to run a
|
|
42
|
+
specific action and use the answer in the conversation. For example, in a
|
|
43
|
+
workspace with Calendar, you could ask Chat "what's on my calendar tomorrow?"
|
|
44
|
+
and the agent hands that question to Calendar instead of guessing. Chat
|
|
45
|
+
doesn't need to hold Calendar's connection to Google. Calendar already has
|
|
46
|
+
it.
|
|
47
|
+
|
|
48
|
+
**Chat as a front door.** Because every app's agent is reachable the same
|
|
49
|
+
way, a conversation in Chat is a natural place to start work that lives in
|
|
50
|
+
other apps. You describe what you want in one place, and the agent decides
|
|
51
|
+
which app should handle it. Chat works well here because it has no domain of
|
|
52
|
+
its own to get in the way.
|
|
53
|
+
|
|
54
|
+
**Staying decoupled.** Chat never needs another app's credentials, and no
|
|
55
|
+
other app needs Chat's. Each app keeps its own connections and its own data.
|
|
56
|
+
Chat only passes along a request and receives an answer.
|
|
57
|
+
|
|
58
|
+
## What's next
|
|
59
|
+
|
|
60
|
+
- [**Chat**](/docs/template-chat) — the overview
|
|
61
|
+
- [**Features**](/docs/template-chat-features) — conversations, the example action, teams, and admin pages
|
|
62
|
+
- [**Talk to the Agent**](/docs/template-chat-agent) — what the agent can see, and prompts to try
|
|
63
|
+
- [**Developer Guide**](/docs/template-chat-developers) — quick start, actions, the chat route, and adding your first feature
|
|
64
|
+
- [**Dispatch**](/docs/template-dispatch) — the workspace control plane these patterns run under
|
|
65
|
+
- [**A2A Protocol**](/docs/a2a-protocol) — how apps discover, authenticate with, and call each other
|
|
66
|
+
- [**Multi-App Workspace**](/docs/multi-app-workspace) — the general pattern of composing first-party apps instead of nesting them
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Chat"
|
|
3
|
-
description: "A
|
|
3
|
+
description: "A developer starter for building your own AI chat app. It ships a working chat with saved conversations, sign-in, and one example action for the agent, ready to extend with your own screens and tools."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Chat
|
|
7
7
|
|
|
8
|
-
Chat is
|
|
9
|
-
chat at the center, a thread list, auth, and one example action, nothing
|
|
10
|
-
domain-specific. It's for developers who want a real, deployable app to build
|
|
11
|
-
their own agent and screens on top of, not a finished product for a specific
|
|
12
|
-
job.
|
|
8
|
+
Chat is a developer starter for building your own agent. Create the app and you get a working conversation screen, saved chat history, and sign-in, with a single example action the agent can already use. It replaces the weeks of wiring a chat interface, conversation storage, and login onto a model by hand, so you start with a deployable app and spend your time on what your agent actually does.
|
|
13
9
|
|
|
14
|
-
If you
|
|
15
|
-
[Calendar](/docs/template-calendar), [Mail](/docs/template-mail),
|
|
16
|
-
[Content](/docs/template-content), [Forms](/docs/template-forms),
|
|
17
|
-
[Analytics](/docs/template-analytics), or another domain template. If you
|
|
18
|
-
truly do not need a browser UI yet, see [Automation-First
|
|
19
|
-
Apps](/docs/pure-agent-apps).
|
|
10
|
+
Chat is not a finished product for a specific job. If you're not a developer, or you want something ready to use today, start with [Clips](/docs/template-clips) for screen recordings, [Slides](/docs/template-slides) for decks, or [Design](/docs/template-design) for interactive prototypes.
|
|
20
11
|
|
|
21
12
|
<Cards columns={1}>
|
|
22
13
|
|
|
@@ -26,160 +17,39 @@ See Chat live: start a real conversation with the agent, no setup required.
|
|
|
26
17
|
|
|
27
18
|
</Cards>
|
|
28
19
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
Observability dashboard, mounted whether or not you ever open them
|
|
55
|
-
- Live sync (`useDbSync`) already wired so the UI refreshes when the agent
|
|
56
|
-
writes to SQL
|
|
57
|
-
- Extensions routes mounted by default, for sandboxed mini-apps your users
|
|
58
|
-
build inside chat later
|
|
59
|
-
- AGENTS.md with chat-first guidance for adding actions, routes, skills, and
|
|
60
|
-
application state
|
|
61
|
-
|
|
62
|
-
### :red: Not included
|
|
63
|
-
|
|
64
|
-
- Domain tables or seed data
|
|
65
|
-
- Dashboards, lists, charts, forms, or provider integrations
|
|
66
|
-
- Domain-specific actions beyond the example stub
|
|
67
|
-
|
|
68
|
-
</Comparison>
|
|
69
|
-
|
|
70
|
-
That's the point. Chat is a thin, useful default shell for your own agent, not
|
|
71
|
-
a domain product pretending to be generic.
|
|
72
|
-
|
|
73
|
-
<Diagram id="doc-block-chat2" title="What ships in the Chat shell" summary={"A thin chat surface over the framework's standard runtime — actions, durable threads, live sync, and auth — with room to add your own UI."}>
|
|
74
|
-
|
|
75
|
-
```html
|
|
76
|
-
<div class="diagram-chat">
|
|
77
|
-
<div class="diagram-col left">
|
|
78
|
-
<div class="diagram-node">
|
|
79
|
-
Thread list<br /><small class="diagram-muted"
|
|
80
|
-
>create · reopen · pin · archive</small
|
|
81
|
-
>
|
|
82
|
-
</div>
|
|
83
|
-
<div class="diagram-node">
|
|
84
|
-
Full-page chat<br /><small class="diagram-muted"
|
|
85
|
-
>framework chat surface on /</small
|
|
86
|
-
>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
90
|
-
<div class="diagram-panel center">
|
|
91
|
-
<span class="diagram-pill accent">Actions</span
|
|
92
|
-
><small class="diagram-muted">hello.ts · view-screen · navigate</small>
|
|
93
|
-
</div>
|
|
94
|
-
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
95
|
-
<div class="diagram-col right">
|
|
96
|
-
<div class="diagram-box">
|
|
97
|
-
Core SQL tables<br /><small class="diagram-muted"
|
|
98
|
-
>threads · application_state · settings · sessions · runs</small
|
|
99
|
-
>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="diagram-pill ok">Live sync ↻</div>
|
|
102
|
-
<div class="diagram-box">
|
|
103
|
-
Better Auth<br /><small class="diagram-muted"
|
|
104
|
-
>login · orgs · sessions</small
|
|
105
|
-
>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
```css
|
|
112
|
-
.diagram-chat {
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
gap: 12px;
|
|
116
|
-
flex-wrap: wrap;
|
|
117
|
-
}
|
|
118
|
-
.diagram-chat .diagram-col {
|
|
119
|
-
display: flex;
|
|
120
|
-
flex-direction: column;
|
|
121
|
-
gap: 10px;
|
|
122
|
-
}
|
|
123
|
-
.diagram-chat .diagram-arrow {
|
|
124
|
-
font-size: 22px;
|
|
125
|
-
line-height: 1;
|
|
126
|
-
}
|
|
127
|
-
.diagram-chat .center {
|
|
128
|
-
display: flex;
|
|
129
|
-
flex-direction: column;
|
|
130
|
-
align-items: center;
|
|
131
|
-
gap: 4px;
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
</Diagram>
|
|
136
|
-
|
|
137
|
-
## When to pick it {#when-to-pick}
|
|
138
|
-
|
|
139
|
-
- **You want a basic app users can talk to immediately** and then extend with
|
|
140
|
-
actions and UI.
|
|
141
|
-
- **You want the default Agent-Native on-ramp**: chat first, then actions,
|
|
142
|
-
native results, and app pages.
|
|
143
|
-
- **You want to plug your own agent backend into a familiar chat UI** while
|
|
144
|
-
keeping Agent-Native's actions, state, auth, and deployment shape.
|
|
145
|
-
- **You are prototyping a custom internal tool** that does not match a domain
|
|
146
|
-
template.
|
|
147
|
-
|
|
148
|
-
## Get started {#get-started}
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
npx --yes @agent-native/core@latest create my-chat-app --standalone --template chat
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
See [Chat: Developer Guide](/docs/template-chat-developers#quick-start) for
|
|
155
|
-
install, first run, and connecting an LLM. For automation-first work with no
|
|
156
|
-
browser UI at all, scaffold with `--headless` instead:
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
npx --yes @agent-native/core@latest create my-agent --headless
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Use it for scheduled jobs, queues, CLI loops, or external-agent workflows
|
|
163
|
-
where chat and app pages are not useful yet. The key invariant stays the
|
|
164
|
-
same: actions are the shared surface for chat, UI, HTTP, MCP, A2A, and CLI.
|
|
165
|
-
See [Automation-First Apps](/docs/pure-agent-apps) for that path in depth.
|
|
20
|
+
<Video
|
|
21
|
+
src="https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2F4a4df15cbb41401389d5b2929945c3ac?alt=media&token=f4a7cfa8-6ecc-435b-9aa0-31c06ca1a6ee&apiKey=YJIGb4i01jvw0SRdL5Bt"
|
|
22
|
+
alt="A short screen recording of starting a conversation in the Chat app."
|
|
23
|
+
caption="A brief tour of the Chat application."
|
|
24
|
+
autoplay={true}
|
|
25
|
+
loop={true}
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
## What you get
|
|
29
|
+
|
|
30
|
+
After you sign in, Chat opens on a Get started page with a message box. Ask anything and the agent answers in a full-page conversation. The rest of what's included is deliberately small.
|
|
31
|
+
|
|
32
|
+
- **A full-page chat.** Conversations take up the whole screen, with the message box centered until you send your first message.
|
|
33
|
+
- **A conversation list.** The sidebar lists your chats so you can start a new one, reopen an old one, rename it, pin it, or archive it.
|
|
34
|
+
- **A Get started page.** A short landing page with links to the guides for adding your first action and your first screen. You can edit it or replace it.
|
|
35
|
+
- **Sign-in and teams.** Login, signup, and organizations work from the start.
|
|
36
|
+
- **One example action.** The agent can already run a simple example, so you can see how an action works before writing your own.
|
|
37
|
+
- **Admin pages.** A database viewer and an observability dashboard are included, whether or not you ever open them.
|
|
38
|
+
- **Room for mini-apps.** Routes for small sandboxed tools called Extensions are included but switched off. A developer can switch them on.
|
|
39
|
+
|
|
40
|
+
Chat leaves out anything specific to a business: no ready-made data, dashboards, forms, or connections to outside services. You add those.
|
|
41
|
+
|
|
42
|
+
## Chat in a multi-app workspace
|
|
43
|
+
|
|
44
|
+
If you're running Chat alongside other apps under [Dispatch](/docs/template-dispatch), it can act as the front door to your workspace. A single conversation can reach into the apps around it instead of living on its own. See [Chat in a Multi-App Workspace](/docs/template-chat-integrations) for how the connection works.
|
|
166
45
|
|
|
167
46
|
## What's next
|
|
168
47
|
|
|
169
|
-
- [**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- [**
|
|
173
|
-
|
|
174
|
-
- [**
|
|
175
|
-
|
|
176
|
-
- [**
|
|
177
|
-
domain template to start from instead
|
|
178
|
-
- [**Agent Surfaces**](/docs/agent-surfaces) — chat, inline UI, app pages,
|
|
179
|
-
embedded, automation, and external-agent patterns
|
|
180
|
-
- [**Actions**](/docs/actions-overview) — the action system chat and UI both
|
|
181
|
-
call
|
|
182
|
-
- [**Native Chat UI**](/docs/native-chat-ui) — chat surface primitives and
|
|
183
|
-
runtime options
|
|
184
|
-
- [**Automation-First Apps**](/docs/pure-agent-apps) — no-browser workflows
|
|
185
|
-
for jobs, queues, scripts, and external agents
|
|
48
|
+
- [**Features**](/docs/template-chat-features) — conversations, the example action, teams, and admin pages, with steps for each
|
|
49
|
+
- [**Talk to the Agent**](/docs/template-chat-agent) — what the agent can see, and prompts to try
|
|
50
|
+
- [**Chat in a Multi-App Workspace**](/docs/template-chat-integrations) — connecting Chat to Dispatch and other apps
|
|
51
|
+
- [**Developer Guide**](/docs/template-chat-developers) — quick start, actions, the chat route, and adding your first feature
|
|
52
|
+
- [**Clips**](/docs/template-clips), [**Slides**](/docs/template-slides), and [**Design**](/docs/template-design) — finished apps for people who want to start using an agent without building one
|
|
53
|
+
- [**Templates**](/docs/cloneable-saas) — the Cloneable SaaS model, and every other template to start from
|
|
54
|
+
- [**Getting Started**](/docs/getting-started) — the framework fundamentals: actions, application state, and live sync
|
|
55
|
+
- [**Automation-First Apps**](/docs/pure-agent-apps) — agents with no browser screen, for jobs, queues, and scripts
|
|
@@ -368,7 +368,7 @@ Team, member, and invitation rows live in the framework's own `organizations`, `
|
|
|
368
368
|
},
|
|
369
369
|
{
|
|
370
370
|
path: "server/routes/api/agent-context.json.get.ts",
|
|
371
|
-
note: "the agent-readable endpoints, plus agent-transcript.json and agent-
|
|
371
|
+
note: "the agent-readable endpoints, plus agent-transcript.json, agent-frame.jpg and agent-frames.jpg",
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
374
|
path: "server/lib/google-calendar-client.ts",
|
|
@@ -29,11 +29,12 @@ Paste a public Clips share link into an agent, or use **Share → Copy** in the
|
|
|
29
29
|
|
|
30
30
|
Most agents that can view images handle this on their own, including ChatGPT, Claude Code, Cursor, and Codex. A few text-only chats can read the transcript but not the frames, so open the clip in an image-capable agent for those.
|
|
31
31
|
|
|
32
|
-
| Endpoint
|
|
33
|
-
|
|
|
34
|
-
| `/api/agent-context.json?id=<recordingId>`
|
|
35
|
-
| `/api/agent-transcript.json?id=<recordingId>`
|
|
36
|
-
| `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>`
|
|
32
|
+
| Endpoint | What agents get |
|
|
33
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
34
|
+
| `/api/agent-context.json?id=<recordingId>` | Clip metadata, transcript status, chapters, CTAs, recommended frames, and links to the transcript/frame APIs |
|
|
35
|
+
| `/api/agent-transcript.json?id=<recordingId>` | Timestamped transcript segments with `startMs`, `endMs`, readable timestamps, text, and optional source labels |
|
|
36
|
+
| `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | A JPEG frame extracted from the video at an original-video timestamp |
|
|
37
|
+
| `/api/agent-frames.jpg?id=<recordingId>&startMs=<ms>&endMs=<ms>&fps=<n>` | One JPEG contact sheet of up to 36 consecutive frames from a time range, for watching an animation or a transition in a single image |
|
|
37
38
|
|
|
38
39
|
The endpoints follow the same public/password/expiry rules as the share page, or accept the scoped `agent_access` token from a temporary agent link. Password-protected clips require the password once; successful responses return short-lived tokenized links so downstream agents do not need the plaintext password.
|
|
39
40
|
|
|
@@ -104,6 +105,50 @@ Returns clip metadata, transcript status, chapters, CTAs, recommended frames, an
|
|
|
104
105
|
|
|
105
106
|
</Endpoint>
|
|
106
107
|
|
|
108
|
+
<Endpoint id="doc-block-clips-agent-frames" title="Frame sheet for a time range" method="GET" path="/api/agent-frames.jpg" summary="Consecutive frames from a time range in one JPEG contact sheet" params={[
|
|
109
|
+
{
|
|
110
|
+
"name": "id",
|
|
111
|
+
"in": "query",
|
|
112
|
+
"type": "string",
|
|
113
|
+
"required": true,
|
|
114
|
+
"description": "Recording id"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "startMs",
|
|
118
|
+
"in": "query",
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"required": true,
|
|
121
|
+
"description": "Time of the first frame in milliseconds"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "endMs",
|
|
125
|
+
"in": "query",
|
|
126
|
+
"type": "integer",
|
|
127
|
+
"required": false,
|
|
128
|
+
"description": "End of the range in milliseconds (exclusive); without it, the sheet holds up to 36 frames from startMs, stopping at 60 seconds or the end of the clip"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "fps",
|
|
132
|
+
"in": "query",
|
|
133
|
+
"type": "number",
|
|
134
|
+
"required": false,
|
|
135
|
+
"description": "Frames per second, up to 60; without it, the video's own frame rate"
|
|
136
|
+
}
|
|
137
|
+
]} responses={[
|
|
138
|
+
{
|
|
139
|
+
"status": "200",
|
|
140
|
+
"description": "image/jpeg sheet read left to right, then top to bottom; the X-Clips-Frame-Sheet-Times header lists each cell's time"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"status": "400",
|
|
144
|
+
"description": "failureKind=request when the range needs more than 36 frames or spans more than 60 seconds; nextStep names a request that fits"
|
|
145
|
+
}
|
|
146
|
+
]}>
|
|
147
|
+
|
|
148
|
+
Cell _i_ shows the frame on screen at `startMs + i × 1000 / fps`. Leave out `fps` to see every frame the video has.
|
|
149
|
+
|
|
150
|
+
</Endpoint>
|
|
151
|
+
|
|
107
152
|
If a transcript isn't ready yet, a well-behaved agent waits a bit and retries instead of giving up right away. Long recordings can take a few minutes. If transcription fails because Builder credits ran out, the agent should say so and point to [Transcription and AI metadata](/docs/template-clips-features#transcription-and-ai-metadata).
|
|
108
153
|
|
|
109
154
|
### Exporting to Brain
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.210.0
|
|
3
|
+
"version": "0.210.0",
|
|
4
4
|
"description": "The agentic application framework for building autonomous agents with intuitive UIs",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -711,8 +711,8 @@
|
|
|
711
711
|
"yaml": "^2.9.0",
|
|
712
712
|
"yjs": "^13.6.33",
|
|
713
713
|
"zod": "^4.3.6",
|
|
714
|
-
"@agent-native/agentkit": "^0.210.0
|
|
715
|
-
"@agent-native/recap-cli": "^0.5.
|
|
714
|
+
"@agent-native/agentkit": "^0.210.0",
|
|
715
|
+
"@agent-native/recap-cli": "^0.5.75"
|
|
716
716
|
},
|
|
717
717
|
"devDependencies": {
|
|
718
718
|
"@ai-sdk/anthropic": "^3.0.71",
|
|
@@ -782,7 +782,7 @@
|
|
|
782
782
|
"xlsx": "^0.18.5"
|
|
783
783
|
},
|
|
784
784
|
"peerDependencies": {
|
|
785
|
-
"@agent-native/core-corpus": "0.
|
|
785
|
+
"@agent-native/core-corpus": ">=0.196.0",
|
|
786
786
|
"@ai-sdk/anthropic": ">=3",
|
|
787
787
|
"@ai-sdk/cohere": ">=3",
|
|
788
788
|
"@ai-sdk/google": ">=3",
|
|
@@ -170,10 +170,10 @@ Everything else — CRUD, settings, search, list/detail reads, auth state, anyth
|
|
|
170
170
|
- **Do** keep one action, one job; document a reusable action (when to use it, key args, return fields to preserve) in `AGENTS.md` once it's called from outside one narrow screen; promote workflow-heavy actions (provider-backed, cross-app, MCP/A2A, multi-step) into a skill.
|
|
171
171
|
- **Do** use `fail(message, { errorCode, statusCode })` for user-friendly errors and import primitives from `@agent-native/core`(`/action`) instead of redefining them; use the core `upload-image` action or `uploadFile()` for durable images/files — never base64 into SQL, markdown, or action results.
|
|
172
172
|
- **Do** signal failure by throwing, using `fail()` for expected caller-readable failures. Never return `{ error: ... }` as a failure result: a normal return is treated as a successful action. Reserve bare errors for unexpected internal faults.
|
|
173
|
-
- **Do** use `fail()` rather than a bare `Error` for caller-readable failures. It carries the action's message, `errorCode`, and `details` to the browser; unexpected errors become a generic 500. Reserve bare throws for internal faults.
|
|
173
|
+
- **Do** use `fail()` rather than a bare `Error` for caller-readable failures. It carries the action's message, `errorCode`, and `details` to the browser and to agents; unexpected errors become a generic 500. Reserve bare throws for internal faults.
|
|
174
174
|
- **Do** give `fail()` the status that matches the cause: it defaults to `400`, and `useActionQuery` retries only `429`, `502`, `503`, and `504`. Mutations do not retry; use transient statuses only for retryable failures.
|
|
175
175
|
- **Do** render `actionErrorMessage(error) ?? yourCopy` in UI, never bare `error.message`. The message keeps an `Action <name> failed:` prefix that belongs in a console, so a toast built from it reads "Action update-brand-kit failed: That name is taken." The helper returns only what the action wrote, and `undefined` when nothing did (network drop, proxy HTML page), which is why the fallback is not optional.
|
|
176
|
-
- **Do** pass a real `errorCode` when the agent should branch on the failure rather than re-read it. Codes other than the default `action_failed` are appended to the tool result as `(errorCode: not_found)`, on both the in-app agent and MCP
|
|
176
|
+
- **Do** pass a real `errorCode` when the agent should branch on the failure rather than re-read it. Codes other than the default `action_failed` are appended to the tool result as `(errorCode: not_found)`, on both the in-app agent and MCP. `details` follow as an `Error details: {...}` JSON line, and as `structuredContent.error` over MCP, capped at 2,000 characters, so keep them to what the agent acts on next: ids, limits, field names. The status never reaches either.
|
|
177
177
|
- **Don't** re-export actions as REST — `/_agent-native/actions/:name` is already the REST surface; duplicating it under `/api/*` hides the operation from agents.
|
|
178
178
|
- **Don't** reach for provider integrations, `outputSchema`, `authorize`, `needsApproval`, or `_agentImages` without checking `references/` first — each has sharp edges covered there, not here.
|
|
179
179
|
|
|
@@ -12,7 +12,6 @@ NPM_CONFIG_PRODUCTION = "false"
|
|
|
12
12
|
|
|
13
13
|
[context.production.environment]
|
|
14
14
|
AGENT_NATIVE_HOSTED_HARNESS = "true"
|
|
15
|
-
AGENT_NATIVE_ENABLE_KEEP_WARM = "1"
|
|
16
15
|
AGENT_NATIVE_DISABLE_KEEP_WARM_BACKGROUND = "1"
|
|
17
16
|
BETTER_AUTH_TRUSTED_ORIGINS = "https://starter.agent-native.com,https://chat.agent-native.com"
|
|
18
17
|
# Production release migrations own schema setup; request functions must skip
|
|
@@ -170,10 +170,10 @@ Everything else — CRUD, settings, search, list/detail reads, auth state, anyth
|
|
|
170
170
|
- **Do** keep one action, one job; document a reusable action (when to use it, key args, return fields to preserve) in `AGENTS.md` once it's called from outside one narrow screen; promote workflow-heavy actions (provider-backed, cross-app, MCP/A2A, multi-step) into a skill.
|
|
171
171
|
- **Do** use `fail(message, { errorCode, statusCode })` for user-friendly errors and import primitives from `@agent-native/core`(`/action`) instead of redefining them; use the core `upload-image` action or `uploadFile()` for durable images/files — never base64 into SQL, markdown, or action results.
|
|
172
172
|
- **Do** signal failure by throwing, using `fail()` for expected caller-readable failures. Never return `{ error: ... }` as a failure result: a normal return is treated as a successful action. Reserve bare errors for unexpected internal faults.
|
|
173
|
-
- **Do** use `fail()` rather than a bare `Error` for caller-readable failures. It carries the action's message, `errorCode`, and `details` to the browser; unexpected errors become a generic 500. Reserve bare throws for internal faults.
|
|
173
|
+
- **Do** use `fail()` rather than a bare `Error` for caller-readable failures. It carries the action's message, `errorCode`, and `details` to the browser and to agents; unexpected errors become a generic 500. Reserve bare throws for internal faults.
|
|
174
174
|
- **Do** give `fail()` the status that matches the cause: it defaults to `400`, and `useActionQuery` retries only `429`, `502`, `503`, and `504`. Mutations do not retry; use transient statuses only for retryable failures.
|
|
175
175
|
- **Do** render `actionErrorMessage(error) ?? yourCopy` in UI, never bare `error.message`. The message keeps an `Action <name> failed:` prefix that belongs in a console, so a toast built from it reads "Action update-brand-kit failed: That name is taken." The helper returns only what the action wrote, and `undefined` when nothing did (network drop, proxy HTML page), which is why the fallback is not optional.
|
|
176
|
-
- **Do** pass a real `errorCode` when the agent should branch on the failure rather than re-read it. Codes other than the default `action_failed` are appended to the tool result as `(errorCode: not_found)`, on both the in-app agent and MCP
|
|
176
|
+
- **Do** pass a real `errorCode` when the agent should branch on the failure rather than re-read it. Codes other than the default `action_failed` are appended to the tool result as `(errorCode: not_found)`, on both the in-app agent and MCP. `details` follow as an `Error details: {...}` JSON line, and as `structuredContent.error` over MCP, capped at 2,000 characters, so keep them to what the agent acts on next: ids, limits, field names. The status never reaches either.
|
|
177
177
|
- **Don't** re-export actions as REST — `/_agent-native/actions/:name` is already the REST surface; duplicating it under `/api/*` hides the operation from agents.
|
|
178
178
|
- **Don't** reach for provider integrations, `outputSchema`, `authorize`, `needsApproval`, or `_agentImages` without checking `references/` first — each has sharp edges covered there, not here.
|
|
179
179
|
|