Skip to content

feat(appkit): supervisor API adapter for agents plugin#345

Open
hubertzub-db wants to merge 1 commit into
databricks:mainfrom
hubertzub-db:agent/v2/sa/1-adapter
Open

feat(appkit): supervisor API adapter for agents plugin#345
hubertzub-db wants to merge 1 commit into
databricks:mainfrom
hubertzub-db:agent/v2/sa/1-adapter

Conversation

@hubertzub-db
Copy link
Copy Markdown

@hubertzub-db hubertzub-db commented May 5, 2026

Adds a fourth AgentAdapter that targets the Databricks AI Gateway Responses API, so AppKit apps can host server-side-orchestrated agents (Genie, Knowledge Assistants, UC functions, custom apps, UC connections) without managing tool execution locally.

import { fromSupervisorApi, supervisorTools } from "@databricks/appkit/agents/supervisor-api";

const supervisor = createAgent({
  instructions: "You are an assistant powered by the Databricks Supervisor API.",
  model: await fromSupervisorApi({
    model: "databricks-claude-sonnet-4-5",
    tools: [
      supervisorTools.genieSpace("01ABCDEF12345678", "NYC taxi trip records and zones"),
      supervisorTools.ucFunction("main.default.add", "Adds two integers and returns the sum."),
    ],
  }),
});

What's new

  • fromSupervisorApi({...}) — factory that returns an AgentAdapter. Uses the SDK's default credential chain (env, profiles, OAuth, OIDC) just like DatabricksAdapter.fromModelServing.
  • supervisorTools.* — concise factories for the five hosted tool types (genieSpace, ucFunction, knowledgeAssistant, app, ucConnection). description is required on every one — it's both validation and the routing hint the LLM uses to choose between tools.
  • @databricks/appkit/agents/supervisor-api — new subpath export so consumers pick only the adapter they want; mirrors the existing ./agents/{databricks,vercel-ai,langchain} pattern.

Reference app

Demo supervisor agent in apps/dev-playground/server/index.ts. Tools are commented out by default — uncomment any supervisorTools.* entry to give the model real powers.

Test plan

appkit_agent
  • Manual tests
  • 39 new tests (13 SSE reader + 26 adapter / factory).
  • Full appkit vitest suite passes; typecheck clean.

@hubertzub-db hubertzub-db requested a review from a team as a code owner May 5, 2026 13:30
@hubertzub-db hubertzub-db requested a review from pkosiec May 5, 2026 13:30
@hubertzub-db hubertzub-db changed the title Agent/v2/sa/1 adapter Agents plugin: supervisor API adapter May 6, 2026
@hubertzub-db hubertzub-db force-pushed the agent/v2/sa/1-adapter branch from 888f8ba to bdcc529 Compare May 7, 2026 13:27
@hubertzub-db hubertzub-db changed the title Agents plugin: supervisor API adapter feat(appkit): supervisor API adapter for agents plugin May 7, 2026
@hubertzub-db hubertzub-db force-pushed the agent/v2/sa/1-adapter branch 2 times, most recently from 29c1702 to 2db7108 Compare May 18, 2026 08:57
@hubertzub-db hubertzub-db force-pushed the agent/v2/sa/1-adapter branch from 2db7108 to 19d7450 Compare May 18, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant