feat: add use-supervisor-api skill#155
Open
smurching wants to merge 5 commits intodatabricks:mainfrom
Open
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
use-supervisor-apiskill that guides users to build agents using the Databricks Supervisor APIdatabricks-openai, declaring hosted tools (Genie spaces, UC functions, agent endpoints, MCP servers), updatingagent_server/agent.pyto callDatabricksOpenAI().responses.create(), granting resource permissions indatabricks.yml, and beta limitationssync-skills.pyWhat 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 hostedtools 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
temperature) are not supported when tools are passedTest plan
.claude/skills/directories after runninguv run python .scripts/sync-skills.py