@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.
Files changed (381) hide show
  1. package/dist/a2a/client.d.ts +44 -1
  2. package/dist/a2a/client.d.ts.map +1 -1
  3. package/dist/a2a/client.js +88 -11
  4. package/dist/a2a/client.js.map +1 -1
  5. package/dist/a2a/handlers.d.ts +10 -0
  6. package/dist/a2a/handlers.d.ts.map +1 -1
  7. package/dist/a2a/handlers.js +287 -62
  8. package/dist/a2a/handlers.js.map +1 -1
  9. package/dist/a2a/server.d.ts.map +1 -1
  10. package/dist/a2a/server.js +95 -17
  11. package/dist/a2a/server.js.map +1 -1
  12. package/dist/a2a/task-store.d.ts +11 -1
  13. package/dist/a2a/task-store.d.ts.map +1 -1
  14. package/dist/a2a/task-store.js +38 -2
  15. package/dist/a2a/task-store.js.map +1 -1
  16. package/dist/agent/engine/builder-engine.d.ts +1 -1
  17. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  18. package/dist/agent/engine/builder-engine.js +7 -25
  19. package/dist/agent/engine/builder-engine.js.map +1 -1
  20. package/dist/agent/engine/builtin.js +1 -1
  21. package/dist/agent/engine/builtin.js.map +1 -1
  22. package/dist/chat-threads/store.d.ts +3 -0
  23. package/dist/chat-threads/store.d.ts.map +1 -1
  24. package/dist/chat-threads/store.js +32 -0
  25. package/dist/chat-threads/store.js.map +1 -1
  26. package/dist/cli/templates-meta.d.ts.map +1 -1
  27. package/dist/cli/templates-meta.js +11 -0
  28. package/dist/cli/templates-meta.js.map +1 -1
  29. package/dist/client/AgentPanel.d.ts +3 -1
  30. package/dist/client/AgentPanel.d.ts.map +1 -1
  31. package/dist/client/AgentPanel.js +21 -10
  32. package/dist/client/AgentPanel.js.map +1 -1
  33. package/dist/client/AgentTaskCard.d.ts.map +1 -1
  34. package/dist/client/AgentTaskCard.js +2 -0
  35. package/dist/client/AgentTaskCard.js.map +1 -1
  36. package/dist/client/AssistantChat.d.ts +2 -0
  37. package/dist/client/AssistantChat.d.ts.map +1 -1
  38. package/dist/client/AssistantChat.js +111 -75
  39. package/dist/client/AssistantChat.js.map +1 -1
  40. package/dist/client/ErrorBoundary.d.ts +1 -3
  41. package/dist/client/ErrorBoundary.d.ts.map +1 -1
  42. package/dist/client/ErrorBoundary.js +37 -9
  43. package/dist/client/ErrorBoundary.js.map +1 -1
  44. package/dist/client/FeedbackButton.d.ts.map +1 -1
  45. package/dist/client/FeedbackButton.js +4 -3
  46. package/dist/client/FeedbackButton.js.map +1 -1
  47. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  48. package/dist/client/MultiTabAssistantChat.js +145 -49
  49. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  50. package/dist/client/agent-chat.d.ts +11 -0
  51. package/dist/client/agent-chat.d.ts.map +1 -1
  52. package/dist/client/agent-chat.js +1 -1
  53. package/dist/client/agent-chat.js.map +1 -1
  54. package/dist/client/components/AgentPresenceChip.d.ts +12 -0
  55. package/dist/client/components/AgentPresenceChip.d.ts.map +1 -0
  56. package/dist/client/components/AgentPresenceChip.js +42 -0
  57. package/dist/client/components/AgentPresenceChip.js.map +1 -0
  58. package/dist/client/components/PresenceBar.d.ts +17 -0
  59. package/dist/client/components/PresenceBar.d.ts.map +1 -0
  60. package/dist/client/components/PresenceBar.js +118 -0
  61. package/dist/client/components/PresenceBar.js.map +1 -0
  62. package/dist/client/composer/ComposerPlusMenu.d.ts +6 -1
  63. package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -1
  64. package/dist/client/composer/ComposerPlusMenu.js +22 -83
  65. package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
  66. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  67. package/dist/client/composer/TiptapComposer.js +237 -16
  68. package/dist/client/composer/TiptapComposer.js.map +1 -1
  69. package/dist/client/composer/types.d.ts +1 -0
  70. package/dist/client/composer/types.d.ts.map +1 -1
  71. package/dist/client/composer/useVoiceDictation.d.ts +2 -0
  72. package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
  73. package/dist/client/composer/useVoiceDictation.js +85 -10
  74. package/dist/client/composer/useVoiceDictation.js.map +1 -1
  75. package/dist/client/index.d.ts +3 -0
  76. package/dist/client/index.d.ts.map +1 -1
  77. package/dist/client/index.js +5 -0
  78. package/dist/client/index.js.map +1 -1
  79. package/dist/client/org/RequireActiveOrg.d.ts.map +1 -1
  80. package/dist/client/org/RequireActiveOrg.js +15 -10
  81. package/dist/client/org/RequireActiveOrg.js.map +1 -1
  82. package/dist/client/org/TeamPage.d.ts.map +1 -1
  83. package/dist/client/org/TeamPage.js +125 -4
  84. package/dist/client/org/TeamPage.js.map +1 -1
  85. package/dist/client/org/hooks.d.ts +30 -0
  86. package/dist/client/org/hooks.d.ts.map +1 -1
  87. package/dist/client/org/hooks.js +65 -0
  88. package/dist/client/org/hooks.js.map +1 -1
  89. package/dist/client/org/index.d.ts +2 -2
  90. package/dist/client/org/index.d.ts.map +1 -1
  91. package/dist/client/org/index.js +1 -1
  92. package/dist/client/org/index.js.map +1 -1
  93. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  94. package/dist/client/resources/ResourcesPanel.js +5 -1
  95. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  96. package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
  97. package/dist/client/settings/AutomationsSection.js +1 -0
  98. package/dist/client/settings/AutomationsSection.js.map +1 -1
  99. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  100. package/dist/client/settings/SettingsPanel.js +24 -11
  101. package/dist/client/settings/SettingsPanel.js.map +1 -1
  102. package/dist/client/sse-event-processor.d.ts.map +1 -1
  103. package/dist/client/sse-event-processor.js +10 -0
  104. package/dist/client/sse-event-processor.js.map +1 -1
  105. package/dist/client/tools/ToolEditor.d.ts +5 -0
  106. package/dist/client/tools/ToolEditor.d.ts.map +1 -0
  107. package/dist/client/tools/ToolEditor.js +98 -0
  108. package/dist/client/tools/ToolEditor.js.map +1 -0
  109. package/dist/client/tools/ToolViewer.d.ts +5 -0
  110. package/dist/client/tools/ToolViewer.d.ts.map +1 -0
  111. package/dist/client/tools/ToolViewer.js +309 -0
  112. package/dist/client/tools/ToolViewer.js.map +1 -0
  113. package/dist/client/tools/ToolViewerPage.d.ts +2 -0
  114. package/dist/client/tools/ToolViewerPage.d.ts.map +1 -0
  115. package/dist/client/tools/ToolViewerPage.js +23 -0
  116. package/dist/client/tools/ToolViewerPage.js.map +1 -0
  117. package/dist/client/tools/ToolsListPage.d.ts +2 -0
  118. package/dist/client/tools/ToolsListPage.d.ts.map +1 -0
  119. package/dist/client/tools/ToolsListPage.js +72 -0
  120. package/dist/client/tools/ToolsListPage.js.map +1 -0
  121. package/dist/client/tools/ToolsSidebarSection.d.ts +2 -0
  122. package/dist/client/tools/ToolsSidebarSection.d.ts.map +1 -0
  123. package/dist/client/tools/ToolsSidebarSection.js +188 -0
  124. package/dist/client/tools/ToolsSidebarSection.js.map +1 -0
  125. package/dist/client/tools/index.d.ts +6 -0
  126. package/dist/client/tools/index.d.ts.map +1 -0
  127. package/dist/client/tools/index.js +6 -0
  128. package/dist/client/tools/index.js.map +1 -0
  129. package/dist/client/use-chat-threads.d.ts +1 -0
  130. package/dist/client/use-chat-threads.d.ts.map +1 -1
  131. package/dist/client/use-chat-threads.js +29 -0
  132. package/dist/client/use-chat-threads.js.map +1 -1
  133. package/dist/client/use-db-sync.js +6 -6
  134. package/dist/client/use-db-sync.js.map +1 -1
  135. package/dist/collab/agent-identity.d.ts +15 -0
  136. package/dist/collab/agent-identity.d.ts.map +1 -0
  137. package/dist/collab/agent-identity.js +14 -0
  138. package/dist/collab/agent-identity.js.map +1 -0
  139. package/dist/collab/agent-presence.d.ts +59 -0
  140. package/dist/collab/agent-presence.d.ts.map +1 -0
  141. package/dist/collab/agent-presence.js +165 -0
  142. package/dist/collab/agent-presence.js.map +1 -0
  143. package/dist/collab/awareness.d.ts +7 -0
  144. package/dist/collab/awareness.d.ts.map +1 -1
  145. package/dist/collab/awareness.js +2 -2
  146. package/dist/collab/awareness.js.map +1 -1
  147. package/dist/collab/client-struct.d.ts +43 -0
  148. package/dist/collab/client-struct.d.ts.map +1 -0
  149. package/dist/collab/client-struct.js +272 -0
  150. package/dist/collab/client-struct.js.map +1 -0
  151. package/dist/collab/client.d.ts +2 -0
  152. package/dist/collab/client.d.ts.map +1 -1
  153. package/dist/collab/client.js +15 -1
  154. package/dist/collab/client.js.map +1 -1
  155. package/dist/collab/index.d.ts +6 -1
  156. package/dist/collab/index.d.ts.map +1 -1
  157. package/dist/collab/index.js +11 -1
  158. package/dist/collab/index.js.map +1 -1
  159. package/dist/collab/json-to-yjs.d.ts +72 -0
  160. package/dist/collab/json-to-yjs.d.ts.map +1 -0
  161. package/dist/collab/json-to-yjs.js +456 -0
  162. package/dist/collab/json-to-yjs.js.map +1 -0
  163. package/dist/collab/struct-routes.d.ts +52 -0
  164. package/dist/collab/struct-routes.d.ts.map +1 -0
  165. package/dist/collab/struct-routes.js +74 -0
  166. package/dist/collab/struct-routes.js.map +1 -0
  167. package/dist/collab/ydoc-manager.d.ts +19 -0
  168. package/dist/collab/ydoc-manager.d.ts.map +1 -1
  169. package/dist/collab/ydoc-manager.js +49 -0
  170. package/dist/collab/ydoc-manager.js.map +1 -1
  171. package/dist/deploy/build.js +1 -1
  172. package/dist/file-upload/builder.d.ts.map +1 -1
  173. package/dist/file-upload/builder.js +2 -1
  174. package/dist/file-upload/builder.js.map +1 -1
  175. package/dist/integrations/adapters/email.d.ts +17 -0
  176. package/dist/integrations/adapters/email.d.ts.map +1 -0
  177. package/dist/integrations/adapters/email.js +620 -0
  178. package/dist/integrations/adapters/email.js.map +1 -0
  179. package/dist/integrations/adapters/telegram.d.ts.map +1 -1
  180. package/dist/integrations/adapters/telegram.js +19 -3
  181. package/dist/integrations/adapters/telegram.js.map +1 -1
  182. package/dist/integrations/index.d.ts +1 -0
  183. package/dist/integrations/index.d.ts.map +1 -1
  184. package/dist/integrations/index.js +1 -0
  185. package/dist/integrations/index.js.map +1 -1
  186. package/dist/integrations/internal-token.d.ts +18 -0
  187. package/dist/integrations/internal-token.d.ts.map +1 -0
  188. package/dist/integrations/internal-token.js +86 -0
  189. package/dist/integrations/internal-token.js.map +1 -0
  190. package/dist/integrations/pending-tasks-retry-job.d.ts +15 -0
  191. package/dist/integrations/pending-tasks-retry-job.d.ts.map +1 -0
  192. package/dist/integrations/pending-tasks-retry-job.js +199 -0
  193. package/dist/integrations/pending-tasks-retry-job.js.map +1 -0
  194. package/dist/integrations/pending-tasks-store.d.ts +40 -0
  195. package/dist/integrations/pending-tasks-store.d.ts.map +1 -0
  196. package/dist/integrations/pending-tasks-store.js +151 -0
  197. package/dist/integrations/pending-tasks-store.js.map +1 -0
  198. package/dist/integrations/plugin.d.ts.map +1 -1
  199. package/dist/integrations/plugin.js +151 -9
  200. package/dist/integrations/plugin.js.map +1 -1
  201. package/dist/integrations/task-queue-stats.d.ts +22 -0
  202. package/dist/integrations/task-queue-stats.d.ts.map +1 -0
  203. package/dist/integrations/task-queue-stats.js +117 -0
  204. package/dist/integrations/task-queue-stats.js.map +1 -0
  205. package/dist/integrations/types.d.ts +2 -0
  206. package/dist/integrations/types.d.ts.map +1 -1
  207. package/dist/integrations/webhook-handler.d.ts +23 -4
  208. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  209. package/dist/integrations/webhook-handler.js +217 -59
  210. package/dist/integrations/webhook-handler.js.map +1 -1
  211. package/dist/mcp-client/manager.d.ts +3 -0
  212. package/dist/mcp-client/manager.d.ts.map +1 -1
  213. package/dist/mcp-client/manager.js +5 -0
  214. package/dist/mcp-client/manager.js.map +1 -1
  215. package/dist/oauth-tokens/google-refresh.d.ts.map +1 -1
  216. package/dist/oauth-tokens/google-refresh.js +6 -0
  217. package/dist/oauth-tokens/google-refresh.js.map +1 -1
  218. package/dist/onboarding/default-steps.d.ts.map +1 -1
  219. package/dist/onboarding/default-steps.js +10 -3
  220. package/dist/onboarding/default-steps.js.map +1 -1
  221. package/dist/org/context.d.ts +35 -0
  222. package/dist/org/context.d.ts.map +1 -1
  223. package/dist/org/context.js +136 -0
  224. package/dist/org/context.js.map +1 -1
  225. package/dist/org/handlers.d.ts +76 -0
  226. package/dist/org/handlers.d.ts.map +1 -1
  227. package/dist/org/handlers.js +411 -2
  228. package/dist/org/handlers.js.map +1 -1
  229. package/dist/org/index.d.ts +2 -2
  230. package/dist/org/index.d.ts.map +1 -1
  231. package/dist/org/index.js +2 -2
  232. package/dist/org/index.js.map +1 -1
  233. package/dist/org/migrations.d.ts.map +1 -1
  234. package/dist/org/migrations.js +8 -0
  235. package/dist/org/migrations.js.map +1 -1
  236. package/dist/org/plugin.d.ts +6 -0
  237. package/dist/org/plugin.d.ts.map +1 -1
  238. package/dist/org/plugin.js +71 -7
  239. package/dist/org/plugin.js.map +1 -1
  240. package/dist/org/schema.d.ts +38 -0
  241. package/dist/org/schema.d.ts.map +1 -1
  242. package/dist/org/schema.js +2 -0
  243. package/dist/org/schema.js.map +1 -1
  244. package/dist/org/types.d.ts +7 -0
  245. package/dist/org/types.d.ts.map +1 -1
  246. package/dist/scripts/call-agent.d.ts.map +1 -1
  247. package/dist/scripts/call-agent.js +90 -18
  248. package/dist/scripts/call-agent.js.map +1 -1
  249. package/dist/scripts/db/index.d.ts.map +1 -1
  250. package/dist/scripts/db/index.js +2 -0
  251. package/dist/scripts/db/index.js.map +1 -1
  252. package/dist/scripts/db/migrate-user-api-keys.d.ts +24 -0
  253. package/dist/scripts/db/migrate-user-api-keys.d.ts.map +1 -0
  254. package/dist/scripts/db/migrate-user-api-keys.js +224 -0
  255. package/dist/scripts/db/migrate-user-api-keys.js.map +1 -0
  256. package/dist/scripts/db/wipe-leaked-builder-keys.d.ts +27 -0
  257. package/dist/scripts/db/wipe-leaked-builder-keys.d.ts.map +1 -0
  258. package/dist/scripts/db/wipe-leaked-builder-keys.js +163 -0
  259. package/dist/scripts/db/wipe-leaked-builder-keys.js.map +1 -0
  260. package/dist/secrets/register-framework-secrets.d.ts +5 -0
  261. package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
  262. package/dist/secrets/register-framework-secrets.js +7 -44
  263. package/dist/secrets/register-framework-secrets.js.map +1 -1
  264. package/dist/secrets/substitution.d.ts.map +1 -1
  265. package/dist/secrets/substitution.js +14 -2
  266. package/dist/secrets/substitution.js.map +1 -1
  267. package/dist/server/action-discovery.d.ts.map +1 -1
  268. package/dist/server/action-discovery.js +39 -0
  269. package/dist/server/action-discovery.js.map +1 -1
  270. package/dist/server/action-routes.js +1 -1
  271. package/dist/server/action-routes.js.map +1 -1
  272. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  273. package/dist/server/agent-chat-plugin.js +192 -45
  274. package/dist/server/agent-chat-plugin.js.map +1 -1
  275. package/dist/server/auth.d.ts +14 -0
  276. package/dist/server/auth.d.ts.map +1 -1
  277. package/dist/server/auth.js +232 -17
  278. package/dist/server/auth.js.map +1 -1
  279. package/dist/server/builder-browser.d.ts +1 -1
  280. package/dist/server/builder-browser.d.ts.map +1 -1
  281. package/dist/server/builder-browser.js +12 -12
  282. package/dist/server/builder-browser.js.map +1 -1
  283. package/dist/server/collab-plugin.d.ts +4 -0
  284. package/dist/server/collab-plugin.d.ts.map +1 -1
  285. package/dist/server/collab-plugin.js +30 -4
  286. package/dist/server/collab-plugin.js.map +1 -1
  287. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  288. package/dist/server/core-routes-plugin.js +106 -100
  289. package/dist/server/core-routes-plugin.js.map +1 -1
  290. package/dist/server/credential-provider.d.ts +43 -2
  291. package/dist/server/credential-provider.d.ts.map +1 -1
  292. package/dist/server/credential-provider.js +115 -2
  293. package/dist/server/credential-provider.js.map +1 -1
  294. package/dist/server/design-token-utils.d.ts +132 -0
  295. package/dist/server/design-token-utils.d.ts.map +1 -0
  296. package/dist/server/design-token-utils.js +714 -0
  297. package/dist/server/design-token-utils.js.map +1 -0
  298. package/dist/server/email.d.ts +10 -0
  299. package/dist/server/email.d.ts.map +1 -1
  300. package/dist/server/email.js +63 -16
  301. package/dist/server/email.js.map +1 -1
  302. package/dist/server/framework-request-handler.d.ts.map +1 -1
  303. package/dist/server/framework-request-handler.js +38 -3
  304. package/dist/server/framework-request-handler.js.map +1 -1
  305. package/dist/server/google-oauth.d.ts +18 -1
  306. package/dist/server/google-oauth.d.ts.map +1 -1
  307. package/dist/server/google-oauth.js +21 -4
  308. package/dist/server/google-oauth.js.map +1 -1
  309. package/dist/server/index.d.ts +3 -3
  310. package/dist/server/index.d.ts.map +1 -1
  311. package/dist/server/index.js +3 -3
  312. package/dist/server/index.js.map +1 -1
  313. package/dist/server/onboarding-html.d.ts.map +1 -1
  314. package/dist/server/onboarding-html.js +14 -1
  315. package/dist/server/onboarding-html.js.map +1 -1
  316. package/dist/server/transcribe-voice.d.ts.map +1 -1
  317. package/dist/server/transcribe-voice.js +89 -24
  318. package/dist/server/transcribe-voice.js.map +1 -1
  319. package/dist/sharing/schema.d.ts +1 -1
  320. package/dist/styles/agent-native.css +5 -0
  321. package/dist/templates/default/app/root.tsx +50 -13
  322. package/dist/templates/default/react-router.config.ts +3 -0
  323. package/dist/terminal/terminal-plugin.d.ts.map +1 -1
  324. package/dist/terminal/terminal-plugin.js +23 -3
  325. package/dist/terminal/terminal-plugin.js.map +1 -1
  326. package/dist/tools/actions.d.ts +3 -0
  327. package/dist/tools/actions.d.ts.map +1 -0
  328. package/dist/tools/actions.js +140 -0
  329. package/dist/tools/actions.js.map +1 -0
  330. package/dist/tools/fetch-tool.js +1 -1
  331. package/dist/tools/fetch-tool.js.map +1 -1
  332. package/dist/tools/html-shell.d.ts +2 -0
  333. package/dist/tools/html-shell.d.ts.map +1 -0
  334. package/dist/tools/html-shell.js +387 -0
  335. package/dist/tools/html-shell.js.map +1 -0
  336. package/dist/tools/routes.d.ts +2 -0
  337. package/dist/tools/routes.d.ts.map +1 -0
  338. package/dist/tools/routes.js +576 -0
  339. package/dist/tools/routes.js.map +1 -0
  340. package/dist/tools/schema.d.ts +575 -0
  341. package/dist/tools/schema.d.ts.map +1 -0
  342. package/dist/tools/schema.js +112 -0
  343. package/dist/tools/schema.js.map +1 -0
  344. package/dist/tools/store.d.ts +40 -0
  345. package/dist/tools/store.d.ts.map +1 -0
  346. package/dist/tools/store.js +190 -0
  347. package/dist/tools/store.js.map +1 -0
  348. package/dist/tools/theme.d.ts +2 -0
  349. package/dist/tools/theme.d.ts.map +1 -0
  350. package/dist/tools/theme.js +67 -0
  351. package/dist/tools/theme.js.map +1 -0
  352. package/dist/transcription/builder-transcription.d.ts.map +1 -1
  353. package/dist/transcription/builder-transcription.js +26 -14
  354. package/dist/transcription/builder-transcription.js.map +1 -1
  355. package/dist/vite/action-types-plugin.d.ts.map +1 -1
  356. package/dist/vite/action-types-plugin.js +10 -2
  357. package/dist/vite/action-types-plugin.js.map +1 -1
  358. package/dist/vite/client.d.ts.map +1 -1
  359. package/dist/vite/client.js +26 -6
  360. package/dist/vite/client.js.map +1 -1
  361. package/docs/content/a2a-protocol.md +2 -2
  362. package/docs/content/authentication.md +51 -0
  363. package/docs/content/cloneable-saas.md +59 -62
  364. package/docs/content/faq.md +73 -43
  365. package/docs/content/getting-started.md +37 -61
  366. package/docs/content/mcp-clients.md +14 -1
  367. package/docs/content/messaging.md +284 -0
  368. package/docs/content/pure-agent-apps.md +55 -28
  369. package/docs/content/template-calendar.md +61 -56
  370. package/docs/content/template-clips.md +22 -18
  371. package/docs/content/template-content.md +36 -26
  372. package/docs/content/template-dispatch.md +2 -1
  373. package/docs/content/template-forms.md +13 -11
  374. package/docs/content/template-slides.md +43 -31
  375. package/docs/content/template-video.md +49 -22
  376. package/docs/content/tools.md +107 -0
  377. package/docs/content/what-is-agent-native.md +89 -105
  378. package/package.json +4 -1
  379. package/src/templates/default/app/root.tsx +50 -13
  380. package/src/templates/default/react-router.config.ts +3 -0
  381. package/docs/content/integrations.md +0 -198
