Skip to content

Commit 2dc68ab

Browse files
authored
docs: fix agents plugin route paths and beta import sources (#495)
Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
1 parent 2836749 commit 2dc68ab

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/docs/plugins/agents.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Or skip serving-endpoint setup entirely with the managed [Supervisor API adapter
2525
`agents` is a regular plugin. Add it to `plugins[]` alongside `server()` and any ToolProvider plugins whose tools you want agents to reach.
2626

2727
```ts
28-
import { agents, analytics, createApp, files, server } from "@databricks/appkit";
28+
import { analytics, createApp, files, server } from "@databricks/appkit";
2929
import { agents } from "@databricks/appkit/beta";
3030

3131
await createApp({
@@ -180,7 +180,7 @@ Each key in `agents: {...}` on an `AgentDefinition` becomes an `agent-<key>` too
180180
## Level 5: standalone (no `createApp`)
181181

182182
```ts
183-
import { createAgent, runAgent, tool } from "@databricks/appkit";
183+
import { createAgent, runAgent, tool } from "@databricks/appkit/beta";
184184
import { z } from "zod";
185185

186186
const classifier = createAgent({
@@ -230,8 +230,8 @@ MCP hosted tools (`mcpServer(...)`) still require `agents()` (they need a live M
230230
The minimal agent is one extra line versus a markdown agent:
231231

232232
```ts
233-
import { createApp, createAgent } from "@databricks/appkit";
234-
import { agents, DatabricksAdapter } from "@databricks/appkit/beta";
233+
import { createApp } from "@databricks/appkit";
234+
import { agents, createAgent, DatabricksAdapter } from "@databricks/appkit/beta";
235235

236236
await createApp({
237237
plugins: [
@@ -256,8 +256,8 @@ await createApp({
256256
Expose Genie spaces, Unity Catalog functions/connections, Knowledge Assistants, or other AppKit apps to the model by declaring them as agent tools — same place every other tool is declared. Execution stays server-side; you write no tool code:
257257

258258
```ts
259-
import { createAgent } from "@databricks/appkit";
260259
import {
260+
createAgent,
261261
DatabricksAdapter,
262262
supervisorTools,
263263
} from "@databricks/appkit/beta";
@@ -482,10 +482,10 @@ Flow:
482482

483483
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`.
484484
2. The chat client renders an approval prompt (see the reference app's approval card).
485-
3. The same user who initiated the stream posts the decision to `POST /api/agent/approve`:
485+
3. The same user who initiated the stream posts the decision to `POST /api/agents/approve`:
486486

487487
```http
488-
POST /api/agent/approve
488+
POST /api/agents/approve
489489
Content-Type: application/json
490490
X-Forwarded-User: <end-user id>
491491
X-Forwarded-Access-Token: <OBO token>
@@ -494,7 +494,7 @@ Flow:
494494
```
495495
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.
496496

497-
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.
497+
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/agents/cancel` denies every pending approval on that stream.
498498

499499
### Resource limits
500500

0 commit comments

Comments
 (0)