@agent-native/core 0.7.13 → 0.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a2a/client.d.ts +44 -1
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +88 -11
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/handlers.d.ts +10 -0
- package/dist/a2a/handlers.d.ts.map +1 -1
- package/dist/a2a/handlers.js +287 -62
- package/dist/a2a/handlers.js.map +1 -1
- package/dist/a2a/server.d.ts.map +1 -1
- package/dist/a2a/server.js +95 -17
- package/dist/a2a/server.js.map +1 -1
- package/dist/a2a/task-store.d.ts +11 -1
- package/dist/a2a/task-store.d.ts.map +1 -1
- package/dist/a2a/task-store.js +38 -2
- package/dist/a2a/task-store.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +7 -25
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/engine/builtin.js +1 -1
- package/dist/agent/engine/builtin.js.map +1 -1
- package/dist/chat-threads/store.d.ts +3 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +32 -0
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +11 -0
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +3 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +21 -10
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AgentTaskCard.d.ts.map +1 -1
- package/dist/client/AgentTaskCard.js +2 -0
- package/dist/client/AgentTaskCard.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +2 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +111 -75
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/ErrorBoundary.d.ts +1 -3
- package/dist/client/ErrorBoundary.d.ts.map +1 -1
- package/dist/client/ErrorBoundary.js +37 -9
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/FeedbackButton.d.ts.map +1 -1
- package/dist/client/FeedbackButton.js +4 -3
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +145 -49
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat.d.ts +11 -0
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +1 -1
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/components/AgentPresenceChip.d.ts +12 -0
- package/dist/client/components/AgentPresenceChip.d.ts.map +1 -0
- package/dist/client/components/AgentPresenceChip.js +42 -0
- package/dist/client/components/AgentPresenceChip.js.map +1 -0
- package/dist/client/components/PresenceBar.d.ts +17 -0
- package/dist/client/components/PresenceBar.d.ts.map +1 -0
- package/dist/client/components/PresenceBar.js +118 -0
- package/dist/client/components/PresenceBar.js.map +1 -0
- package/dist/client/composer/ComposerPlusMenu.d.ts +6 -1
- package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.js +22 -83
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +237 -16
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/types.d.ts +1 -0
- package/dist/client/composer/types.d.ts.map +1 -1
- package/dist/client/composer/useVoiceDictation.d.ts +2 -0
- package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
- package/dist/client/composer/useVoiceDictation.js +85 -10
- package/dist/client/composer/useVoiceDictation.js.map +1 -1
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +5 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/RequireActiveOrg.d.ts.map +1 -1
- package/dist/client/org/RequireActiveOrg.js +15 -10
- package/dist/client/org/RequireActiveOrg.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +125 -4
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/hooks.d.ts +30 -0
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +65 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +2 -2
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +1 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +5 -1
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
- package/dist/client/settings/AutomationsSection.js +1 -0
- package/dist/client/settings/AutomationsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +24 -11
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +10 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/tools/ToolEditor.d.ts +5 -0
- package/dist/client/tools/ToolEditor.d.ts.map +1 -0
- package/dist/client/tools/ToolEditor.js +98 -0
- package/dist/client/tools/ToolEditor.js.map +1 -0
- package/dist/client/tools/ToolViewer.d.ts +5 -0
- package/dist/client/tools/ToolViewer.d.ts.map +1 -0
- package/dist/client/tools/ToolViewer.js +309 -0
- package/dist/client/tools/ToolViewer.js.map +1 -0
- package/dist/client/tools/ToolViewerPage.d.ts +2 -0
- package/dist/client/tools/ToolViewerPage.d.ts.map +1 -0
- package/dist/client/tools/ToolViewerPage.js +23 -0
- package/dist/client/tools/ToolViewerPage.js.map +1 -0
- package/dist/client/tools/ToolsListPage.d.ts +2 -0
- package/dist/client/tools/ToolsListPage.d.ts.map +1 -0
- package/dist/client/tools/ToolsListPage.js +72 -0
- package/dist/client/tools/ToolsListPage.js.map +1 -0
- package/dist/client/tools/ToolsSidebarSection.d.ts +2 -0
- package/dist/client/tools/ToolsSidebarSection.d.ts.map +1 -0
- package/dist/client/tools/ToolsSidebarSection.js +188 -0
- package/dist/client/tools/ToolsSidebarSection.js.map +1 -0
- package/dist/client/tools/index.d.ts +6 -0
- package/dist/client/tools/index.d.ts.map +1 -0
- package/dist/client/tools/index.js +6 -0
- package/dist/client/tools/index.js.map +1 -0
- package/dist/client/use-chat-threads.d.ts +1 -0
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +29 -0
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/use-db-sync.js +6 -6
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/collab/agent-identity.d.ts +15 -0
- package/dist/collab/agent-identity.d.ts.map +1 -0
- package/dist/collab/agent-identity.js +14 -0
- package/dist/collab/agent-identity.js.map +1 -0
- package/dist/collab/agent-presence.d.ts +59 -0
- package/dist/collab/agent-presence.d.ts.map +1 -0
- package/dist/collab/agent-presence.js +165 -0
- package/dist/collab/agent-presence.js.map +1 -0
- package/dist/collab/awareness.d.ts +7 -0
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/awareness.js +2 -2
- package/dist/collab/awareness.js.map +1 -1
- package/dist/collab/client-struct.d.ts +43 -0
- package/dist/collab/client-struct.d.ts.map +1 -0
- package/dist/collab/client-struct.js +272 -0
- package/dist/collab/client-struct.js.map +1 -0
- package/dist/collab/client.d.ts +2 -0
- package/dist/collab/client.d.ts.map +1 -1
- package/dist/collab/client.js +15 -1
- package/dist/collab/client.js.map +1 -1
- package/dist/collab/index.d.ts +6 -1
- package/dist/collab/index.d.ts.map +1 -1
- package/dist/collab/index.js +11 -1
- package/dist/collab/index.js.map +1 -1
- package/dist/collab/json-to-yjs.d.ts +72 -0
- package/dist/collab/json-to-yjs.d.ts.map +1 -0
- package/dist/collab/json-to-yjs.js +456 -0
- package/dist/collab/json-to-yjs.js.map +1 -0
- package/dist/collab/struct-routes.d.ts +52 -0
- package/dist/collab/struct-routes.d.ts.map +1 -0
- package/dist/collab/struct-routes.js +74 -0
- package/dist/collab/struct-routes.js.map +1 -0
- package/dist/collab/ydoc-manager.d.ts +19 -0
- package/dist/collab/ydoc-manager.d.ts.map +1 -1
- package/dist/collab/ydoc-manager.js +49 -0
- package/dist/collab/ydoc-manager.js.map +1 -1
- package/dist/deploy/build.js +1 -1
- package/dist/file-upload/builder.d.ts.map +1 -1
- package/dist/file-upload/builder.js +2 -1
- package/dist/file-upload/builder.js.map +1 -1
- package/dist/integrations/adapters/email.d.ts +17 -0
- package/dist/integrations/adapters/email.d.ts.map +1 -0
- package/dist/integrations/adapters/email.js +620 -0
- package/dist/integrations/adapters/email.js.map +1 -0
- package/dist/integrations/adapters/telegram.d.ts.map +1 -1
- package/dist/integrations/adapters/telegram.js +19 -3
- package/dist/integrations/adapters/telegram.js.map +1 -1
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +1 -0
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/internal-token.d.ts +18 -0
- package/dist/integrations/internal-token.d.ts.map +1 -0
- package/dist/integrations/internal-token.js +86 -0
- package/dist/integrations/internal-token.js.map +1 -0
- package/dist/integrations/pending-tasks-retry-job.d.ts +15 -0
- package/dist/integrations/pending-tasks-retry-job.d.ts.map +1 -0
- package/dist/integrations/pending-tasks-retry-job.js +199 -0
- package/dist/integrations/pending-tasks-retry-job.js.map +1 -0
- package/dist/integrations/pending-tasks-store.d.ts +40 -0
- package/dist/integrations/pending-tasks-store.d.ts.map +1 -0
- package/dist/integrations/pending-tasks-store.js +151 -0
- package/dist/integrations/pending-tasks-store.js.map +1 -0
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +151 -9
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/task-queue-stats.d.ts +22 -0
- package/dist/integrations/task-queue-stats.d.ts.map +1 -0
- package/dist/integrations/task-queue-stats.js +117 -0
- package/dist/integrations/task-queue-stats.js.map +1 -0
- package/dist/integrations/types.d.ts +2 -0
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.d.ts +23 -4
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +217 -59
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/mcp-client/manager.d.ts +3 -0
- package/dist/mcp-client/manager.d.ts.map +1 -1
- package/dist/mcp-client/manager.js +5 -0
- package/dist/mcp-client/manager.js.map +1 -1
- package/dist/oauth-tokens/google-refresh.d.ts.map +1 -1
- package/dist/oauth-tokens/google-refresh.js +6 -0
- package/dist/oauth-tokens/google-refresh.js.map +1 -1
- package/dist/onboarding/default-steps.d.ts.map +1 -1
- package/dist/onboarding/default-steps.js +10 -3
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/org/context.d.ts +35 -0
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/context.js +136 -0
- package/dist/org/context.js.map +1 -1
- package/dist/org/handlers.d.ts +76 -0
- package/dist/org/handlers.d.ts.map +1 -1
- package/dist/org/handlers.js +411 -2
- package/dist/org/handlers.js.map +1 -1
- package/dist/org/index.d.ts +2 -2
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +2 -2
- package/dist/org/index.js.map +1 -1
- package/dist/org/migrations.d.ts.map +1 -1
- package/dist/org/migrations.js +8 -0
- package/dist/org/migrations.js.map +1 -1
- package/dist/org/plugin.d.ts +6 -0
- package/dist/org/plugin.d.ts.map +1 -1
- package/dist/org/plugin.js +71 -7
- package/dist/org/plugin.js.map +1 -1
- package/dist/org/schema.d.ts +38 -0
- package/dist/org/schema.d.ts.map +1 -1
- package/dist/org/schema.js +2 -0
- package/dist/org/schema.js.map +1 -1
- package/dist/org/types.d.ts +7 -0
- package/dist/org/types.d.ts.map +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +90 -18
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/scripts/db/index.d.ts.map +1 -1
- package/dist/scripts/db/index.js +2 -0
- package/dist/scripts/db/index.js.map +1 -1
- package/dist/scripts/db/migrate-user-api-keys.d.ts +24 -0
- package/dist/scripts/db/migrate-user-api-keys.d.ts.map +1 -0
- package/dist/scripts/db/migrate-user-api-keys.js +224 -0
- package/dist/scripts/db/migrate-user-api-keys.js.map +1 -0
- package/dist/scripts/db/wipe-leaked-builder-keys.d.ts +27 -0
- package/dist/scripts/db/wipe-leaked-builder-keys.d.ts.map +1 -0
- package/dist/scripts/db/wipe-leaked-builder-keys.js +163 -0
- package/dist/scripts/db/wipe-leaked-builder-keys.js.map +1 -0
- package/dist/secrets/register-framework-secrets.d.ts +5 -0
- package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
- package/dist/secrets/register-framework-secrets.js +7 -44
- package/dist/secrets/register-framework-secrets.js.map +1 -1
- package/dist/secrets/substitution.d.ts.map +1 -1
- package/dist/secrets/substitution.js +14 -2
- package/dist/secrets/substitution.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +39 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/action-routes.js +1 -1
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +192 -45
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts +14 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +232 -17
- package/dist/server/auth.js.map +1 -1
- package/dist/server/builder-browser.d.ts +1 -1
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js +12 -12
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/collab-plugin.d.ts +4 -0
- package/dist/server/collab-plugin.d.ts.map +1 -1
- package/dist/server/collab-plugin.js +30 -4
- package/dist/server/collab-plugin.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +106 -100
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts +43 -2
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +115 -2
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/design-token-utils.d.ts +132 -0
- package/dist/server/design-token-utils.d.ts.map +1 -0
- package/dist/server/design-token-utils.js +714 -0
- package/dist/server/design-token-utils.js.map +1 -0
- package/dist/server/email.d.ts +10 -0
- package/dist/server/email.d.ts.map +1 -1
- package/dist/server/email.js +63 -16
- package/dist/server/email.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +38 -3
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/google-oauth.d.ts +18 -1
- package/dist/server/google-oauth.d.ts.map +1 -1
- package/dist/server/google-oauth.js +21 -4
- package/dist/server/google-oauth.js.map +1 -1
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +14 -1
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts.map +1 -1
- package/dist/server/transcribe-voice.js +89 -24
- package/dist/server/transcribe-voice.js.map +1 -1
- package/dist/sharing/schema.d.ts +1 -1
- package/dist/styles/agent-native.css +5 -0
- package/dist/templates/default/app/root.tsx +50 -13
- package/dist/templates/default/react-router.config.ts +3 -0
- package/dist/terminal/terminal-plugin.d.ts.map +1 -1
- package/dist/terminal/terminal-plugin.js +23 -3
- package/dist/terminal/terminal-plugin.js.map +1 -1
- package/dist/tools/actions.d.ts +3 -0
- package/dist/tools/actions.d.ts.map +1 -0
- package/dist/tools/actions.js +140 -0
- package/dist/tools/actions.js.map +1 -0
- package/dist/tools/fetch-tool.js +1 -1
- package/dist/tools/fetch-tool.js.map +1 -1
- package/dist/tools/html-shell.d.ts +2 -0
- package/dist/tools/html-shell.d.ts.map +1 -0
- package/dist/tools/html-shell.js +387 -0
- package/dist/tools/html-shell.js.map +1 -0
- package/dist/tools/routes.d.ts +2 -0
- package/dist/tools/routes.d.ts.map +1 -0
- package/dist/tools/routes.js +576 -0
- package/dist/tools/routes.js.map +1 -0
- package/dist/tools/schema.d.ts +575 -0
- package/dist/tools/schema.d.ts.map +1 -0
- package/dist/tools/schema.js +112 -0
- package/dist/tools/schema.js.map +1 -0
- package/dist/tools/store.d.ts +40 -0
- package/dist/tools/store.d.ts.map +1 -0
- package/dist/tools/store.js +190 -0
- package/dist/tools/store.js.map +1 -0
- package/dist/tools/theme.d.ts +2 -0
- package/dist/tools/theme.d.ts.map +1 -0
- package/dist/tools/theme.js +67 -0
- package/dist/tools/theme.js.map +1 -0
- package/dist/transcription/builder-transcription.d.ts.map +1 -1
- package/dist/transcription/builder-transcription.js +26 -14
- package/dist/transcription/builder-transcription.js.map +1 -1
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +10 -2
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +26 -6
- package/dist/vite/client.js.map +1 -1
- package/docs/content/a2a-protocol.md +2 -2
- package/docs/content/authentication.md +51 -0
- package/docs/content/cloneable-saas.md +59 -62
- package/docs/content/faq.md +73 -43
- package/docs/content/getting-started.md +37 -61
- package/docs/content/mcp-clients.md +14 -1
- package/docs/content/messaging.md +284 -0
- package/docs/content/pure-agent-apps.md +55 -28
- package/docs/content/template-calendar.md +61 -56
- package/docs/content/template-clips.md +22 -18
- package/docs/content/template-content.md +36 -26
- package/docs/content/template-dispatch.md +2 -1
- package/docs/content/template-forms.md +13 -11
- package/docs/content/template-slides.md +43 -31
- package/docs/content/template-video.md +49 -22
- package/docs/content/tools.md +107 -0
- package/docs/content/what-is-agent-native.md +89 -105
- package/package.json +4 -1
- package/src/templates/default/app/root.tsx +50 -13
- package/src/templates/default/react-router.config.ts +3 -0
- package/docs/content/integrations.md +0 -198
|
@@ -1,108 +1,73 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "What Is Agent-Native?"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Why most AI apps feel half-built, what makes an app truly agent-native, and what your day-to-day experience looks like as a result."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# What Is Agent-Native?
|
|
7
7
|
|
|
8
8
|
Agent-native is a way of building software where the AI agent and the UI are **equal partners**. Everything the agent can do, the UI can do. Everything the UI can do, the agent can do. They share the same database, the same state, and they stay in sync.
|
|
9
9
|
|
|
10
|
-
If you only remember one thing from this page, remember this: most AI apps today stop
|
|
10
|
+
If you only remember one thing from this page, remember this: most AI apps today stop one step short of being useful, and that gap is the biggest mistake in the space right now.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## What it looks like as a user {#what-it-looks-like}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Picture your inbox, calendar, or analytics dashboard. Now picture an agent panel docked on the right side of that app. You can:
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
A text box sends a prompt, you get a string back, maybe you parse it, and you render it. There's no way for the user to course-correct, no way for the LLM to take action, no way to inspect what happened. Non-deterministic output → deterministic pipeline. It breaks the moment reality gets messy.
|
|
16
|
+
- **Click anything you'd normally click.** All the buttons, lists, dashboards, keyboard shortcuts — they all still work. This is a real app, not a chat window pretending to be one.
|
|
17
|
+
- **Or just ask.** Type "reply to the email from Sara saying I'll be there by 3" into the agent. It opens the right thread, drafts the reply, and shows it to you for approval — exactly as if you'd done it by hand.
|
|
18
|
+
- **See what it sees.** Open an email, and the agent knows which one. Select a chart, and the agent knows which chart. Highlight a paragraph and hit Cmd+I, and the agent acts on just that paragraph.
|
|
19
|
+
- **Watch it work.** As the agent does things — opens views, edits drafts, runs reports — the UI updates in real time. You can stop it, redirect it, or take over with the mouse at any moment.
|
|
20
|
+
- **Steer it like a teammate.** Give feedback, queue another task, edit its instructions, audit what it did yesterday. It remembers, and it gets better at your workflows over time.
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Rung 2 — tools and a loop {#rung-two}
|
|
27
|
-
|
|
28
|
-
```ts
|
|
29
|
-
const loop = query({ prompt, tools });
|
|
30
|
-
for await (const msg of loop) {
|
|
31
|
-
if (msg.type === "tool_use") {
|
|
32
|
-
// run the tool, feed the result back into the loop
|
|
33
|
-
}
|
|
34
|
-
if (msg.type === "result") {
|
|
35
|
-
output = msg.text;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
```
|
|
22
|
+
That's the experience agent-native is designed for. Now here's why most products don't get there.
|
|
39
23
|
|
|
40
|
-
|
|
24
|
+
## Why most "AI apps" fall short {#the-ladder}
|
|
41
25
|
|
|
42
|
-
|
|
26
|
+
There's a progression most teams climb, and most stop one rung too early.
|
|
43
27
|
|
|
44
|
-
|
|
28
|
+
### Rung 1 — a single LLM call (the anti-pattern) {#rung-one}
|
|
45
29
|
|
|
46
|
-
|
|
30
|
+
A text box sends a prompt, the AI returns a string, and you display it. Maybe with a spinner. There's no way for the user to course-correct, no way for the AI to take action, no way to see what happened or why.
|
|
47
31
|
|
|
48
|
-
|
|
49
|
-
// actions/reply-to-email.ts
|
|
50
|
-
import { defineAction } from "@agent-native/core";
|
|
51
|
-
import { z } from "zod";
|
|
32
|
+
You see this everywhere: "AI features" that are basically a "Summarize" button bolted onto a SaaS product. They look impressive in demos and break the moment reality gets messy. That's not a product; that's a toy.
|
|
52
33
|
|
|
53
|
-
|
|
54
|
-
description: "Reply to an email thread",
|
|
55
|
-
schema: z.object({
|
|
56
|
-
emailId: z.string(),
|
|
57
|
-
body: z.string(),
|
|
58
|
-
}),
|
|
59
|
-
run: async ({ emailId, body }) => {
|
|
60
|
-
await db.replies.insert({ emailId, body });
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
```
|
|
34
|
+
### Rung 2 — a chat with tools {#rung-two}
|
|
64
35
|
|
|
65
|
-
|
|
66
|
-
// Anywhere in your React app
|
|
67
|
-
import { AgentSidebar } from "@agent-native/core/client";
|
|
36
|
+
Now the AI can _do things_. It has tools — "draft email," "search contacts," "run query" — and a chat interface where it works in front of you, showing tool calls and results as it goes. This is what Claude, ChatGPT, and Cursor look like under the hood.
|
|
68
37
|
|
|
69
|
-
|
|
70
|
-
```
|
|
38
|
+
This is a real step up. But on its own, it's still a chat window. There's no proper UI. No dashboards, no lists, no forms, no keyboard shortcuts, no team collaboration. If the AI gets confused, you're stuck retyping rather than just clicking the right button. Non-developers struggle to get real work done in this format.
|
|
71
39
|
|
|
72
|
-
|
|
73
|
-
// The same action, typesafe, from a button
|
|
74
|
-
const { mutate } = useActionMutation("replyToEmail");
|
|
40
|
+
### Rung 3 — agent + UI as equal partners {#rung-three}
|
|
75
41
|
|
|
76
|
-
|
|
77
|
-
Send Reply
|
|
78
|
-
</Button>;
|
|
79
|
-
```
|
|
42
|
+
This is agent-native. You add a real, full-featured app around the agent — and crucially, every action the agent can take is also a button in the UI, and every button the user clicks runs the same logic the agent uses. One implementation, two ways in.
|
|
80
43
|
|
|
81
|
-
|
|
44
|
+
Three things change when you reach rung 3:
|
|
82
45
|
|
|
83
|
-
|
|
46
|
+
- **You stopped adding buttons to a chatbot. You added an agent to an app.** That's a much higher-quality product on both sides.
|
|
47
|
+
- **The agent has real context.** It sees what you're looking at, what you've selected, what you just did. It writes to the same database the UI reads from, so its work shows up immediately.
|
|
48
|
+
- **External agents can use it too.** Other agent-native apps can call this one's actions over the [A2A protocol](/docs/a2a-protocol). Tools like Claude Desktop can drive it as an [MCP server](/docs/mcp-protocol). One app, many entry points.
|
|
84
49
|
|
|
85
50
|
That's rung 3. That's agent-native.
|
|
86
51
|
|
|
87
52
|
## Why every agent needs a UI {#why-every-agent-needs-a-ui}
|
|
88
53
|
|
|
89
|
-
The hot take
|
|
54
|
+
The hot take in 2026 is "apps are dead, agents will replace UIs, everyone will just text an agent in Telegram." That's wrong.
|
|
90
55
|
|
|
91
|
-
|
|
56
|
+
Even when the agent does all the heavy lifting, humans still need to:
|
|
92
57
|
|
|
93
|
-
- **See what it's doing** — progress,
|
|
58
|
+
- **See what it's doing** — progress, intermediate output, what it touched
|
|
94
59
|
- **Steer it** — give feedback, interrupt, queue the next task
|
|
95
60
|
- **Manage it** — edit its instructions, skills, memory, scheduled jobs, connected accounts
|
|
96
|
-
- **Inspect its work** — review drafts, audit
|
|
97
|
-
- **Share its output** — dashboards, reports, forms, links
|
|
61
|
+
- **Inspect its work** — review drafts, audit history, roll back mistakes
|
|
62
|
+
- **Share its output** — dashboards, reports, forms, links to send to teammates
|
|
98
63
|
|
|
99
|
-
At minimum, "a UI for the agent" is an observability
|
|
64
|
+
At minimum, "a UI for the agent" is an observability and management dashboard. At maximum, it's a full SaaS app with the agent embedded as a co-pilot. Both ends count as agent-native — see [Pure-Agent Apps](/docs/pure-agent-apps) for the minimal end and [Cloneable SaaS](/docs/cloneable-saas) for the maximal end.
|
|
100
65
|
|
|
101
66
|
## Why every app benefits from an agent {#why-every-app-benefits-from-an-agent}
|
|
102
67
|
|
|
103
|
-
The flip side is
|
|
68
|
+
The flip side is just as important. Existing SaaS products keep hitting the same wall: 80% of what you need works great, and 20% you just can't change. Adding a chat sidebar rarely fixes that — the chat usually can't actually _do_ the things the UI can.
|
|
104
69
|
|
|
105
|
-
Agent-native flips that. Because every action in the app is defined once and exposed as both a
|
|
70
|
+
Agent-native flips that. Because every action in the app is defined once and exposed as both a button and an agent tool, the agent can do everything the buttons can — and more — without a separate "AI world" to maintain. Natural language becomes a first-class input alongside clicks.
|
|
106
71
|
|
|
107
72
|
The argument isn't "agents replace UI." It's "**agents belong inside applications, with a UI on top, as equal partners**." Neither can stand alone.
|
|
108
73
|
|
|
@@ -114,22 +79,22 @@ This is the defining principle.
|
|
|
114
79
|
>
|
|
115
80
|
> **From the agent** — natural language, other agents via A2A, Slack, Telegram. The agent writes to the database; the UI updates automatically.
|
|
116
81
|
|
|
117
|
-
When the agent creates a draft email, it appears in the UI. When
|
|
82
|
+
When the agent creates a draft email, it appears in the UI. When you click "Send," the agent knows it was sent. There's no separate "agent world" and "UI world" — it's one system. See [Key Concepts](/docs/key-concepts) for the architecture that makes this work.
|
|
118
83
|
|
|
119
|
-
## Customization
|
|
84
|
+
## Customization usually reserved for power tools {#workspace-customization}
|
|
120
85
|
|
|
121
|
-
The reason tools like Claude Code
|
|
86
|
+
The reason tools like Claude Code feel so powerful isn't the model — it's the **customization layer**: per-project instructions, skills, memory, sub-agents, connected services. You can shape the agent to your codebase, your preferences, your team.
|
|
122
87
|
|
|
123
|
-
Agent-native
|
|
88
|
+
Agent-native gives every user that same customization layer — without ever leaving the app. Each app comes with a personal **workspace** where you (or anyone on your team) can:
|
|
124
89
|
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
90
|
+
- Edit team-wide rules everyone's agent reads
|
|
91
|
+
- Let the agent remember preferences automatically as you correct it
|
|
92
|
+
- Write reusable how-to guides as `/slash` commands
|
|
93
|
+
- Keep custom sub-agents for specific tasks (invoked with `@mentions`)
|
|
94
|
+
- Schedule jobs to run on a cron (e.g. "every Monday morning, summarize last week")
|
|
95
|
+
- Connect external services (Gmail, Stripe, Slack, internal APIs) via per-user MCP servers
|
|
131
96
|
|
|
132
|
-
The twist: it's
|
|
97
|
+
The twist: it's all stored in the database, not the filesystem. There's no dev environment to spin up, no container per user. Every user gets their own full workspace — personal memory, personal connections, personal skills — for essentially free, because it's all rows in a table. That's what makes Claude-Code-level flexibility viable inside a real multi-tenant SaaS product.
|
|
133
98
|
|
|
134
99
|
See [Workspace](/docs/workspace) for the full concept.
|
|
135
100
|
|
|
@@ -142,39 +107,22 @@ See [Workspace](/docs/workspace) for the full concept.
|
|
|
142
107
|
| **Claude Code / Codex for SaaS** | Great for devs on their own machines. Doesn't translate to multi-tenant SaaS — one codebase per user on a dev-box doesn't scale. |
|
|
143
108
|
| **Agent-native apps** | The agent is a first-class citizen. It shares the same database, the same state, and can do everything the UI can do — and vice versa. |
|
|
144
109
|
|
|
145
|
-
## What is agent-native development? {#what-is-agent-native-development}
|
|
146
|
-
|
|
147
|
-
Agent-native development means building with agents first. Projects are structured so any AI coding tool — Claude Code, Codex, Cursor, Windsurf, Builder.io — reads the same instructions and follows the same patterns.
|
|
148
|
-
|
|
149
|
-
The payoff: the agent tends to do _better_ than a human developer because you can encode rules like "when you add a feature, also add a skill for it" — the kind of thing humans skip when they're tired or rushed.
|
|
150
|
-
|
|
151
|
-
## Agents as first-class developers {#agents-as-first-class-developers}
|
|
152
|
-
|
|
153
|
-
In an agent-native project:
|
|
154
|
-
|
|
155
|
-
- **AGENTS.md** gives every AI coding tool the same instructions — Claude Code, Cursor, Windsurf, and others all read the same file
|
|
156
|
-
- **Skills** teach the agent patterns for specific tasks — adding features, storing data, wiring real-time sync
|
|
157
|
-
- **Agent PR reviewers** validate the four-area checklist, that skills were updated, and that code matches conventions
|
|
158
|
-
- **Auto-maintained docs and tests** — agents are instructed to keep docs current and tests passing
|
|
159
|
-
|
|
160
|
-
This is the shift from desktop-first to mobile-first applied to development. Mobile-first didn't mean "no desktop" — it meant designing for mobile constraints first. Agent-native development means designing for agent workflows first, then ensuring humans work effectively too.
|
|
161
|
-
|
|
162
110
|
## Whole-team development {#whole-team-development}
|
|
163
111
|
|
|
164
|
-
Agent-native
|
|
112
|
+
Agent-native isn't just for developers. Because the agent can edit the app's own code, evolving an app stops being a developer-only activity:
|
|
165
113
|
|
|
166
|
-
- **Designers** update designs directly in the
|
|
167
|
-
- **Product managers**
|
|
168
|
-
- **QA** tests and
|
|
114
|
+
- **Designers** update designs directly in the running app through the agent
|
|
115
|
+
- **Product managers** add functionality and update flows by describing them
|
|
116
|
+
- **QA** tests the app and asks the agent to fix what's broken
|
|
169
117
|
- **Anyone on the team** contributes through natural language
|
|
170
118
|
|
|
171
|
-
The vision:
|
|
119
|
+
The vision: fewer handoffs, one person doing the work of a small team.
|
|
172
120
|
|
|
173
121
|
## Fork and customize {#fork-and-customize}
|
|
174
122
|
|
|
175
123
|
Agent-native apps follow a fork-and-customize model. You start from a **cloneable SaaS** template — Mail, Calendar, Analytics, Slides, Clips, Forms, Dispatch — and make it yours:
|
|
176
124
|
|
|
177
|
-
1. Pick a template on [agent-native.com](/templates)
|
|
125
|
+
1. Pick a template on [agent-native.com/templates](/templates)
|
|
178
126
|
2. Use it immediately as a hosted app (e.g. mail.agent-native.com)
|
|
179
127
|
3. Fork it when you want to customize — "connect our Stripe account," "add a cohort chart"
|
|
180
128
|
4. The agent modifies the code to match your needs
|
|
@@ -184,14 +132,50 @@ Because it's _your_ app, not shared infrastructure, the agent can safely evolve
|
|
|
184
132
|
|
|
185
133
|
## Composable agents {#composable-agents}
|
|
186
134
|
|
|
187
|
-
Agent-native apps talk to each other
|
|
135
|
+
Agent-native apps can talk to each other. From inside the mail app, you can tag the analytics agent to query data and include the result in a draft email. The agents discover what other agents are available, hand off work between each other, and surface the results in the UI you're already in.
|
|
136
|
+
|
|
137
|
+
This is powered by [A2A](/docs/a2a-protocol) and [MCP](/docs/mcp-protocol) under the hood — same definition, multiple surfaces — but as a user, all you have to know is "I can ask any of my apps for help with anything any of them can do."
|
|
138
|
+
|
|
139
|
+
## What does this look like in code? {#what-does-it-look-like-in-code}
|
|
140
|
+
|
|
141
|
+
If you're building or extending an agent-native app, here's the central pattern: every operation in the app is an **action** — defined once, available to both the agent and the UI.
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
// actions/reply-to-email.ts
|
|
145
|
+
import { defineAction } from "@agent-native/core";
|
|
146
|
+
import { z } from "zod";
|
|
147
|
+
|
|
148
|
+
export default defineAction({
|
|
149
|
+
description: "Reply to an email thread",
|
|
150
|
+
schema: z.object({ emailId: z.string(), body: z.string() }),
|
|
151
|
+
run: async ({ emailId, body }) => {
|
|
152
|
+
await db.replies.insert({ emailId, body });
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
// In any React component — same action, called from a button
|
|
159
|
+
const { mutate } = useActionMutation("replyToEmail");
|
|
160
|
+
|
|
161
|
+
<Button onClick={() => mutate({ emailId, body: "Thanks!" })}>
|
|
162
|
+
Send Reply
|
|
163
|
+
</Button>;
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
// And the agent panel mounted anywhere in your app
|
|
168
|
+
import { AgentSidebar } from "@agent-native/core/client";
|
|
169
|
+
|
|
170
|
+
<AgentSidebar />;
|
|
171
|
+
```
|
|
188
172
|
|
|
189
|
-
|
|
173
|
+
One action, four surfaces: the agent calls it as a tool, the UI calls it as a typesafe mutation, external agents reach it over [A2A](/docs/a2a-protocol), and tools like Claude Desktop talk to it as an [MCP server](/docs/mcp-protocol). See [Actions](/docs/actions) for the full reference.
|
|
190
174
|
|
|
191
|
-
## What's next
|
|
175
|
+
## What's next {#whats-next}
|
|
192
176
|
|
|
177
|
+
- [**Getting Started**](/docs) — pick a template and run it
|
|
193
178
|
- [**Key Concepts**](/docs/key-concepts) — the architecture: SQL, actions, polling sync, context awareness, portability
|
|
194
179
|
- [**Cloneable SaaS**](/docs/cloneable-saas) — templates as complete products you own
|
|
195
180
|
- [**Workspace**](/docs/workspace) — the per-user customization layer (skills, memory, instructions, MCP)
|
|
196
181
|
- [**Drop-in Agent**](/docs/drop-in-agent) — mount `<AgentPanel>` into any React app
|
|
197
|
-
- [**Getting Started**](/docs) — scaffold your first app
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Framework for agent-native application development — where AI agents and UI share state via files",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"./server/ssr-handler": "./dist/server/ssr-handler.js",
|
|
27
27
|
"./server/agent-discovery": "./dist/server/agent-discovery.js",
|
|
28
28
|
"./server/request-context": "./dist/server/request-context.js",
|
|
29
|
+
"./server/design-token-utils": "./dist/server/design-token-utils.js",
|
|
29
30
|
"./db": "./dist/db/index.js",
|
|
30
31
|
"./db/schema": "./dist/db/schema.js",
|
|
31
32
|
"./db/drizzle-config": "./dist/db/drizzle-config.js",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"./sharing/actions/list-resource-shares": "./dist/sharing/actions/list-resource-shares.js",
|
|
55
56
|
"./sharing/actions/set-resource-visibility": "./dist/sharing/actions/set-resource-visibility.js",
|
|
56
57
|
"./client/sharing": "./dist/client/sharing/index.js",
|
|
58
|
+
"./client/tools": "./dist/client/tools/index.js",
|
|
57
59
|
"./client/transcription/use-live-transcription": "./dist/client/transcription/use-live-transcription.js",
|
|
58
60
|
"./client/transcription/BuilderTranscriptionCta": "./dist/client/transcription/BuilderTranscriptionCta.js",
|
|
59
61
|
"./transcription/builder": "./dist/transcription/builder-transcription.js",
|
|
@@ -123,6 +125,7 @@
|
|
|
123
125
|
"drizzle-orm": "^0.45.2",
|
|
124
126
|
"h3": "^2.0.1-rc.20",
|
|
125
127
|
"isbot": "^5",
|
|
128
|
+
"jiti": "^2.6.1",
|
|
126
129
|
"jose": "^6.2.2",
|
|
127
130
|
"minimatch": "^10.0.0",
|
|
128
131
|
"nanoid": "^5.1.9",
|
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
Scripts,
|
|
6
6
|
ScrollRestoration,
|
|
7
7
|
isRouteErrorResponse,
|
|
8
|
+
Link,
|
|
9
|
+
useRouteError,
|
|
8
10
|
} from "react-router";
|
|
9
|
-
import { useState } from "react";
|
|
11
|
+
import { useEffect, useState } from "react";
|
|
10
12
|
import {
|
|
11
13
|
QueryClient,
|
|
12
14
|
QueryClientProvider,
|
|
@@ -81,17 +83,41 @@ export default function Root() {
|
|
|
81
83
|
);
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
function useApplyThemeClass() {
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
const root = document.documentElement;
|
|
89
|
+
if (root.classList.contains("dark") || root.classList.contains("light"))
|
|
90
|
+
return;
|
|
91
|
+
try {
|
|
92
|
+
const stored = localStorage.getItem("theme");
|
|
93
|
+
if (stored === "dark") {
|
|
94
|
+
root.classList.add("dark");
|
|
95
|
+
} else if (stored === "light") {
|
|
96
|
+
root.classList.add("light");
|
|
97
|
+
} else if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
|
98
|
+
root.classList.add("dark");
|
|
99
|
+
}
|
|
100
|
+
} catch {}
|
|
101
|
+
}, []);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ErrorBoundary() {
|
|
105
|
+
useApplyThemeClass();
|
|
106
|
+
const error = useRouteError();
|
|
107
|
+
let status: number | null = null;
|
|
108
|
+
let title = "Something went wrong";
|
|
86
109
|
let details = "An unexpected error occurred.";
|
|
87
110
|
let stack: string | undefined;
|
|
88
111
|
|
|
89
112
|
if (isRouteErrorResponse(error)) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
113
|
+
status = error.status;
|
|
114
|
+
if (error.status === 404) {
|
|
115
|
+
title = "Page not found";
|
|
116
|
+
details = "This page doesn't exist. It may have been moved or deleted.";
|
|
117
|
+
} else {
|
|
118
|
+
title = `${error.status} Error`;
|
|
119
|
+
details = error.statusText || details;
|
|
120
|
+
}
|
|
95
121
|
} else if (
|
|
96
122
|
typeof process !== "undefined" &&
|
|
97
123
|
process.env.NODE_ENV !== "production" &&
|
|
@@ -102,12 +128,23 @@ export function ErrorBoundary({ error }: { error: unknown }) {
|
|
|
102
128
|
}
|
|
103
129
|
|
|
104
130
|
return (
|
|
105
|
-
<main className="flex items-center justify-center min-h-screen p-4">
|
|
106
|
-
<div className="text-center">
|
|
107
|
-
|
|
108
|
-
|
|
131
|
+
<main className="flex items-center justify-center min-h-screen p-4 bg-background text-foreground">
|
|
132
|
+
<div className="flex flex-col items-center text-center max-w-md">
|
|
133
|
+
{status && (
|
|
134
|
+
<span className="text-7xl font-bold tracking-tight text-muted-foreground/40">
|
|
135
|
+
{status}
|
|
136
|
+
</span>
|
|
137
|
+
)}
|
|
138
|
+
<h1 className="mt-3 text-2xl font-semibold">{title}</h1>
|
|
139
|
+
<p className="mt-2 text-muted-foreground text-sm">{details}</p>
|
|
140
|
+
<Link
|
|
141
|
+
to="/"
|
|
142
|
+
className="mt-6 inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm hover:bg-primary/90 cursor-pointer"
|
|
143
|
+
>
|
|
144
|
+
Go home
|
|
145
|
+
</Link>
|
|
109
146
|
{stack && (
|
|
110
|
-
<pre className="mt-
|
|
147
|
+
<pre className="mt-6 w-full text-left text-xs overflow-auto p-4 bg-muted rounded">
|
|
111
148
|
<code>{stack}</code>
|
|
112
149
|
</pre>
|
|
113
150
|
)}
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Integrations"
|
|
3
|
-
description: "Connect your agent to Slack, Telegram, WhatsApp, and other messaging platforms."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Integrations
|
|
7
|
-
|
|
8
|
-
Connect your agent to messaging platforms so you can chat with it from Slack, Telegram, WhatsApp, and more. Same agent, same tools, same thread history.
|
|
9
|
-
|
|
10
|
-
## Overview {#overview}
|
|
11
|
-
|
|
12
|
-
Messaging integrations let users talk to their agent from the platforms they already use. Instead of opening the web UI, you send a message in Slack or Telegram and the agent responds right there. It has access to the same actions, the same database, and the same conversation history as the web chat.
|
|
13
|
-
|
|
14
|
-
Each integration works through webhooks. The messaging platform sends incoming messages to your app, the agent processes them, and the response is posted back. No polling, no long-lived connections — just standard HTTP webhooks.
|
|
15
|
-
|
|
16
|
-
## How it works {#how-it-works}
|
|
17
|
-
|
|
18
|
-
The flow for every platform follows the same pattern:
|
|
19
|
-
|
|
20
|
-
1. A user sends a message on the external platform (Slack, Telegram, etc.)
|
|
21
|
-
2. The platform delivers the message to your app via a webhook at `/_agent-native/integrations/<platform>/webhook`
|
|
22
|
-
3. The integrations plugin validates the request, extracts the message text and thread context, and maps it to an internal conversation thread
|
|
23
|
-
4. The agent processes the message in the background using the same pipeline as the web chat — same system prompt, same actions, same tools
|
|
24
|
-
5. The response is posted back to the external platform in the same thread
|
|
25
|
-
|
|
26
|
-
`User (Slack/Telegram/WhatsApp)` → `Webhook` → `Agent Processing` → `Response posted back`
|
|
27
|
-
|
|
28
|
-
## Setup {#setup}
|
|
29
|
-
|
|
30
|
-
The integrations plugin auto-mounts when no custom version exists in your template. To customize it, create a plugin file:
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
// server/plugins/integrations.ts
|
|
34
|
-
import { createIntegrationsPlugin } from "@agent-native/core/server";
|
|
35
|
-
import { scriptRegistry } from "../../agent.config";
|
|
36
|
-
|
|
37
|
-
export default createIntegrationsPlugin({
|
|
38
|
-
actions: scriptRegistry,
|
|
39
|
-
systemPrompt: "You are a helpful assistant...",
|
|
40
|
-
});
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
The plugin registers webhook routes for each enabled platform under `/_agent-native/integrations/`. Which platforms are active depends on which environment variables are configured.
|
|
44
|
-
|
|
45
|
-
## Slack {#slack}
|
|
46
|
-
|
|
47
|
-
### 1. Create a Slack app
|
|
48
|
-
|
|
49
|
-
Go to [api.slack.com/apps](https://api.slack.com/apps) and create a new app. Under **OAuth & Permissions**, add the following bot token scopes:
|
|
50
|
-
|
|
51
|
-
- `chat:write` — send messages
|
|
52
|
-
- `app_mentions:read` — receive @-mentions (optional)
|
|
53
|
-
|
|
54
|
-
### 2. Enable Event Subscriptions
|
|
55
|
-
|
|
56
|
-
Under **Event Subscriptions**, set the Request URL to:
|
|
57
|
-
|
|
58
|
-
```text
|
|
59
|
-
https://your-app.example.com/_agent-native/integrations/slack/webhook
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Subscribe to the `message.im` bot event (and optionally `app_mention` for channel mentions).
|
|
63
|
-
|
|
64
|
-
### 3. Set environment variables
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
SLACK_BOT_TOKEN=xoxb-your-bot-token
|
|
68
|
-
SLACK_SIGNING_SECRET=your-signing-secret
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
The bot token is found under **OAuth & Permissions** after installing the app to your workspace. The signing secret is under **Basic Information**.
|
|
72
|
-
|
|
73
|
-
## Telegram {#telegram}
|
|
74
|
-
|
|
75
|
-
### 1. Create a bot
|
|
76
|
-
|
|
77
|
-
Message [@BotFather](https://t.me/BotFather) on Telegram and use the `/newbot` command. You will receive a bot token.
|
|
78
|
-
|
|
79
|
-
### 2. Set environment variables
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
TELEGRAM_BOT_TOKEN=your-bot-token
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### 3. Register the webhook
|
|
86
|
-
|
|
87
|
-
After deploying your app, call the setup endpoint to register the webhook with Telegram:
|
|
88
|
-
|
|
89
|
-
```text
|
|
90
|
-
// The integrations plugin exposes a setup endpoint
|
|
91
|
-
POST /_agent-native/integrations/telegram/setup
|
|
92
|
-
|
|
93
|
-
// This calls Telegram's setWebhook API pointing to:
|
|
94
|
-
// https://your-app.example.com/_agent-native/integrations/telegram/webhook
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
You can also register the webhook manually using the Telegram Bot API if you prefer.
|
|
98
|
-
|
|
99
|
-
## WhatsApp {#whatsapp}
|
|
100
|
-
|
|
101
|
-
### 1. Set up the WhatsApp Cloud API
|
|
102
|
-
|
|
103
|
-
Go to the [Meta Developer Portal](https://developers.facebook.com/), create an app, and enable the WhatsApp product. Configure a phone number for your business.
|
|
104
|
-
|
|
105
|
-
### 2. Set environment variables
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
WHATSAPP_ACCESS_TOKEN=your-access-token
|
|
109
|
-
WHATSAPP_VERIFY_TOKEN=your-verify-token
|
|
110
|
-
WHATSAPP_PHONE_NUMBER_ID=your-phone-number-id
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
The verify token is a string you choose — Meta uses it during webhook verification. The access token and phone number ID come from the Meta Developer Portal.
|
|
114
|
-
|
|
115
|
-
### 3. Configure the webhook
|
|
116
|
-
|
|
117
|
-
In the Meta Developer Portal, set the webhook URL to:
|
|
118
|
-
|
|
119
|
-
```text
|
|
120
|
-
https://your-app.example.com/_agent-native/integrations/whatsapp/webhook
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Subscribe to the `messages` webhook field.
|
|
124
|
-
|
|
125
|
-
## Configuration {#configuration}
|
|
126
|
-
|
|
127
|
-
Integrations can be managed from the settings UI in the sidebar. Each platform shows its connection status and webhook URL. You can enable/disable individual integrations without removing environment variables.
|
|
128
|
-
|
|
129
|
-
The webhook URLs follow a consistent pattern:
|
|
130
|
-
|
|
131
|
-
```text
|
|
132
|
-
/_agent-native/integrations/<platform>/webhook
|
|
133
|
-
|
|
134
|
-
# Examples:
|
|
135
|
-
/_agent-native/integrations/slack/webhook
|
|
136
|
-
/_agent-native/integrations/telegram/webhook
|
|
137
|
-
/_agent-native/integrations/whatsapp/webhook
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Thread continuity {#thread-continuity}
|
|
141
|
-
|
|
142
|
-
Conversations from external platforms are mapped to internal threads. Each Slack DM, Telegram chat, or WhatsApp conversation becomes a persistent thread in the agent-native database. This means:
|
|
143
|
-
|
|
144
|
-
- The agent retains context across messages in the same external conversation
|
|
145
|
-
- External conversations appear in the web UI alongside web-originated threads, tagged with their source platform
|
|
146
|
-
- You can continue a conversation that started in Slack from the web UI, or vice versa
|
|
147
|
-
|
|
148
|
-
## Custom adapters {#custom-adapters}
|
|
149
|
-
|
|
150
|
-
To add support for a new messaging platform, implement the `PlatformAdapter` interface:
|
|
151
|
-
|
|
152
|
-
```ts
|
|
153
|
-
import type { PlatformAdapter } from "@agent-native/core/server";
|
|
154
|
-
|
|
155
|
-
const myAdapter: PlatformAdapter = {
|
|
156
|
-
platform: "discord",
|
|
157
|
-
|
|
158
|
-
// Verify the incoming webhook request is authentic
|
|
159
|
-
verifyRequest(request: Request): Promise<boolean> {
|
|
160
|
-
// Validate signature headers
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
// Extract the message text and thread context from the webhook payload
|
|
164
|
-
parseMessage(body: unknown): Promise<{
|
|
165
|
-
text: string;
|
|
166
|
-
threadId: string;
|
|
167
|
-
senderId: string;
|
|
168
|
-
metadata?: Record<string, unknown>;
|
|
169
|
-
}> {
|
|
170
|
-
// Parse platform-specific payload
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
// Send the agent's response back to the platform
|
|
174
|
-
sendResponse(threadId: string, text: string): Promise<void> {
|
|
175
|
-
// Call the platform's API to post the message
|
|
176
|
-
},
|
|
177
|
-
};
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Register your adapter in the integrations plugin config:
|
|
181
|
-
|
|
182
|
-
```ts
|
|
183
|
-
export default createIntegrationsPlugin({
|
|
184
|
-
actions: scriptRegistry,
|
|
185
|
-
systemPrompt: "You are a helpful assistant...",
|
|
186
|
-
adapters: [myAdapter],
|
|
187
|
-
});
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
## Security {#security}
|
|
191
|
-
|
|
192
|
-
Every incoming webhook is verified before processing:
|
|
193
|
-
|
|
194
|
-
- **Slack** — HMAC-SHA256 signature verification using `SLACK_SIGNING_SECRET`. The `X-Slack-Signature` header is checked against the request body.
|
|
195
|
-
- **Telegram** — requests are validated by checking the secret token set during webhook registration via the Telegram Bot API.
|
|
196
|
-
- **WhatsApp** — Meta's webhook verification challenge (using `WHATSAPP_VERIFY_TOKEN`) and payload signature validation.
|
|
197
|
-
|
|
198
|
-
All platform credentials (tokens, secrets) are stored as environment variables and never persisted in the database or source code. Use the settings UI or your deployment platform's env var management to configure them.
|