@databricks/appkit-ui 0.31.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CLAUDE.md +54 -1
  2. package/NOTICE.md +2 -0
  3. package/dist/react/hooks/index.d.ts +1 -0
  4. package/dist/react/hooks/index.js +1 -0
  5. package/dist/react/hooks/types.d.ts +11 -5
  6. package/dist/react/hooks/types.d.ts.map +1 -1
  7. package/dist/react/hooks/use-agent-chat.d.ts +128 -0
  8. package/dist/react/hooks/use-agent-chat.d.ts.map +1 -0
  9. package/dist/react/hooks/use-agent-chat.js +133 -0
  10. package/dist/react/hooks/use-agent-chat.js.map +1 -0
  11. package/dist/react/hooks/use-analytics-query.d.ts +4 -4
  12. package/dist/react/hooks/use-analytics-query.d.ts.map +1 -1
  13. package/dist/react/hooks/use-analytics-query.js +4 -4
  14. package/dist/react/hooks/use-analytics-query.js.map +1 -1
  15. package/dist/react/hooks/use-chart-data.js +9 -9
  16. package/dist/react/hooks/use-chart-data.js.map +1 -1
  17. package/dist/react/index.d.ts +2 -1
  18. package/dist/react/index.js +2 -1
  19. package/dist/shared/src/plugin.d.ts.map +1 -1
  20. package/docs/api/appkit/Class.AppKitMcpClient.md +157 -0
  21. package/docs/api/appkit/Class.DatabricksAdapter.md +151 -0
  22. package/docs/api/appkit/Class.Plugin.md +65 -23
  23. package/docs/api/appkit/Function.agentIdFromMarkdownPath.md +18 -0
  24. package/docs/api/appkit/Function.createAgent.md +33 -0
  25. package/docs/api/appkit/Function.createApp.md +10 -8
  26. package/docs/api/appkit/Function.defineTool.md +26 -0
  27. package/docs/api/appkit/Function.executeFromRegistry.md +25 -0
  28. package/docs/api/appkit/Function.functionToolToDefinition.md +16 -0
  29. package/docs/api/appkit/Function.isFunctionTool.md +16 -0
  30. package/docs/api/appkit/Function.isHostedTool.md +16 -0
  31. package/docs/api/appkit/Function.isToolkitEntry.md +18 -0
  32. package/docs/api/appkit/Function.loadAgentFromFile.md +21 -0
  33. package/docs/api/appkit/Function.loadAgentsFromDir.md +26 -0
  34. package/docs/api/appkit/Function.mcpServer.md +28 -0
  35. package/docs/api/appkit/Function.parseTextToolCalls.md +26 -0
  36. package/docs/api/appkit/Function.resolveHostedTools.md +16 -0
  37. package/docs/api/appkit/Function.runAgent.md +26 -0
  38. package/docs/api/appkit/Function.tool.md +28 -0
  39. package/docs/api/appkit/Function.toolsFromRegistry.md +20 -0
  40. package/docs/api/appkit/Interface.AgentAdapter.md +21 -0
  41. package/docs/api/appkit/Interface.AgentDefinition.md +112 -0
  42. package/docs/api/appkit/Interface.AgentInput.md +37 -0
  43. package/docs/api/appkit/Interface.AgentRunContext.md +32 -0
  44. package/docs/api/appkit/Interface.AgentToolDefinition.md +37 -0
  45. package/docs/api/appkit/Interface.AgentsPluginConfig.md +241 -0
  46. package/docs/api/appkit/Interface.AutoInheritToolsConfig.md +27 -0
  47. package/docs/api/appkit/Interface.BasePluginConfig.md +1 -0
  48. package/docs/api/appkit/Interface.FunctionTool.md +80 -0
  49. package/docs/api/appkit/Interface.McpConnectAllResult.md +38 -0
  50. package/docs/api/appkit/Interface.Message.md +55 -0
  51. package/docs/api/appkit/Interface.PluginToolkitProvider.md +22 -0
  52. package/docs/api/appkit/Interface.PromptContext.md +30 -0
  53. package/docs/api/appkit/Interface.RegisteredAgent.md +75 -0
  54. package/docs/api/appkit/Interface.RunAgentInput.md +34 -0
  55. package/docs/api/appkit/Interface.RunAgentResult.md +23 -0
  56. package/docs/api/appkit/Interface.Thread.md +46 -0
  57. package/docs/api/appkit/Interface.ThreadStore.md +103 -0
  58. package/docs/api/appkit/Interface.ToolAnnotations.md +56 -0
  59. package/docs/api/appkit/Interface.ToolConfig.md +72 -0
  60. package/docs/api/appkit/Interface.ToolEntry.md +73 -0
  61. package/docs/api/appkit/Interface.ToolProvider.md +38 -0
  62. package/docs/api/appkit/Interface.ToolkitEntry.md +59 -0
  63. package/docs/api/appkit/Interface.ToolkitOptions.md +45 -0
  64. package/docs/api/appkit/TypeAlias.AgentEvent.md +299 -0
  65. package/docs/api/appkit/TypeAlias.AgentTool.md +11 -0
  66. package/docs/api/appkit/TypeAlias.AgentTools.md +8 -0
  67. package/docs/api/appkit/TypeAlias.AgentToolsFn.md +20 -0
  68. package/docs/api/appkit/TypeAlias.BaseSystemPromptOption.md +9 -0
  69. package/docs/api/appkit/TypeAlias.HostedTool.md +10 -0
  70. package/docs/api/appkit/TypeAlias.Plugins.md +26 -0
  71. package/docs/api/appkit/TypeAlias.ResolvedToolEntry.md +29 -0
  72. package/docs/api/appkit/TypeAlias.ToolRegistry.md +6 -0
  73. package/docs/api/appkit/Variable.agents.md +19 -0
  74. package/docs/api/appkit.md +113 -62
  75. package/docs/plugins/agents.md +441 -0
  76. package/docs/privacy.md +41 -0
  77. package/llms.txt +54 -1
  78. package/package.json +1 -1
  79. package/sbom.cdx.json +1 -1
@@ -0,0 +1,441 @@
1
+ # Agents
2
+
3
+ Beta plugin
4
+
5
+ This plugin is currently **beta**. APIs may change between minor releases. Import from `@databricks/appkit/beta`. See [Plugin Stability Tiers](./docs/plugins/stability.md).
6
+
7
+ The `agents` plugin turns a Databricks AppKit app into an AI-agent host. It loads agent definitions from markdown on disk (one folder per agent: `config/agents/<id>/agent.md`), from TypeScript (`createAgent(def)`), or both, and exposes them at `POST /invocations` alongside routes for chat, thread management, and cancellation.
8
+
9
+ This page covers the full lifecycle. For the hand-written primitives (`tool()`, `mcpServer()`), see [tools](./docs/plugins/server.md).
10
+
11
+ ## Requirements[​](#requirements "Direct link to Requirements")
12
+
13
+ Streaming-capable serving endpoints only
14
+
15
+ The agents plugin drives the LLM over Server-Sent Events. Foundation Model APIs (Claude, Llama, GPT, etc.) and other chat-style endpoints support streaming and work out of the box. Custom model endpoints that return a single JSON response (e.g. typical `sklearn` or MLflow `pyfunc` deployments) do **not** stream — pointing an agent at one will fail with "Response body is null — streaming not supported" on the first turn. If you list a serving endpoint in `apps init`, pick one whose model implements the chat-completions streaming protocol; the agents plugin reads its name from `DATABRICKS_SERVING_ENDPOINT_NAME` whenever an agent doesn't pin `model:` itself.
16
+
17
+ For the non-streaming path against a custom endpoint, use the `serving` plugin's `/invoke` route with `useServingInvoke` instead.
18
+
19
+ ## Install[​](#install "Direct link to Install")
20
+
21
+ `agents` is a regular plugin. Add it to `plugins[]` alongside `server()` and any ToolProvider plugins whose tools you want agents to reach.
22
+
23
+ ```ts
24
+ import { agents, analytics, createApp, files, server } from "@databricks/appkit";
25
+ import { agents } from "@databricks/appkit/beta";
26
+
27
+ await createApp({
28
+ plugins: [server(), analytics(), files(), agents()],
29
+ });
30
+
31
+ ```
32
+
33
+ That alone gives you a live HTTP server with `POST /invocations` wired to a markdown-driven agent.
34
+
35
+ ## Level 1: drop a markdown agent package[​](#level-1-drop-a-markdown-agent-package "Direct link to Level 1: drop a markdown agent package")
36
+
37
+ Each agent lives in its own directory with a fixed entry file `agent.md`. A reserved top-level folder named `skills` is ignored until per-agent skills ship (you can add other asset folders beside `agent.md` under each agent id).
38
+
39
+ ```text
40
+ my-app/
41
+ server.ts
42
+ config/agents/
43
+ assistant/
44
+ agent.md
45
+
46
+ ```
47
+
48
+ ```md
49
+ ---
50
+ endpoint: databricks-claude-sonnet-4-5
51
+ default: true
52
+ ---
53
+
54
+ You are a helpful data assistant running on Databricks.
55
+
56
+ Use the available tools to query data, browse files, and help users.
57
+
58
+ ```
59
+
60
+ On startup the plugin:
61
+
62
+ 1. Discovers `./config/agents/assistant/agent.md` and registers agent id `assistant`.
63
+ 2. Parses the YAML frontmatter and markdown body as the agent's `instructions`.
64
+ 3. Resolves the adapter from `endpoint` (or falls back to `DATABRICKS_AGENT_ENDPOINT`).
65
+ 4. Mounts the agent at the default name (`assistant`).
66
+
67
+ The agent starts with **no tools**. Tools are opt-in — declare them in frontmatter (Level 2 below) or opt into auto-inherit explicitly with `agents({ autoInheritTools: { file: true } })`. See "Auto-inherit posture" further down for what that costs and why it's off by default.
68
+
69
+ Requests land at `POST /invocations` with an OpenAI Responses-compatible body. Every tool call runs through `asUser(req)` so SQL executes as the requesting user, file access respects Unity Catalog ACLs, and telemetry spans are created automatically.
70
+
71
+ ## Level 2: scope tools in frontmatter[​](#level-2-scope-tools-in-frontmatter "Direct link to Level 2: scope tools in frontmatter")
72
+
73
+ ```md
74
+ ---
75
+ endpoint: databricks-claude-sonnet-4-5
76
+ tools:
77
+ - plugin:analytics # all analytics.* tools
78
+ - plugin:files: [uploads.read, uploads.list] # only these files tools
79
+ - plugin:genie: { except: [getConversation] } # everything but getConversation
80
+ - get_weather # ambient tool declared in code
81
+ default: true
82
+ ---
83
+
84
+ You are a read-only data analyst.
85
+
86
+ ```
87
+
88
+ The unified `tools:` list mixes plugin references and ambient tools, mirroring the TS function form `tools(plugins) => ({ ...plugins.analytics.toolkit(), ...plugins.files.toolkit({ only: [...] }), get_weather: tool({...}) })`. Each entry is one of:
89
+
90
+ * **`plugin:<name>`** — pull every tool from the named plugin.
91
+ * **`plugin:<name>: [tool1, tool2]`** — only the listed tools (sugar for `{ only: [...] }`).
92
+ * **`plugin:<name>: { ...ToolkitOptions }`** — full `prefix` / `only` / `except` / `rename` options.
93
+ * **`<key>`** (no prefix) — ambient tool name resolved against the `agents({ tools: { ... } })` config.
94
+
95
+ When any `tools:` is declared the auto-inherit default is turned off — the agent sees exactly the listed tools.
96
+
97
+ ## Level 3: code-defined agents[​](#level-3-code-defined-agents "Direct link to Level 3: code-defined agents")
98
+
99
+ ```ts
100
+ import { analytics, createApp, files, server } from "@databricks/appkit";
101
+ import { agents, createAgent, tool } from "@databricks/appkit/beta";
102
+ import { z } from "zod";
103
+
104
+ const support = createAgent({
105
+ instructions: "You help customers with data and files.",
106
+ model: "databricks-claude-sonnet-4-5", // string sugar
107
+ tools(plugins) {
108
+ return {
109
+ ...plugins.analytics.toolkit(), // all analytics tools
110
+ ...plugins.files.toolkit({ only: ["uploads.read"] }), // filtered subset
111
+ get_weather: tool({
112
+ description: "Weather",
113
+ schema: z.object({ city: z.string() }),
114
+ execute: async ({ city }) => `Sunny in ${city}`,
115
+ }),
116
+ };
117
+ },
118
+ });
119
+
120
+ await createApp({
121
+ plugins: [server(), analytics(), files(), agents({ agents: { support } })],
122
+ });
123
+
124
+ ```
125
+
126
+ Code-defined agents start with no tools by default. The function form `tools(plugins) => Record<string, AgentTool>` is the primary way to pull in plugin tools: each plugin registered in `createApp({ plugins: [...] })` shows up on the `plugins` parameter, and you call `.toolkit(opts?)` on it to get a spread-friendly record. The runtime invokes the function once at agent setup and caches the result — every plugin is mentioned exactly once (in `createApp`), with no held variables or marker imports.
127
+
128
+ Inline `tool({...})` calls live in the same record. `name` is optional — the agents plugin overrides it with the record key (`get_weather` above).
129
+
130
+ The asymmetry (file: auto-inherit, code: strict) matches the personas: prompt authors want zero ceremony, engineers want no surprises.
131
+
132
+ ### Scoping tools in code[​](#scoping-tools-in-code "Direct link to Scoping tools in code")
133
+
134
+ `plugins.<name>.toolkit(opts?)` accepts the same `ToolkitOptions` as markdown frontmatter:
135
+
136
+ | Option | Example | Meaning |
137
+ | -------- | ---------------------------- | -------------------------------- |
138
+ | `only` | `{ only: ["query"] }` | Allowlist of local tool names |
139
+ | `except` | `{ except: ["legacy"] }` | Denylist of local tool names |
140
+ | `prefix` | `{ prefix: "" }` | Drop the `${pluginName}.` prefix |
141
+ | `rename` | `{ rename: { query: "q" } }` | Remap specific local names |
142
+
143
+ For plugins that don't expose a `.toolkit()` method (e.g., third-party `ToolProvider` plugins authored with plain `toPlugin`), the runtime falls back to walking `getAgentTools()` and synthesizing namespaced keys (`${pluginName}.${localName}`). The fallback respects `only` / `except` / `rename` / `prefix` the same way.
144
+
145
+ If a referenced plugin is not registered in `createApp({ plugins })`, the agents plugin throws at setup with an `Available: …` listing so you can fix the wiring before the first request.
146
+
147
+ ## Level 4: sub-agents[​](#level-4-sub-agents "Direct link to Level 4: sub-agents")
148
+
149
+ ```ts
150
+ const researcher = createAgent({
151
+ instructions: "Research the question. Return concise bullets.",
152
+ model: "databricks-claude-sonnet-4-5",
153
+ tools: { search: tool({ /* ... */ }) },
154
+ });
155
+
156
+ const writer = createAgent({
157
+ instructions: "Draft prose from notes.",
158
+ model: "databricks-claude-sonnet-4-5",
159
+ });
160
+
161
+ const supervisor = createAgent({
162
+ instructions: "Coordinate researcher and writer.",
163
+ model: "databricks-claude-sonnet-4-5",
164
+ agents: { researcher, writer }, // exposed as agent-researcher, agent-writer
165
+ });
166
+
167
+ await createApp({
168
+ plugins: [
169
+ server(),
170
+ agents({ agents: { supervisor, researcher, writer } }),
171
+ ],
172
+ });
173
+
174
+ ```
175
+
176
+ Each key in `agents: {...}` on an `AgentDefinition` becomes an `agent-<key>` tool on the parent. When invoked, the agents plugin runs the child's adapter with a fresh message list (no shared thread state) and returns the aggregated text. Cycles are rejected at load time.
177
+
178
+ ## Level 5: standalone (no `createApp`)[​](#level-5-standalone-no-createapp "Direct link to level-5-standalone-no-createapp")
179
+
180
+ ```ts
181
+ import { createAgent, runAgent, tool } from "@databricks/appkit";
182
+ import { z } from "zod";
183
+
184
+ const classifier = createAgent({
185
+ instructions: "Classify tickets: billing | bug | feature.",
186
+ model: "databricks-claude-sonnet-4-5",
187
+ tools: {
188
+ lookup_account: tool({ /* ... */ }),
189
+ },
190
+ });
191
+
192
+ for (const ticket of tickets) {
193
+ const result = await runAgent(classifier, {
194
+ messages: [{ role: "user", content: ticket.body }],
195
+ });
196
+ await persistClassification(ticket.id, result.text);
197
+ }
198
+
199
+ ```
200
+
201
+ `runAgent` drives the adapter without `createApp` or HTTP. Inline `tool()` calls work standalone as shown above. To use plugin tools in standalone mode, pass the plugin factories through `RunAgentInput.plugins` and reach into them via the `tools(plugins)` function form:
202
+
203
+ ```ts
204
+ import { analytics } from "@databricks/appkit";
205
+ import { createAgent, runAgent } from "@databricks/appkit/beta";
206
+
207
+ const classifier = createAgent({
208
+ instructions: "Classify tickets. Use analytics.query for historical data.",
209
+ model: "databricks-claude-sonnet-4-5",
210
+ tools(plugins) {
211
+ return { ...plugins.analytics.toolkit() };
212
+ },
213
+ });
214
+
215
+ const result = await runAgent(classifier, {
216
+ messages: "is ticket 42 a duplicate?",
217
+ plugins: [analytics()],
218
+ });
219
+
220
+ ```
221
+
222
+ `runAgent` eagerly constructs each plugin in `RunAgentInput.plugins`, runs the standard `attachContext({})` + `await setup()` lifecycle, and shares the instances across the top-level run and every sub-agent dispatch. Plugins whose `setup()` requires `createApp`-only runtime (e.g. `WorkspaceClient`, `ServiceContext`) throw at standalone-init with a clear "use createApp instead" message rather than mid-stream.
223
+
224
+ Hosted tools (MCP) are still `agents()`-only since they require the live MCP client. Plugin tool dispatch in standalone mode runs as the service principal (no OBO) and **bypasses the agents-plugin approval gate** — treat standalone runAgent as a trusted-prompt environment (CI, batch eval, internal scripts), not as an exposed user-facing surface.
225
+
226
+ ## Configuration reference[​](#configuration-reference "Direct link to Configuration reference")
227
+
228
+ ```ts
229
+ agents({
230
+ dir?: string | false, // "./config/agents" default; false disables
231
+ agents?: Record<string, AgentDefinition>,
232
+ defaultAgent?: string,
233
+ defaultModel?: AgentAdapter | Promise<AgentAdapter> | string,
234
+ tools?: Record<string, AgentTool>,
235
+ autoInheritTools?: boolean | { file?: boolean, code?: boolean },
236
+ threadStore?: ThreadStore, // default in-memory
237
+ baseSystemPrompt?: false | string | (ctx: PromptContext) => string,
238
+ mcp?: {
239
+ trustedHosts?: string[], // extra hostnames allowed for custom MCP URLs
240
+ allowLocalhost?: boolean, // default: NODE_ENV !== "production"
241
+ },
242
+ approval?: {
243
+ requireForDestructive?: boolean, // default: true
244
+ timeoutMs?: number, // default: 60_000
245
+ },
246
+ limits?: {
247
+ maxConcurrentStreamsPerUser?: number, // default: 5
248
+ maxToolCalls?: number, // default: 50
249
+ maxSubAgentDepth?: number, // default: 3
250
+ },
251
+ })
252
+
253
+ ```
254
+
255
+ `autoInheritTools` defaults to `{ file: false, code: false }` — no tools spread into any agent unless the developer explicitly opts in. When opted in, only tools whose plugin author marked `autoInheritable: true` are spread; destructive or state-mutating tools are always skipped from the auto-inherit path even when opt-in is enabled. Boolean shorthand (`autoInheritTools: true`) applies to both origins. See "Auto-inherit posture" below.
256
+
257
+ ### MCP host policy[​](#mcp-host-policy "Direct link to MCP host policy")
258
+
259
+ AppKit applies a zero-trust policy to every MCP URL used as a hosted tool. By default only **same-origin Databricks workspace URLs** (matching the resolved `DATABRICKS_HOST`) may be reached. Every other host must be explicitly allowlisted via `mcp.trustedHosts`, and workspace credentials (service-principal and on-behalf-of user tokens) are **never** forwarded to those hosts.
260
+
261
+ ```ts
262
+ agents({
263
+ agents: {
264
+ support: createAgent({
265
+ instructions: "…",
266
+ tools: {
267
+ "mcp.internal": mcpServer("internal", "https://mcp.corp.internal/mcp"),
268
+ },
269
+ }),
270
+ },
271
+ mcp: {
272
+ trustedHosts: ["mcp.corp.internal"],
273
+ },
274
+ });
275
+
276
+ ```
277
+
278
+ The policy enforces four rules at MCP `connect()` time, before any byte is sent:
279
+
280
+ 1. Only `http` and `https` URLs are accepted.
281
+ 2. Plaintext `http://` is rejected for everything except `localhost` when `allowLocalhost` is true (default in development, off in production).
282
+ 3. The destination hostname must match the workspace host, equal `localhost` (if permitted), or appear in `trustedHosts`.
283
+ 4. The resolved DNS address must not fall in loopback, RFC1918, CGNAT (100.64.0.0/10), link-local (169.254.0.0/16 — covers cloud metadata services), ULA, or multicast ranges.
284
+
285
+ `Authorization` headers carrying workspace credentials are scoped to same-origin workspace URLs. A `mcpServer(name, url)` pointing at a trusted external host must authenticate itself (for example, a custom token baked into `url`).
286
+
287
+ ### Auto-inherit posture[​](#auto-inherit-posture "Direct link to Auto-inherit posture")
288
+
289
+ AppKit treats auto-inherit as a two-key operation: the developer must opt into `autoInheritTools`, AND the plugin author must mark each tool `autoInheritable: true`. Both are required for a tool to spread into an agent's index without explicit wiring.
290
+
291
+ ```ts
292
+ // Opt-in at the agents plugin level (pick one):
293
+ agents({ autoInheritTools: true }); // both origins
294
+ agents({ autoInheritTools: { file: true } }); // markdown agents only
295
+ agents({ autoInheritTools: { file: true, code: true } });
296
+
297
+ // Per-tool, inside a plugin:
298
+ defineTool({
299
+ description: "safe read",
300
+ schema: z.object({ ... }),
301
+ annotations: { effect: "read", requiresUserContext: true },
302
+ autoInheritable: true, // explicit consent that this tool may auto-spread
303
+ execute: (args, signal) => ...,
304
+ });
305
+
306
+ ```
307
+
308
+ The AppKit core plugins ship with the following `autoInheritable` markings:
309
+
310
+ | Tool | `autoInheritable` | Rationale |
311
+ | --------------------------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------- |
312
+ | `analytics.query` | yes | OBO-scoped, read-only SQL enforced at runtime via the classifier |
313
+ | `files.list` / `files.read` / `files.exists` / `files.metadata` | yes | OBO-scoped read operations |
314
+ | `files.upload` / `files.delete` | no | Mutating — wire explicitly |
315
+ | `genie.getConversation` | yes | Read-only history |
316
+ | `genie.sendMessage` | no | State-mutating Genie conversation |
317
+ | `lakebase.query` | no | Already gated by `exposeAsAgentTool`; auto-inherit stays closed as defense-in-depth |
318
+
319
+ Third-party `ToolProvider` plugins that don't expose a `toolkit()` method are also skipped from the auto-inherit path — their tools must be wired via `tools:` explicitly. At setup the agents plugin logs what each agent inherited and what was skipped so the posture is visible:
320
+
321
+ ```text
322
+ [agents] [agent support] auto-inherited 2 tool(s): analytics.query, files.uploads.read
323
+ [agents] [agent support] auto-inherit skipped 3 tool(s) not marked autoInheritable: files(2), genie(1). Wire them explicitly via `tools:` if needed.
324
+
325
+ ```
326
+
327
+ ### SQL agent tools[​](#sql-agent-tools "Direct link to SQL agent tools")
328
+
329
+ Two built-in agent tools can execute SQL on behalf of the LLM: `analytics.query` (against the Databricks SQL warehouse) and the opt-in `lakebase.query` (against a Lakebase Postgres database). Both have distinct safety postures because they run with different privileges.
330
+
331
+ **`analytics.query`** runs under the caller's OBO token (the end user's Databricks credentials). Its `readOnly: true` annotation is enforced at execution time — statements are tokenized and only `SELECT`, `WITH`, `SHOW`, `EXPLAIN`, `DESCRIBE`, and `DESC` are accepted. Writes, DDL, and stacked statements are rejected before the request reaches the warehouse:
332
+
333
+ ```ts
334
+ // accepted
335
+ analytics.query({ query: "SELECT * FROM main.sales.orders WHERE created_at > current_date() - 7" })
336
+
337
+ // rejected at the plugin, never reaches the warehouse
338
+ analytics.query({ query: "UPDATE main.sales.orders SET status = 'cancelled'" })
339
+ analytics.query({ query: "SELECT 1; DROP TABLE main.sales.orders" })
340
+
341
+ ```
342
+
343
+ **`lakebase.query`** is **not registered as an agent tool by default**. Enabling it is an explicit decision because the Lakebase pool is bound to the application's service principal: an agent with access to this tool can execute SQL as the SP regardless of which end user initiated the request. Opt in with an acknowledgement flag:
344
+
345
+ ```ts
346
+ lakebase({
347
+ exposeAsAgentTool: {
348
+ iUnderstandRunsAsServicePrincipal: true,
349
+ readOnly: true, // default
350
+ },
351
+ });
352
+
353
+ ```
354
+
355
+ With `readOnly: true` (default), the same SQL classifier as `analytics.query` applies, and the accepted statement is additionally wrapped in `BEGIN READ ONLY; … ROLLBACK;` so the Postgres server rejects any write that slips past the classifier (e.g., a `SELECT` over a side-effecting function). The tool annotation is `{ effect: "read" }`.
356
+
357
+ With `readOnly: false`, the tool accepts arbitrary SQL and is annotated `{ effect: "destructive" }`. The `destructive` effect triggers the human-in-the-loop approval gate (below) on every invocation.
358
+
359
+ ### Human-in-the-loop approval for mutating tools[​](#human-in-the-loop-approval-for-mutating-tools "Direct link to Human-in-the-loop approval for mutating tools")
360
+
361
+ Any tool annotated with a mutating effect — `effect: "write" | "update" | "destructive"` (preferred) or the legacy `destructive: true` boolean — requires explicit user approval before execution. Secure by default: set `approval.requireForDestructive: false` only for fully autonomous back-office agents running in single-user contexts.
362
+
363
+ Flow:
364
+
365
+ 1. Before running the tool, the agents plugin emits an `appkit.approval_pending` SSE event carrying the pending call's `approval_id`, `stream_id`, `tool_name`, `args`, and `annotations`.
366
+
367
+ 2. The chat client renders an approval prompt (see the reference app's approval card).
368
+
369
+ 3. The same user who initiated the stream posts the decision to `POST /api/agent/approve`:
370
+
371
+ ```http
372
+ POST /api/agent/approve
373
+ Content-Type: application/json
374
+ X-Forwarded-User: <end-user id>
375
+ X-Forwarded-Access-Token: <OBO token>
376
+
377
+ { "streamId": "...", "approvalId": "...", "decision": "approve" | "deny" }
378
+
379
+ ```
380
+
381
+ 4. If approved, the tool executes normally and the stream continues. If denied, the adapter receives the string `"Tool execution denied by user approval gate (tool: <name>)."` as the tool output and the LLM can apologise / replan. If no decision arrives within `approval.timeoutMs` (default 60 s), the gate auto-denies.
382
+
383
+ The route enforces that the decider is the stream owner: an approve from a different `x-forwarded-user` returns `403`. Cancelling the stream via `POST /api/agent/cancel` denies every pending approval on that stream.
384
+
385
+ ### Resource limits[​](#resource-limits "Direct link to Resource limits")
386
+
387
+ The plugin enforces a handful of caps to protect a single-instance deployment from runaway prompts, misbehaving clients, or prompt-injected delegation cycles. Some are static (enforced by the request schema) and some are configurable via `agents({ limits: { ... } })`.
388
+
389
+ **Static caps** (applied at `POST /chat` and `POST /invocations` request parsing):
390
+
391
+ | Field | Cap | Why |
392
+ | ------------------------------------ | ----------------- | ----------------------------------------------------------------------------- |
393
+ | `chat.message` | 64 000 characters | \~16k tokens; larger bodies are almost certainly abuse. |
394
+ | `invocations.input` string | 64 000 characters | Same reasoning. |
395
+ | `invocations.input` array | 100 items | Prevents a single request seeding hundreds of messages into the thread store. |
396
+ | `invocations.input[].content` string | 64 000 characters | Per-seeded-message cap. |
397
+ | `invocations.input[].content` array | 100 items | Per-seeded-message cap. |
398
+
399
+ **Configurable caps** (defaults shown):
400
+
401
+ ```ts
402
+ agents({
403
+ limits: {
404
+ maxConcurrentStreamsPerUser: 5, // HTTP 429 + Retry-After when exceeded
405
+ maxToolCalls: 50, // aborts the run if the budget is exhausted
406
+ maxSubAgentDepth: 3, // rejects sub-agent recursion beyond this
407
+ },
408
+ });
409
+
410
+ ```
411
+
412
+ The `maxToolCalls` budget is shared across the top-level adapter and every sub-agent it delegates to, so a prompt-injected fan-out cannot escape by going deeper. `maxConcurrentStreamsPerUser` is per-user, not global — one user hitting their limit does not affect others.
413
+
414
+ ## Runtime API[​](#runtime-api "Direct link to Runtime API")
415
+
416
+ After `createApp`, the plugin exposes:
417
+
418
+ ```ts
419
+ appkit.agents.list(); // => ["support", "researcher", ...]
420
+ appkit.agents.get("support"); // => RegisteredAgent | null
421
+ appkit.agents.getDefault(); // => "support"
422
+ appkit.agents.register(name, def); // dynamic registration
423
+ appkit.agents.reload(); // re-scan the directory
424
+ appkit.agents.getThreads(userId); // list user's threads
425
+
426
+ ```
427
+
428
+ ## Frontmatter schema[​](#frontmatter-schema "Direct link to Frontmatter schema")
429
+
430
+ | Key | Type | Notes |
431
+ | ------------------ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
432
+ | `endpoint` | string | Model serving endpoint name. Shortcut for `model`. |
433
+ | `model` | string | Same as `endpoint`; either works. |
434
+ | `tools` | array | Unified tool list. Entries are `plugin:<name>` / `plugin:<name>: [t1, t2]` / `plugin:<name>: { only, except, rename, prefix }` for plugin tools, or a bare `<key>` resolved against `agents({ tools: {...} })` for ambient tools. See "Level 2: scope tools in frontmatter" above for examples. |
435
+ | `default` | boolean | First agent id (sorted order) with `default: true` becomes the default agent. |
436
+ | `maxSteps` | number | Adapter max-step hint. |
437
+ | `maxTokens` | number | Adapter max-token hint. |
438
+ | `baseSystemPrompt` | false \| string | Per-agent override. `false` disables the AppKit base prompt. |
439
+ | `ephemeral` | boolean | If `true`, the thread created for a chat request against this agent is deleted from `ThreadStore` after the stream finishes. Use for stateless one-shot agents (e.g. autocomplete) so history does not accumulate or contaminate future calls. Defaults to `false`. |
440
+
441
+ Unknown keys are logged and ignored. Invalid YAML and missing plugin/tool references throw at boot.
@@ -0,0 +1,41 @@
1
+ # Privacy
2
+
3
+ AppKit sends a small amount of anonymized usage telemetry to Databricks so the team can understand how the SDK is used and prioritize improvements. This page documents exactly what is sent, when, and how to turn it off.
4
+
5
+ ## What we collect[​](#what-we-collect "Direct link to What we collect")
6
+
7
+ Every event is a single record with three top-level fields:
8
+
9
+ | Field | Type | Source |
10
+ | ---------------- | ------ | ---------------------------------------------------- |
11
+ | `event_name` | enum | One of `APP_STARTUP`, `HEARTBEAT`, `REQUEST_METRICS` |
12
+ | `app_id` | string | The app's OAuth client UUID (`DATABRICKS_CLIENT_ID`) |
13
+ | `appkit_version` | string | The AppKit SDK version |
14
+
15
+ Each event also carries one of three event-specific bodies:
16
+
17
+ * **`APP_STARTUP`** — emitted once when `createApp` finishes booting. Empty body.
18
+
19
+ * **`HEARTBEAT`** — emitted every five minutes from a running app. Empty body.
20
+
21
+ * **`REQUEST_METRICS`** — emitted once per minute, one record per HTTP endpoint that received traffic in the window. Each record contains:
22
+
23
+ <!-- -->
24
+
25
+ * `endpoint` — the route template (e.g. `GET /api/genie/:space_id/messages`), never the raw request URL or any user-provided values.
26
+ * `request_count`
27
+ * `request_latency_ms_avg`
28
+ * `response_count_http4xx`
29
+ * `response_count_http5xx`
30
+
31
+ ## How to opt out[​](#how-to-opt-out "Direct link to How to opt out")
32
+
33
+ Set any one of the following:
34
+
35
+ ```sh
36
+ DISABLE_APPKIT_INTERNAL_TELEMETRY=true
37
+ DO_NOT_TRACK=1
38
+
39
+ ```
40
+
41
+ Either fully disables the reporter — no events are emitted and no network calls are made.
package/llms.txt CHANGED
@@ -29,6 +29,7 @@ npx @databricks/appkit docs <query>
29
29
  - [Development](./docs/development.md): AppKit provides multiple development workflows to suit different needs: local development with hot reload, AI-assisted development with Agent Skills, and remote tunneling to deployed backends.
30
30
  - [FAQ](./docs/faq.md): Integrations
31
31
  - [Plugins](./docs/plugins.md): Plugins are modular extensions that add capabilities to your AppKit application. They follow a defined lifecycle and have access to shared services like caching, telemetry, and streaming.
32
+ - [Privacy](./docs/privacy.md): AppKit sends a small amount of anonymized usage telemetry to Databricks
32
33
 
33
34
  ## Development
34
35
 
@@ -42,6 +43,7 @@ npx @databricks/appkit docs <query>
42
43
 
43
44
  ## Plugins
44
45
 
46
+ - [Agents](./docs/plugins/agents.md): This plugin is currently beta. APIs may change between minor releases. Import from @databricks/appkit/beta. See Plugin Stability Tiers.
45
47
  - [Analytics plugin](./docs/plugins/analytics.md): Enables SQL query execution against Databricks SQL Warehouses.
46
48
  - [Caching](./docs/plugins/caching.md): AppKit provides both global and plugin-level caching capabilities.
47
49
  - [Creating custom plugins](./docs/plugins/custom-plugins.md): If you need custom API routes or background logic, implement an AppKit plugin. The fastest way is to use the CLI:
@@ -58,11 +60,13 @@ npx @databricks/appkit docs <query>
58
60
 
59
61
  ## appkit API reference [collapsed]
60
62
 
61
- - [@databricks/appkit](./docs/api/appkit.md): Core library for building Databricks applications with type-safe SQL queries,
63
+ - [@databricks/appkit](./docs/api/appkit.md): Documentation merge entry for Typedoc combines the stable @databricks/appkit
62
64
  - [Abstract Class: AppKitError](./docs/api/appkit/Class.AppKitError.md): Base error class for all AppKit errors.
65
+ - [Class: AppKitMcpClient](./docs/api/appkit/Class.AppKitMcpClient.md): Lightweight MCP client for Databricks-hosted MCP servers.
63
66
  - [Class: AuthenticationError](./docs/api/appkit/Class.AuthenticationError.md): Error thrown when authentication fails.
64
67
  - [Class: ConfigurationError](./docs/api/appkit/Class.ConfigurationError.md): Error thrown when configuration is missing or invalid.
65
68
  - [Class: ConnectionError](./docs/api/appkit/Class.ConnectionError.md): Error thrown when a connection or network operation fails.
69
+ - [Class: DatabricksAdapter](./docs/api/appkit/Class.DatabricksAdapter.md): Adapter that talks directly to Databricks Model Serving /invocations endpoint.
66
70
  - [Class: ExecutionError](./docs/api/appkit/Class.ExecutionError.md): Error thrown when an operation execution fails.
67
71
  - [Class: InitializationError](./docs/api/appkit/Class.InitializationError.md): Error thrown when a service or component is not properly initialized.
68
72
  - [Abstract Class: Plugin<TConfig>](./docs/api/appkit/Class.Plugin.md): Base abstract class for creating AppKit plugins.
@@ -73,12 +77,17 @@ npx @databricks/appkit docs <query>
73
77
  - [Class: ValidationError](./docs/api/appkit/Class.ValidationError.md): Error thrown when input validation fails.
74
78
  - [Enumeration: RequestedClaimsPermissionSet](./docs/api/appkit/Enumeration.RequestedClaimsPermissionSet.md): Permission set for Unity Catalog table access
75
79
  - [Enumeration: ResourceType](./docs/api/appkit/Enumeration.ResourceType.md): Resource types from schema $defs.resourceType.enum
80
+ - [Function: agentIdFromMarkdownPath()](./docs/api/appkit/Function.agentIdFromMarkdownPath.md): Derives the logical agent id from a markdown path. When the file is named
76
81
  - [Function: appKitServingTypesPlugin()](./docs/api/appkit/Function.appKitServingTypesPlugin.md): Vite plugin to generate TypeScript types for AppKit serving endpoints.
77
82
  - [Function: appKitTypesPlugin()](./docs/api/appkit/Function.appKitTypesPlugin.md): Vite plugin to generate types for AppKit queries.
83
+ - [Function: createAgent()](./docs/api/appkit/Function.createAgent.md): Pure factory for agent definitions. Returns the passed-in definition after
78
84
  - [Function: createApp()](./docs/api/appkit/Function.createApp.md): Bootstraps AppKit with the provided configuration.
79
85
  - [Function: createLakebasePool()](./docs/api/appkit/Function.createLakebasePool.md): Create a Lakebase pool with appkit's logger integration.
86
+ - [Function: defineTool()](./docs/api/appkit/Function.defineTool.md): Defines a single tool entry for a plugin's internal registry.
87
+ - [Function: executeFromRegistry()](./docs/api/appkit/Function.executeFromRegistry.md): Validates tool-call arguments against the entry's schema and invokes its
80
88
  - [Function: extractServingEndpoints()](./docs/api/appkit/Function.extractServingEndpoints.md): Extract serving endpoint config from a server file by AST-parsing it.
81
89
  - [Function: findServerFile()](./docs/api/appkit/Function.findServerFile.md): Find the server entry file by checking candidate paths in order.
90
+ - [Function: functionToolToDefinition()](./docs/api/appkit/Function.functionToolToDefinition.md): Parameters
82
91
  - [Function: generateDatabaseCredential()](./docs/api/appkit/Function.generateDatabaseCredential.md): Generate OAuth credentials for Postgres database connection using the proper Postgres API.
83
92
  - [Function: getExecutionContext()](./docs/api/appkit/Function.getExecutionContext.md): Get the current execution context.
84
93
  - [Function: getLakebaseOrmConfig()](./docs/api/appkit/Function.getLakebaseOrmConfig.md): Get Lakebase connection configuration for ORMs that don't accept pg.Pool directly.
@@ -87,13 +96,32 @@ npx @databricks/appkit docs <query>
87
96
  - [Function: getResourceRequirements()](./docs/api/appkit/Function.getResourceRequirements.md): Gets the resource requirements from a plugin's manifest.
88
97
  - [Function: getUsernameWithApiLookup()](./docs/api/appkit/Function.getUsernameWithApiLookup.md): Resolves the PostgreSQL username for a Lakebase connection.
89
98
  - [Function: getWorkspaceClient()](./docs/api/appkit/Function.getWorkspaceClient.md): Get workspace client from config or SDK default auth chain
99
+ - [Function: isFunctionTool()](./docs/api/appkit/Function.isFunctionTool.md): Parameters
100
+ - [Function: isHostedTool()](./docs/api/appkit/Function.isHostedTool.md): Parameters
90
101
  - [Function: isSQLTypeMarker()](./docs/api/appkit/Function.isSQLTypeMarker.md): Type guard to check if a value is a SQL type marker
102
+ - [Function: isToolkitEntry()](./docs/api/appkit/Function.isToolkitEntry.md): Type guard for ToolkitEntry — used by the agents plugin to differentiate
103
+ - [Function: loadAgentFromFile()](./docs/api/appkit/Function.loadAgentFromFile.md): Loads a single markdown agent file and resolves its frontmatter against
104
+ - [Function: loadAgentsFromDir()](./docs/api/appkit/Function.loadAgentsFromDir.md): Scans a directory for one subdirectory per agent, each containing
105
+ - [Function: mcpServer()](./docs/api/appkit/Function.mcpServer.md): Factory for declaring a custom MCP server tool.
106
+ - [Function: parseTextToolCalls()](./docs/api/appkit/Function.parseTextToolCalls.md): Parses text-based tool calls from model output.
107
+ - [Function: resolveHostedTools()](./docs/api/appkit/Function.resolveHostedTools.md): Parameters
108
+ - [Function: runAgent()](./docs/api/appkit/Function.runAgent.md): Standalone agent execution without createApp. Resolves the adapter, binds
109
+ - [Function: tool()](./docs/api/appkit/Function.tool.md): Factory for defining function tools with Zod schemas.
110
+ - [Function: toolsFromRegistry()](./docs/api/appkit/Function.toolsFromRegistry.md): Produces the AgentToolDefinition[] a ToolProvider exposes to the LLM,
111
+ - [Interface: AgentAdapter](./docs/api/appkit/Interface.AgentAdapter.md): Methods
112
+ - [Interface: AgentDefinition](./docs/api/appkit/Interface.AgentDefinition.md): Properties
113
+ - [Interface: AgentInput](./docs/api/appkit/Interface.AgentInput.md): Properties
114
+ - [Interface: AgentRunContext](./docs/api/appkit/Interface.AgentRunContext.md): Properties
115
+ - [Interface: AgentsPluginConfig](./docs/api/appkit/Interface.AgentsPluginConfig.md): Base configuration interface for AppKit plugins
116
+ - [Interface: AgentToolDefinition](./docs/api/appkit/Interface.AgentToolDefinition.md): Properties
117
+ - [Interface: AutoInheritToolsConfig](./docs/api/appkit/Interface.AutoInheritToolsConfig.md): Auto-inherit configuration. When enabled for a given agent origin, agents
91
118
  - [Interface: BasePluginConfig](./docs/api/appkit/Interface.BasePluginConfig.md): Base configuration interface for AppKit plugins
92
119
  - [Interface: CacheConfig](./docs/api/appkit/Interface.CacheConfig.md): Configuration for the CacheInterceptor. Controls TTL, size limits, storage backend, and probabilistic cleanup.
93
120
  - [Interface: DatabaseCredential](./docs/api/appkit/Interface.DatabaseCredential.md): Database credentials with OAuth token for Postgres connection
94
121
  - [Interface: EndpointConfig](./docs/api/appkit/Interface.EndpointConfig.md): Properties
95
122
  - [Interface: FilePolicyUser](./docs/api/appkit/Interface.FilePolicyUser.md): Minimal user identity passed to the policy function.
96
123
  - [Interface: FileResource](./docs/api/appkit/Interface.FileResource.md): Describes the file or directory being acted upon.
124
+ - [Interface: FunctionTool](./docs/api/appkit/Interface.FunctionTool.md): Properties
97
125
  - [Interface: GenerateDatabaseCredentialRequest](./docs/api/appkit/Interface.GenerateDatabaseCredentialRequest.md): Request parameters for generating database OAuth credentials
98
126
  - [Interface: IJobsConfig](./docs/api/appkit/Interface.IJobsConfig.md): Configuration for the Jobs plugin.
99
127
  - [Interface: ITelemetry](./docs/api/appkit/Interface.ITelemetry.md): Plugin-facing interface for OpenTelemetry instrumentation.
@@ -101,28 +129,53 @@ npx @databricks/appkit docs <query>
101
129
  - [Interface: JobConfig](./docs/api/appkit/Interface.JobConfig.md): Per-job configuration options.
102
130
  - [Interface: JobsConnectorConfig](./docs/api/appkit/Interface.JobsConnectorConfig.md): Properties
103
131
  - [Interface: LakebasePoolConfig](./docs/api/appkit/Interface.LakebasePoolConfig.md): Configuration for creating a Lakebase connection pool
132
+ - [Interface: McpConnectAllResult](./docs/api/appkit/Interface.McpConnectAllResult.md): Per-endpoint outcome of AppKitMcpClient.connectAll. Callers (the
133
+ - [Interface: Message](./docs/api/appkit/Interface.Message.md): Properties
104
134
  - [Interface: PluginManifest<TName>](./docs/api/appkit/Interface.PluginManifest.md): Plugin manifest that declares metadata and resource requirements.
135
+ - [Interface: PluginToolkitProvider](./docs/api/appkit/Interface.PluginToolkitProvider.md): Minimum shape every entry in the Plugins map must expose. Core
136
+ - [Interface: PromptContext](./docs/api/appkit/Interface.PromptContext.md): Context passed to baseSystemPrompt callbacks.
137
+ - [Interface: RegisteredAgent](./docs/api/appkit/Interface.RegisteredAgent.md): Properties
105
138
  - [Interface: RequestedClaims](./docs/api/appkit/Interface.RequestedClaims.md): Optional claims for fine-grained Unity Catalog table permissions
106
139
  - [Interface: RequestedResource](./docs/api/appkit/Interface.RequestedResource.md): Resource to request permissions for in Unity Catalog
107
140
  - [Interface: ResourceEntry](./docs/api/appkit/Interface.ResourceEntry.md): Internal representation of a resource in the registry.
108
141
  - [Interface: ResourceFieldEntry](./docs/api/appkit/Interface.ResourceFieldEntry.md): Defines a single field for a resource. Each field has its own environment variable and optional description. Single-value types use one key (e.g. id); multi-value types (database, secret) use multiple (e.g. instancename, databasename or scope, key).
109
142
  - [Interface: ResourceRequirement](./docs/api/appkit/Interface.ResourceRequirement.md): Declares a resource requirement for a plugin.
143
+ - [Interface: RunAgentInput](./docs/api/appkit/Interface.RunAgentInput.md): Properties
144
+ - [Interface: RunAgentResult](./docs/api/appkit/Interface.RunAgentResult.md): Properties
110
145
  - [Interface: ServingEndpointEntry](./docs/api/appkit/Interface.ServingEndpointEntry.md): Shape of a single registry entry.
111
146
  - [Interface: ServingEndpointRegistry](./docs/api/appkit/Interface.ServingEndpointRegistry.md): Registry interface for serving endpoint type generation.
112
147
  - [Interface: StreamExecutionSettings](./docs/api/appkit/Interface.StreamExecutionSettings.md): Execution settings for streaming endpoints. Extends PluginExecutionSettings with SSE stream configuration.
113
148
  - [Interface: TelemetryConfig](./docs/api/appkit/Interface.TelemetryConfig.md): OpenTelemetry configuration for AppKit applications
149
+ - [Interface: Thread](./docs/api/appkit/Interface.Thread.md): Properties
150
+ - [Interface: ThreadStore](./docs/api/appkit/Interface.ThreadStore.md): Methods
151
+ - [Interface: ToolAnnotations](./docs/api/appkit/Interface.ToolAnnotations.md): Properties
152
+ - [Interface: ToolConfig<S>](./docs/api/appkit/Interface.ToolConfig.md): Type Parameters
153
+ - [Interface: ToolEntry<S>](./docs/api/appkit/Interface.ToolEntry.md): Single-tool entry for a plugin's internal tool registry.
154
+ - [Interface: ToolkitEntry](./docs/api/appkit/Interface.ToolkitEntry.md): A tool reference produced by a plugin's .toolkit() call. The agents plugin
155
+ - [Interface: ToolkitOptions](./docs/api/appkit/Interface.ToolkitOptions.md): Properties
156
+ - [Interface: ToolProvider](./docs/api/appkit/Interface.ToolProvider.md): Methods
114
157
  - [Interface: ValidationResult](./docs/api/appkit/Interface.ValidationResult.md): Result of validating all registered resources against the environment.
158
+ - [Type Alias: AgentEvent](./docs/api/appkit/TypeAlias.AgentEvent.md): Type Declaration
159
+ - [Type Alias: AgentTool](./docs/api/appkit/TypeAlias.AgentTool.md): Any tool an agent can invoke: inline function tools (tool()), hosted MCP
160
+ - [Type Alias: AgentTools](./docs/api/appkit/TypeAlias.AgentTools.md): Per-agent tool record. String keys map to inline tools, toolkit entries,
161
+ - [Type Alias: AgentToolsFn()](./docs/api/appkit/TypeAlias.AgentToolsFn.md): Function form of AgentDefinition.tools. Receives the typed
162
+ - [Type Alias: BaseSystemPromptOption](./docs/api/appkit/TypeAlias.BaseSystemPromptOption.md)
115
163
  - [Type Alias: ConfigSchema](./docs/api/appkit/TypeAlias.ConfigSchema.md): Configuration schema definition for plugin config.
116
164
  - [Type Alias: ExecutionResult<T>](./docs/api/appkit/TypeAlias.ExecutionResult.md): Discriminated union for plugin execution results.
117
165
  - [Type Alias: FileAction](./docs/api/appkit/TypeAlias.FileAction.md): Every action the files plugin can perform.
118
166
  - [Type Alias: FilePolicy()](./docs/api/appkit/TypeAlias.FilePolicy.md): A policy function that decides whether user may perform action on
167
+ - [Type Alias: HostedTool](./docs/api/appkit/TypeAlias.HostedTool.md)
119
168
  - [Type Alias: IAppRouter](./docs/api/appkit/TypeAlias.IAppRouter.md): Express router type for plugin route registration
120
169
  - [Type Alias: JobHandle](./docs/api/appkit/TypeAlias.JobHandle.md): Job handle returned by appkit.jobs("etl").
121
170
  - [Type Alias: JobsExport()](./docs/api/appkit/TypeAlias.JobsExport.md): Public API shape of the jobs plugin.
122
171
  - [Type Alias: PluginData<T, U, N>](./docs/api/appkit/TypeAlias.PluginData.md): Tuple of plugin class, config, and name. Created by toPlugin() and passed to createApp().
172
+ - [Type Alias: Plugins](./docs/api/appkit/TypeAlias.Plugins.md): Plugin map passed to the function form of AgentDefinition.tools.
173
+ - [Type Alias: ResolvedToolEntry](./docs/api/appkit/TypeAlias.ResolvedToolEntry.md): Internal tool-index entry after a tool record has been resolved to a dispatchable form.
123
174
  - [Type Alias: ResourcePermission](./docs/api/appkit/TypeAlias.ResourcePermission.md): Union of all possible permission levels across all resource types.
124
175
  - [Type Alias: ServingFactory](./docs/api/appkit/TypeAlias.ServingFactory.md): Factory function returned by AppKit.serving.
176
+ - [Type Alias: ToolRegistry](./docs/api/appkit/TypeAlias.ToolRegistry.md)
125
177
  - [Type Alias: ToPlugin()<T, U, N>](./docs/api/appkit/TypeAlias.ToPlugin.md): Factory function type returned by toPlugin(). Accepts optional config and returns a PluginData tuple.
178
+ - [Variable: agents](./docs/api/appkit/Variable.agents.md): Plugin factory for the agents plugin. Reads config/agents/*.md by default,
126
179
  - [Variable: READ_ACTIONS](./docs/api/appkit/Variable.READ_ACTIONS.md): Actions that only read data.
127
180
  - [Variable: sql](./docs/api/appkit/Variable.sql.md): SQL helper namespace
128
181
  - [Variable: WRITE_ACTIONS](./docs/api/appkit/Variable.WRITE_ACTIONS.md): Actions that mutate data.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@databricks/appkit-ui",
3
3
  "type": "module",
4
- "version": "0.31.0",
4
+ "version": "0.33.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",