@databricks/appkit-ui 0.32.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 (75) hide show
  1. package/CLAUDE.md +53 -1
  2. package/NOTICE.md +1 -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/docs/api/appkit/Class.AppKitMcpClient.md +157 -0
  20. package/docs/api/appkit/Class.DatabricksAdapter.md +151 -0
  21. package/docs/api/appkit/Function.agentIdFromMarkdownPath.md +18 -0
  22. package/docs/api/appkit/Function.createAgent.md +33 -0
  23. package/docs/api/appkit/Function.defineTool.md +26 -0
  24. package/docs/api/appkit/Function.executeFromRegistry.md +25 -0
  25. package/docs/api/appkit/Function.functionToolToDefinition.md +16 -0
  26. package/docs/api/appkit/Function.isFunctionTool.md +16 -0
  27. package/docs/api/appkit/Function.isHostedTool.md +16 -0
  28. package/docs/api/appkit/Function.isToolkitEntry.md +18 -0
  29. package/docs/api/appkit/Function.loadAgentFromFile.md +21 -0
  30. package/docs/api/appkit/Function.loadAgentsFromDir.md +26 -0
  31. package/docs/api/appkit/Function.mcpServer.md +28 -0
  32. package/docs/api/appkit/Function.parseTextToolCalls.md +26 -0
  33. package/docs/api/appkit/Function.resolveHostedTools.md +16 -0
  34. package/docs/api/appkit/Function.runAgent.md +26 -0
  35. package/docs/api/appkit/Function.tool.md +28 -0
  36. package/docs/api/appkit/Function.toolsFromRegistry.md +20 -0
  37. package/docs/api/appkit/Interface.AgentAdapter.md +21 -0
  38. package/docs/api/appkit/Interface.AgentDefinition.md +112 -0
  39. package/docs/api/appkit/Interface.AgentInput.md +37 -0
  40. package/docs/api/appkit/Interface.AgentRunContext.md +32 -0
  41. package/docs/api/appkit/Interface.AgentToolDefinition.md +37 -0
  42. package/docs/api/appkit/Interface.AgentsPluginConfig.md +241 -0
  43. package/docs/api/appkit/Interface.AutoInheritToolsConfig.md +27 -0
  44. package/docs/api/appkit/Interface.BasePluginConfig.md +1 -0
  45. package/docs/api/appkit/Interface.FunctionTool.md +80 -0
  46. package/docs/api/appkit/Interface.McpConnectAllResult.md +38 -0
  47. package/docs/api/appkit/Interface.Message.md +55 -0
  48. package/docs/api/appkit/Interface.PluginToolkitProvider.md +22 -0
  49. package/docs/api/appkit/Interface.PromptContext.md +30 -0
  50. package/docs/api/appkit/Interface.RegisteredAgent.md +75 -0
  51. package/docs/api/appkit/Interface.RunAgentInput.md +34 -0
  52. package/docs/api/appkit/Interface.RunAgentResult.md +23 -0
  53. package/docs/api/appkit/Interface.Thread.md +46 -0
  54. package/docs/api/appkit/Interface.ThreadStore.md +103 -0
  55. package/docs/api/appkit/Interface.ToolAnnotations.md +56 -0
  56. package/docs/api/appkit/Interface.ToolConfig.md +72 -0
  57. package/docs/api/appkit/Interface.ToolEntry.md +73 -0
  58. package/docs/api/appkit/Interface.ToolProvider.md +38 -0
  59. package/docs/api/appkit/Interface.ToolkitEntry.md +59 -0
  60. package/docs/api/appkit/Interface.ToolkitOptions.md +45 -0
  61. package/docs/api/appkit/TypeAlias.AgentEvent.md +299 -0
  62. package/docs/api/appkit/TypeAlias.AgentTool.md +11 -0
  63. package/docs/api/appkit/TypeAlias.AgentTools.md +8 -0
  64. package/docs/api/appkit/TypeAlias.AgentToolsFn.md +20 -0
  65. package/docs/api/appkit/TypeAlias.BaseSystemPromptOption.md +9 -0
  66. package/docs/api/appkit/TypeAlias.HostedTool.md +10 -0
  67. package/docs/api/appkit/TypeAlias.Plugins.md +26 -0
  68. package/docs/api/appkit/TypeAlias.ResolvedToolEntry.md +29 -0
  69. package/docs/api/appkit/TypeAlias.ToolRegistry.md +6 -0
  70. package/docs/api/appkit/Variable.agents.md +19 -0
  71. package/docs/api/appkit.md +113 -62
  72. package/docs/plugins/agents.md +441 -0
  73. package/llms.txt +53 -1
  74. package/package.json +1 -1
  75. package/sbom.cdx.json +1 -1