@@ -1,108 +1,73 @@
1
1
  ---
2
2
  title: "What Is Agent-Native?"
3
- description: "The ladder from a naked llm() call to a full agent-native app — and why every agent needs a UI (and every app benefits from an agent)."
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 at the first rung of the ladder, and it's the biggest mistake in the space right now.
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
- ## The ladder {#the-ladder}
12
+ ## What it looks like as a user {#what-it-looks-like}
13
13
 
14
- Here's the progression. Most teams stop at rung 1. Agent-native is rung 3.
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
- ### Rung 1 — a single LLM call (the anti-pattern) {#rung-one}
17
-
18
- ```ts
19
- const output = await llm(prompt);
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
- You see this everywhere: "AI features" bolted onto SaaS that are basically `fetch('/summarize')` with a spinner. That's not AI product; that's a toy.
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
- Now the LLM can _do things_. You give it tools (`draftEmail`, `searchEmails`, `queryData`) and run a loop: LLM requests a tool → your code runs it → result goes back → loop continues until the task is done. This is what Claude Code, Codex, and the Anthropic/OpenAI agent SDKs all do under the hood.
24
+ ## Why most "AI apps" fall short {#the-ladder}
41
25
 
42
- This is a real step up. But on its own it still assumes the agent is correct. When it's not, the user has no steering wheel.
26
+ There's a progression most teams climb, and most stop one rung too early.
43
27
 
44
- So the next move is obvious: stream the agent's work into a chat UI where the user can watch, interrupt, give feedback, queue the next message. That's the state of the art today — and it's still not enough for a real product.
28
+ ### Rung 1 a single LLM call (the anti-pattern) {#rung-one}
45
29
 
46
- ### Rung 3 `<Agent />` + actions + workspace {#rung-three}
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
- ```tsx
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
- export default defineAction({
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
- ```tsx
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
- <AgentSidebar />;
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
- ```tsx
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
- <Button onClick={() => mutate({ emailId, body: "Thanks!" })}>
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
- One action. The agent calls it as a tool. The UI calls it as an HTTP endpoint. External agents call it over [A2A](/docs/a2a-protocol). Claude Desktop calls it as an [MCP server](/docs/mcp-protocol). Four surfaces, one implementation.
44
+ Three things change when you reach rung 3:
82
45
 
83
- And you didn't just add buttons to a chatbot you added an agent to an app. The user has a real UI with dashboards, lists, forms, and keyboard shortcuts. The agent has real tools, real memory, and real context. Both write to the same database; both see the same state.
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 floating around right now is "apps are dead, agents will replace UIs, everyone will just text an agent in Telegram." That's wrong.
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
- Every agent eventually needs a UI. Even if the agent does all the _work_, humans still need to:
56
+ Even when the agent does all the heavy lifting, humans still need to:
92
57
 
93
- - **See what it's doing** — progress, tool calls, intermediate output
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 trails, rollbacks
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 + management interface. At maximum, it's a full SaaS app with an agent embedded in it. Both ends of that spectrum are agent-native — see [Pure-Agent Apps](/docs/pure-agent-apps) for the minimal end and [Cloneable SaaS](/docs/cloneable-saas) for the maximal end.
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 equally important. Existing SaaS products hit a wall: 80% of what you need, and 20% you can't change. Bolting a sidebar chat onto a SaaS app rarely works because the chat can't actually _do_ the things the UI can.
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 UI handler and an agent tool, the agent can do everything the buttons can — and a lot more — without a separate "AI world" to maintain. Natural language becomes a first-class input alongside clicks.
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 the user clicks "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.
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 that's usually reserved for Claude Code {#workspace-customization}
84
+ ## Customization usually reserved for power tools {#workspace-customization}
120
85
 
121
- The reason tools like Claude Code and Codex are so powerful isn't the model — it's the **customization layer**: per-project instructions, skills, memory files, sub-agents, connected MCP servers. You can shape the agent to your codebase, your preferences, your team.
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 ships the same customization layer as a first-class part of every app the **workspace**. Each app includes:
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
- - `AGENTS.md` team-wide rules (shared)
126
- - `learnings.md` — per-user memory the agent writes to automatically (personal)
127
- - `skills/` reusable how-to guides (`/slash` commands)
128
- - `agents/` custom sub-agent profiles (invoked with `@mentions`)
129
- - `jobs/` scheduled tasks that run on a cron
130
- - MCP servers local _or_ remote, per-user or per-org
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 **SQL-backed, not filesystem-backed.** There's no dev-box to spin up, no container per user, no files to sync. Every user gets their own full workspace — personal memory, personal MCP servers, personal skills — for essentially free, because it's all rows in a database. That makes this model viable for real SaaS: multi-tenant, deployable to any serverless or edge host, with Claude-Code-level flexibility per user.
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 development isn't just for developers:
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 code through the agent
167
- - **Product managers** update functionalities and requirements
168
- - **QA** tests and prompts for fixes
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: reduce handoffs, enable one-person-to-full-team productivity.
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 over the [A2A protocol](/docs/a2a-protocol). From the mail app, you can tag the analytics agent to query data and include the results in a draft email. Agents discover what other agents are available, call them over the protocol, and show results in the UI.
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
- Every action you define is also a tool exposed over A2A _and_ as an MCP server, so external tools like Claude Desktop can drive your app directly. Same definition, four surfaces.
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.13",
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
- export function ErrorBoundary({ error }: { error: unknown }) {
85
- let message = "Oops!";
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
- message = error.status === 404 ? "404" : "Error";
91
- details =
92
- error.status === 404
93
- ? "The requested page could not be found."
94
- : error.statusText || details;
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
- <h1 className="text-4xl font-bold mb-2">{message}</h1>
108
- <p className="text-muted-foreground">{details}</p>
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-4 text-left text-xs overflow-auto max-w-lg mx-auto p-4 bg-muted rounded">
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
  )}
@@ -3,4 +3,7 @@ import type { Config } from "@react-router/dev/config";
3
3
  export default {
4
4
  appDirectory: "app",
5
5
  ssr: true,
6
+ future: {
7
+ v8_viteEnvironmentApi: true,
8
+ },
6
9
  } satisfies Config;
@@ -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.