Skip to content

feat: add use-supervisor-api skill#155

Open
smurching wants to merge 5 commits intodatabricks:mainfrom
smurching:agent-supervisor-api
Open

feat: add use-supervisor-api skill#155
smurching wants to merge 5 commits intodatabricks:mainfrom
smurching:agent-supervisor-api

Conversation

@smurching
Copy link
Collaborator

@smurching smurching commented Mar 11, 2026

Summary

  • Adds a use-supervisor-api skill that guides users to build agents using the Databricks Supervisor API
  • The skill covers: installing databricks-openai, declaring hosted tools (Genie spaces, UC functions, agent endpoints, MCP servers), updating agent_server/agent.py to call
    DatabricksOpenAI().responses.create(), granting resource permissions in databricks.yml, and beta limitations
  • Skill is synced to all existing templates via sync-skills.py

What is the Supervisor API

The Supervisor API (POST https://{workspace_id}.ai-gateway.{domain}/mlflow/v1/responses) lets Databricks run the tool-selection and synthesis loop server-side. Users declare hosted
tools and call responses.create() — no agent loop code needed.

Currently in Beta — requires AI Gateway (Beta) preview enabled in the workspace.

Beta limitations noted in skill

  • Usage tracking is not supported
  • Cannot mix hosted tools with client-side function tools in the same request
  • Inference parameters (e.g., temperature) are not supported when tools are passed

Test plan

  • Skill appears in all template .claude/skills/ directories after running uv run python .scripts/sync-skills.py

smurching and others added 2 commits March 10, 2026 21:31
Adds a new app template that uses the Databricks Supervisor API
(AI Gateway at /mlflow/v1/responses) for server-side tool execution,
instead of managing an agent loop with the OpenAI Agents SDK.

Key implementation detail: DatabricksOpenAI defaults to
{host}/serving-endpoints, but the Supervisor API is at
{host}/mlflow/v1/responses. _get_client() overrides base_url to
point to the correct AI Gateway endpoint.

Includes unit tests (9 passing) and integration test stubs for the
live staging endpoint.

Signed-off-by: Sid Murching <sid.murching@databricks.com>
- Derive AI Gateway base URL from workspace ID + domain (not workspace host)
  e.g. https://<workspace_id>.ai-gateway.<domain>/mlflow/v1
- Add liteswap staging header via extra_headers per-call
- Fix output serialization: call .model_dump() on each response.output item
- Swap example tool to Genie (NYC taxi space) to demonstrate hosted tools
- Update MODEL to databricks-claude-opus-4-6
- Add unit tests for _ai_gateway_base_url, _get_client, invoke/stream handlers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@smurching smurching changed the title feat: add agent-supervisor-api template feat: add use-supervisor-api skill Mar 16, 2026
smurching and others added 3 commits March 15, 2026 22:22
Adds a skill that guides users to build agents using the Databricks
Supervisor API (hosted tools) instead of a client-side agent loop.
Syncs the skill to all existing templates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tern

- Replace manual AI Gateway URL derivation with use_ai_gateway=True
- Add OBO pattern: cache base URL at startup, create per-request client
  with forwarded user token via x-forwarded-access-token custom_input
- Bump minimum databricks-openai version to 0.14.0
- Drop beta/workspace availability caveats; keep real API constraints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sor-api skill

The agent_endpoint tool type routes through KATool which always sends
ka_query as the input parameter — a KA-specific protocol. Regular
LangGraph/OpenAI agents don't implement this protocol and will fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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