@@ -0,0 +1,21 @@
1
+ # Function: loadAgentFromFile()
2
+
3
+ ```ts
4
+ function loadAgentFromFile(filePath: string, ctx: LoadContext): Promise<AgentDefinition>;
5
+
6
+ ```
7
+
8
+ Loads a single markdown agent file and resolves its frontmatter against registered plugin toolkits + ambient tool library.
9
+
10
+ Rejects non-empty `agents:` frontmatter because single-file loads have no siblings to resolve sub-agent references against — callers must use [loadAgentsFromDir](./docs/api/appkit/Function.loadAgentsFromDir.md) when markdown agents delegate to one another.
11
+
12
+ ## Parameters[​](#parameters "Direct link to Parameters")
13
+
14
+ | Parameter | Type |
15
+ | ---------- | ------------- |
16
+ | `filePath` | `string` |
17
+ | `ctx` | `LoadContext` |
18
+
19
+ ## Returns[​](#returns "Direct link to Returns")
20
+
21
+ `Promise`<[`AgentDefinition`](./docs/api/appkit/Interface.AgentDefinition.md)>
@@ -0,0 +1,26 @@
1
+ # Function: loadAgentsFromDir()
2
+
3
+ ```ts
4
+ function loadAgentsFromDir(dir: string, ctx: LoadContext): Promise<LoadResult>;
5
+
6
+ ```
7
+
8
+ Scans a directory for one subdirectory per agent, each containing `agent.md` (frontmatter + body). Produces an `AgentDefinition` record keyed by agent id (folder name). Throws on frontmatter errors or unresolved references. Returns an empty map if the directory does not exist.
9
+
10
+ Legacy top-level `*.md` files are rejected with an error — migrate each to `<id>/agent.md` under a sibling folder named for the agent id.
11
+
12
+ Runs in two passes so sub-agent references in frontmatter (`agents: [...]`) can be resolved regardless of directory iteration order:
13
+
14
+ 1. Build every agent's definition from its own `agent.md`.
15
+ 2. Walk `agents:` references and wire `def.agents = { child: childDef }` by looking them up in the complete map. Dangling names and self-references fail loudly; mutual delegation is allowed and bounded at runtime by `limits.maxSubAgentDepth`.
16
+
17
+ ## Parameters[​](#parameters "Direct link to Parameters")
18
+
19
+ | Parameter | Type |
20
+ | --------- | ------------- |
21
+ | `dir` | `string` |
22
+ | `ctx` | `LoadContext` |
23
+
24
+ ## Returns[​](#returns "Direct link to Returns")
25
+
26
+ `Promise`<`LoadResult`>
@@ -0,0 +1,28 @@
1
+ # Function: mcpServer()
2
+
3
+ ```ts
4
+ function mcpServer(name: string, url: string): CustomMcpServerTool;
5
+
6
+ ```
7
+
8
+ Factory for declaring a custom MCP server tool.
9
+
10
+ Replaces the verbose `{ type: "custom_mcp_server", custom_mcp_server: { app_name, app_url } }` wrapper with a concise positional call.
11
+
12
+ Example:
13
+
14
+ ```ts
15
+ mcpServer("my-app", "https://my-app.databricksapps.com/mcp")
16
+
17
+ ```
18
+
19
+ ## Parameters[​](#parameters "Direct link to Parameters")
20
+
21
+ | Parameter | Type |
22
+ | --------- | -------- |
23
+ | `name` | `string` |
24
+ | `url` | `string` |
25
+
26
+ ## Returns[​](#returns "Direct link to Returns")
27
+
28
+ `CustomMcpServerTool`
@@ -0,0 +1,26 @@
1
+ # Function: parseTextToolCalls()
2
+
3
+ ```ts
4
+ function parseTextToolCalls(text: string): {
5
+ args: unknown;
6
+ name: string;
7
+ }[];
8
+
9
+ ```
10
+
11
+ Parses text-based tool calls from model output.
12
+
13
+ Handles two formats:
14
+
15
+ 1. Llama native: `[{"name": "tool_name", "parameters": {"arg": "val"}}]`
16
+ 2. Python-style: `[tool_name(arg1='val1', arg2='val2')]`
17
+
18
+ ## Parameters[​](#parameters "Direct link to Parameters")
19
+
20
+ | Parameter | Type |
21
+ | --------- | -------- |
22
+ | `text` | `string` |
23
+
24
+ ## Returns[​](#returns "Direct link to Returns")
25
+
26
+ { `args`: `unknown`; `name`: `string`; }\[]
@@ -0,0 +1,16 @@
1
+ # Function: resolveHostedTools()
2
+
3
+ ```ts
4
+ function resolveHostedTools(tools: HostedTool[]): McpEndpointConfig[];
5
+
6
+ ```
7
+
8
+ ## Parameters[​](#parameters "Direct link to Parameters")
9
+
10
+ | Parameter | Type |
11
+ | --------- | ------------------------------------------------------------------ |
12
+ | `tools` | [`HostedTool`](./docs/api/appkit/TypeAlias.HostedTool.md)\[] |
13
+
14
+ ## Returns[​](#returns "Direct link to Returns")
15
+
16
+ `McpEndpointConfig`\[]
@@ -0,0 +1,26 @@
1
+ # Function: runAgent()
2
+
3
+ ```ts
4
+ function runAgent(def: AgentDefinition, input: RunAgentInput): Promise<RunAgentResult>;
5
+
6
+ ```
7
+
8
+ Standalone agent execution without `createApp`. Resolves the adapter, binds inline tools, and drives the adapter's `run()` loop to completion.
9
+
10
+ Limitations vs. running through the agents() plugin:
11
+
12
+ * **No OBO and no approval gate** — there is no HTTP request, so plugin tools run as the service principal. The agents-plugin approval gate that prompts for human confirmation on `effect: "write" | "update" | "destructive"` tools is also absent. LLM-controlled tool arguments flow straight through to the SP. Treat standalone runAgent as a trusted-prompt environment (CI, batch eval, internal scripts) — not as an exposed user-facing surface.
13
+ * **Hosted tools (MCP) are not supported** — they require a live MCP client that only exists inside the agents plugin's lifecycle. `runAgent` rejects them at index-build time with a clear error.
14
+ * **Sub-agents** (`agents: { ... }` on the def) are executed as nested `runAgent` calls with no shared thread state. Plugin instances ARE shared across the recursion (same cache as the parent).
15
+ * **Plugin tools** (used inside the function form via `plugins.<name>.toolkit(...)`) require passing `plugins: [...]` via `RunAgentInput`. Each plugin in that array is constructed once, `attachContext({})` and `await setup()` are called eagerly, and the resulting instance is shared across the top-level run and all sub-agent recursions. Plugins whose `setup()` requires runtime that only `createApp` provides (e.g. `WorkspaceClient`, `ServiceContext`, `PluginContext`) throw at standalone-init time with a clear "use createApp instead" message — not mid-stream.
16
+
17
+ ## Parameters[​](#parameters "Direct link to Parameters")
18
+
19
+ | Parameter | Type |
20
+ | --------- | ------------------------------------------------------------------------- |
21
+ | `def` | [`AgentDefinition`](./docs/api/appkit/Interface.AgentDefinition.md) |
22
+ | `input` | [`RunAgentInput`](./docs/api/appkit/Interface.RunAgentInput.md) |
23
+
24
+ ## Returns[​](#returns "Direct link to Returns")
25
+
26
+ `Promise`<[`RunAgentResult`](./docs/api/appkit/Interface.RunAgentResult.md)>
@@ -0,0 +1,28 @@
1
+ # Function: tool()
2
+
3
+ ```ts
4
+ function tool<S>(config: ToolConfig<S>): FunctionTool;
5
+
6
+ ```
7
+
8
+ Factory for defining function tools with Zod schemas.
9
+
10
+ * Generates JSON Schema (for the LLM) from the Zod schema via `z.toJSONSchema()`.
11
+ * Infers the `execute` argument type from the schema.
12
+ * Validates tool call arguments at runtime. On validation failure, returns a formatted error string to the LLM instead of throwing, so the model can self-correct on its next turn.
13
+
14
+ ## Type Parameters[​](#type-parameters "Direct link to Type Parameters")
15
+
16
+ | Type Parameter |
17
+ | ---------------------------------------------------------------------------------------- |
18
+ | `S` *extends* `ZodType`<`unknown`, `unknown`, `$ZodTypeInternals`<`unknown`, `unknown`>> |
19
+
20
+ ## Parameters[​](#parameters "Direct link to Parameters")
21
+
22
+ | Parameter | Type |
23
+ | --------- | -------------------------------------------------------------------- |
24
+ | `config` | [`ToolConfig`](./docs/api/appkit/Interface.ToolConfig.md)<`S`> |
25
+
26
+ ## Returns[​](#returns "Direct link to Returns")
27
+
28
+ [`FunctionTool`](./docs/api/appkit/Interface.FunctionTool.md)
@@ -0,0 +1,20 @@
1
+ # Function: toolsFromRegistry()
2
+
3
+ ```ts
4
+ function toolsFromRegistry(registry: ToolRegistry): AgentToolDefinition[];
5
+
6
+ ```
7
+
8
+ Produces the `AgentToolDefinition[]` a ToolProvider exposes to the LLM, deriving `parameters` JSON Schema from each entry's Zod schema.
9
+
10
+ Tool names come from registry keys (supports dotted names like `uploads.list` for dynamic plugins).
11
+
12
+ ## Parameters[​](#parameters "Direct link to Parameters")
13
+
14
+ | Parameter | Type |
15
+ | ---------- | ------------------------------------------------------------------- |
16
+ | `registry` | [`ToolRegistry`](./docs/api/appkit/TypeAlias.ToolRegistry.md) |
17
+
18
+ ## Returns[​](#returns "Direct link to Returns")
19
+
20
+ [`AgentToolDefinition`](./docs/api/appkit/Interface.AgentToolDefinition.md)\[]
@@ -0,0 +1,21 @@
1
+ # Interface: AgentAdapter
2
+
3
+ ## Methods[​](#methods "Direct link to Methods")
4
+
5
+ ### run()[​](#run "Direct link to run()")
6
+
7
+ ```ts
8
+ run(input: AgentInput, context: AgentRunContext): AsyncGenerator<AgentEvent, void, unknown>;
9
+
10
+ ```
11
+
12
+ #### Parameters[​](#parameters "Direct link to Parameters")
13
+
14
+ | Parameter | Type |
15
+ | --------- | ------------------------------------------------------------------------- |
16
+ | `input` | [`AgentInput`](./docs/api/appkit/Interface.AgentInput.md) |
17
+ | `context` | [`AgentRunContext`](./docs/api/appkit/Interface.AgentRunContext.md) |
18
+
19
+ #### Returns[​](#returns "Direct link to Returns")
20
+
21
+ `AsyncGenerator`<[`AgentEvent`](./docs/api/appkit/TypeAlias.AgentEvent.md), `void`, `unknown`>
@@ -0,0 +1,112 @@
1
+ # Interface: AgentDefinition
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### agents?[​](#agents "Direct link to agents?")
6
+
7
+ ```ts
8
+ optional agents: Record<string, AgentDefinition>;
9
+
10
+ ```
11
+
12
+ Sub-agents, exposed as `agent-<key>` tools on this agent.
13
+
14
+ ***
15
+
16
+ ### baseSystemPrompt?[​](#basesystemprompt "Direct link to baseSystemPrompt?")
17
+
18
+ ```ts
19
+ optional baseSystemPrompt: BaseSystemPromptOption;
20
+
21
+ ```
22
+
23
+ Override the plugin's baseSystemPrompt for this agent only.
24
+
25
+ ***
26
+
27
+ ### ephemeral?[​](#ephemeral "Direct link to ephemeral?")
28
+
29
+ ```ts
30
+ optional ephemeral: boolean;
31
+
32
+ ```
33
+
34
+ When true, the thread used for a chat request against this agent is deleted from `ThreadStore` after the stream completes (success or failure). Use for stateless one-shot agents — e.g. autocomplete, where each request is independent and retaining history would both poison future calls and accumulate unbounded state in the default `InMemoryThreadStore`. Defaults to `false`.
35
+
36
+ ***
37
+
38
+ ### instructions[​](#instructions "Direct link to instructions")
39
+
40
+ ```ts
41
+ instructions: string;
42
+
43
+ ```
44
+
45
+ System prompt body. For markdown-loaded agents this is the file body.
46
+
47
+ ***
48
+
49
+ ### maxSteps?[​](#maxsteps "Direct link to maxSteps?")
50
+
51
+ ```ts
52
+ optional maxSteps: number;
53
+
54
+ ```
55
+
56
+ ***
57
+
58
+ ### maxTokens?[​](#maxtokens "Direct link to maxTokens?")
59
+
60
+ ```ts
61
+ optional maxTokens: number;
62
+
63
+ ```
64
+
65
+ ***
66
+
67
+ ### model?[​](#model "Direct link to model?")
68
+
69
+ ```ts
70
+ optional model:
71
+ | string
72
+ | AgentAdapter
73
+ | Promise<AgentAdapter>;
74
+
75
+ ```
76
+
77
+ Model adapter (or endpoint-name string sugar for `DatabricksAdapter.fromServingEndpoint({ endpointName })`). Optional — falls back to the plugin's `defaultModel`.
78
+
79
+ ***
80
+
81
+ ### name?[​](#name "Direct link to name?")
82
+
83
+ ```ts
84
+ optional name: string;
85
+
86
+ ```
87
+
88
+ Stable identifier for the agent. **Optional and informational** — when the definition is registered via `agents: { foo: def }` (code) or lives at `config/agents/<id>/agent.md` (markdown), the **registry key always wins** and `name` is ignored. The agent will be reachable as `foo` (or `<id>`) regardless of what this field contains.
89
+
90
+ Set `name` when:
91
+
92
+ * Running standalone via `runAgent({ agent: def })`, where there is no enclosing key. The runtime uses it for the agent's slot in error messages and OTel spans.
93
+ * Building a definition that may be passed to either form and you want a consistent fallback label.
94
+
95
+ Setting `name` to a value that differs from the registry key is harmless but confusing — prefer keeping them aligned or omitting `name` entirely.
96
+
97
+ ***
98
+
99
+ ### tools?[​](#tools "Direct link to tools?")
100
+
101
+ ```ts
102
+ optional tools:
103
+ | AgentTools
104
+ | AgentToolsFn;
105
+
106
+ ```
107
+
108
+ Per-agent tool record. Key is the LLM-visible tool-call name.
109
+
110
+ Accepts either a plain record (for agents that only use inline tools) or a function `(plugins) => Record<string, AgentTool>` that receives the typed [Plugins](./docs/api/appkit/TypeAlias.Plugins.md) map and returns a tool record (for agents that pull tools from registered plugins).
111
+
112
+ The function is invoked once at agent setup; the result is cached. Don't put per-request logic in there.
@@ -0,0 +1,37 @@
1
+ # Interface: AgentInput
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### messages[​](#messages "Direct link to messages")
6
+
7
+ ```ts
8
+ messages: Message[];
9
+
10
+ ```
11
+
12
+ ***
13
+
14
+ ### signal?[​](#signal "Direct link to signal?")
15
+
16
+ ```ts
17
+ optional signal: AbortSignal;
18
+
19
+ ```
20
+
21
+ ***
22
+
23
+ ### threadId[​](#threadid "Direct link to threadId")
24
+
25
+ ```ts
26
+ threadId: string;
27
+
28
+ ```
29
+
30
+ ***
31
+
32
+ ### tools[​](#tools "Direct link to tools")
33
+
34
+ ```ts
35
+ tools: AgentToolDefinition[];
36
+
37
+ ```
@@ -0,0 +1,32 @@
1
+ # Interface: AgentRunContext
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### executeTool()[​](#executetool "Direct link to executeTool()")
6
+
7
+ ```ts
8
+ executeTool: (name: string, args: unknown) => Promise<unknown>;
9
+
10
+ ```
11
+
12
+ Tool implementations should sanitize failure text — errors become `tool_result.error` and can flow back into the LLM transcript.
13
+
14
+ #### Parameters[​](#parameters "Direct link to Parameters")
15
+
16
+ | Parameter | Type |
17
+ | --------- | --------- |
18
+ | `name` | `string` |
19
+ | `args` | `unknown` |
20
+
21
+ #### Returns[​](#returns "Direct link to Returns")
22
+
23
+ `Promise`<`unknown`>
24
+
25
+ ***
26
+
27
+ ### signal?[​](#signal "Direct link to signal?")
28
+
29
+ ```ts
30
+ optional signal: AbortSignal;
31
+
32
+ ```
@@ -0,0 +1,37 @@
1
+ # Interface: AgentToolDefinition
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### annotations?[​](#annotations "Direct link to annotations?")
6
+
7
+ ```ts
8
+ optional annotations: ToolAnnotations;
9
+
10
+ ```
11
+
12
+ ***
13
+
14
+ ### description[​](#description "Direct link to description")
15
+
16
+ ```ts
17
+ description: string;
18
+
19
+ ```
20
+
21
+ ***
22
+
23
+ ### name[​](#name "Direct link to name")
24
+
25
+ ```ts
26
+ name: string;
27
+
28
+ ```
29
+
30
+ ***
31
+
32
+ ### parameters[​](#parameters "Direct link to parameters")
33
+
34
+ ```ts
35
+ parameters: JSONSchema7;
36
+
37
+ ```
@@ -0,0 +1,241 @@
1
+ # Interface: AgentsPluginConfig
2
+
3
+ Base configuration interface for AppKit plugins
4
+
5
+ ## Extends[​](#extends "Direct link to Extends")
6
+
7
+ * [`BasePluginConfig`](./docs/api/appkit/Interface.BasePluginConfig.md)
8
+
9
+ ## Indexable[​](#indexable "Direct link to Indexable")
10
+
11
+ ```ts
12
+ [key: string]: unknown
13
+
14
+ ```
15
+
16
+ ## Properties[​](#properties "Direct link to Properties")
17
+
18
+ ### agents?[​](#agents "Direct link to agents?")
19
+
20
+ ```ts
21
+ optional agents: Record<string, AgentDefinition>;
22
+
23
+ ```
24
+
25
+ Code-defined agents, merged with file-loaded ones (code wins on key collision).
26
+
27
+ ***
28
+
29
+ ### approval?[​](#approval "Direct link to approval?")
30
+
31
+ ```ts
32
+ optional approval: {
33
+ requireForDestructive?: boolean;
34
+ timeoutMs?: number;
35
+ };
36
+
37
+ ```
38
+
39
+ Human-in-the-loop approval gate for mutating tool calls. When enabled (the default), the agents plugin emits an `appkit.approval_pending` SSE event before executing any tool whose annotation flags it as mutating — `effect: "write" | "update" | "destructive"` (preferred) or the legacy `destructive: true` boolean — and waits for a `POST /chat/approve` decision from the same user who initiated the stream. A missing decision after `timeoutMs` auto-denies the call.
40
+
41
+ #### requireForDestructive?[​](#requirefordestructive "Direct link to requireForDestructive?")
42
+
43
+ ```ts
44
+ optional requireForDestructive: boolean;
45
+
46
+ ```
47
+
48
+ Require human approval for tools that mutate state. Triggered by `effect: "write" | "update" | "destructive"` (preferred) or the legacy `destructive: true` boolean. Default: `true`.
49
+
50
+ #### timeoutMs?[​](#timeoutms "Direct link to timeoutMs?")
51
+
52
+ ```ts
53
+ optional timeoutMs: number;
54
+
55
+ ```
56
+
57
+ Milliseconds to wait before auto-denying. Default: 60\_000.
58
+
59
+ ***
60
+
61
+ ### autoInheritTools?[​](#autoinherittools "Direct link to autoInheritTools?")
62
+
63
+ ```ts
64
+ optional autoInheritTools:
65
+ | boolean
66
+ | AutoInheritToolsConfig;
67
+
68
+ ```
69
+
70
+ Whether to auto-inherit every ToolProvider plugin's toolkit. Accepts a boolean shorthand.
71
+
72
+ ***
73
+
74
+ ### baseSystemPrompt?[​](#basesystemprompt "Direct link to baseSystemPrompt?")
75
+
76
+ ```ts
77
+ optional baseSystemPrompt: BaseSystemPromptOption;
78
+
79
+ ```
80
+
81
+ Customize or disable the AppKit base system prompt.
82
+
83
+ ***
84
+
85
+ ### defaultAgent?[​](#defaultagent "Direct link to defaultAgent?")
86
+
87
+ ```ts
88
+ optional defaultAgent: string;
89
+
90
+ ```
91
+
92
+ Agent used when clients don't specify one. Defaults to the first-registered agent or the file with `default: true` frontmatter.
93
+
94
+ ***
95
+
96
+ ### defaultModel?[​](#defaultmodel "Direct link to defaultModel?")
97
+
98
+ ```ts
99
+ optional defaultModel:
100
+ | string
101
+ | AgentAdapter
102
+ | Promise<AgentAdapter>;
103
+
104
+ ```
105
+
106
+ Default model for agents that don't specify their own (in code or frontmatter).
107
+
108
+ ***
109
+
110
+ ### dir?[​](#dir "Direct link to dir?")
111
+
112
+ ```ts
113
+ optional dir: string | false;
114
+
115
+ ```
116
+
117
+ Directory of agent packages (`<id>/agent.md` each). Default `./config/agents`. Set to `false` to disable.
118
+
119
+ ***
120
+
121
+ ### host?[​](#host "Direct link to host?")
122
+
123
+ ```ts
124
+ optional host: string;
125
+
126
+ ```
127
+
128
+ #### Inherited from[​](#inherited-from "Direct link to Inherited from")
129
+
130
+ [`BasePluginConfig`](./docs/api/appkit/Interface.BasePluginConfig.md).[`host`](./docs/api/appkit/Interface.BasePluginConfig.md#host)
131
+
132
+ ***
133
+
134
+ ### limits?[​](#limits "Direct link to limits?")
135
+
136
+ ```ts
137
+ optional limits: {
138
+ maxConcurrentStreamsPerUser?: number;
139
+ maxSubAgentDepth?: number;
140
+ maxToolCalls?: number;
141
+ toolCallTimeoutMs?: number;
142
+ };
143
+
144
+ ```
145
+
146
+ Runtime resource limits applied during agent execution. Defaults are tuned to protect a single-instance deployment from a misbehaving user or a runaway prompt injection; tighten or relax as appropriate for the deployment's scale and trust model. Request-body caps (chat message size, invocations input size / length) are enforced statically by the Zod schemas and are not configurable here.
147
+
148
+ #### maxConcurrentStreamsPerUser?[​](#maxconcurrentstreamsperuser "Direct link to maxConcurrentStreamsPerUser?")
149
+
150
+ ```ts
151
+ optional maxConcurrentStreamsPerUser: number;
152
+
153
+ ```
154
+
155
+ Max concurrent chat streams a single user may have open. Subsequent `POST /chat` requests from that user while at-limit are rejected with HTTP 429. Default: `5`.
156
+
157
+ #### maxSubAgentDepth?[​](#maxsubagentdepth "Direct link to maxSubAgentDepth?")
158
+
159
+ ```ts
160
+ optional maxSubAgentDepth: number;
161
+
162
+ ```
163
+
164
+ Max sub-agent recursion depth. Protects against a prompt-injected agent that delegates to a sub-agent which in turn delegates back to itself (directly or transitively). Default: `3`.
165
+
166
+ #### maxToolCalls?[​](#maxtoolcalls "Direct link to maxToolCalls?")
167
+
168
+ ```ts
169
+ optional maxToolCalls: number;
170
+
171
+ ```
172
+
173
+ Max tool invocations per agent run (across the full tool-call graph, including sub-agent invocations). A run that exceeds the budget is aborted with a terminal error event. Default: `50`.
174
+
175
+ #### toolCallTimeoutMs?[​](#toolcalltimeoutms "Direct link to toolCallTimeoutMs?")
176
+
177
+ ```ts
178
+ optional toolCallTimeoutMs: number;
179
+
180
+ ```
181
+
182
+ Per-call timeout for tools dispatched through `PluginContext` (toolkit-routed tools — analytics SQL warehouse queries, Genie messages, Lakebase queries). Independent of `maxToolCalls`: the budget caps how many tools fire per run, this caps how long any single tool call may run. The signal handed to plugin tool implementations combines this timeout with the parent stream's abort signal via `AbortSignal.any`. Function and MCP tools have their own timeouts in their respective adapters and ignore this setting. Default: `300_000` (5 minutes) — generous enough for cold SQL Warehouse round-trips and long Genie conversations.
183
+
184
+ ***
185
+
186
+ ### mcp?[​](#mcp "Direct link to mcp?")
187
+
188
+ ```ts
189
+ optional mcp: McpHostPolicyConfig;
190
+
191
+ ```
192
+
193
+ MCP server host policy. By default only same-origin Databricks workspace URLs may be used as MCP endpoints; custom hosts must be explicitly allowlisted here. Workspace credentials (SP / OBO) are never forwarded to non-workspace hosts.
194
+
195
+ ***
196
+
197
+ ### name?[​](#name "Direct link to name?")
198
+
199
+ ```ts
200
+ optional name: string;
201
+
202
+ ```
203
+
204
+ #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from")
205
+
206
+ [`BasePluginConfig`](./docs/api/appkit/Interface.BasePluginConfig.md).[`name`](./docs/api/appkit/Interface.BasePluginConfig.md#name)
207
+
208
+ ***
209
+
210
+ ### telemetry?[​](#telemetry "Direct link to telemetry?")
211
+
212
+ ```ts
213
+ optional telemetry: TelemetryOptions;
214
+
215
+ ```
216
+
217
+ #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from")
218
+
219
+ [`BasePluginConfig`](./docs/api/appkit/Interface.BasePluginConfig.md).[`telemetry`](./docs/api/appkit/Interface.BasePluginConfig.md#telemetry)
220
+
221
+ ***
222
+
223
+ ### threadStore?[​](#threadstore "Direct link to threadStore?")
224
+
225
+ ```ts
226
+ optional threadStore: ThreadStore;
227
+
228
+ ```
229
+
230
+ Persistent thread store. Default: in-memory.
231
+
232
+ ***
233
+
234
+ ### tools?[​](#tools "Direct link to tools?")
235
+
236
+ ```ts
237
+ optional tools: Record<string, AgentTool>;
238
+
239
+ ```
240
+
241
+ Ambient tool library. Keys may be referenced by markdown frontmatter via `tools: [key1, key2]`.