Skip to content

feat(mason): add manifest-backed LangGraph tools - #484

Merged
elainewang-db merged 12 commits into
databricks:mainfrom
junchoi-db:mason-template-aware-sandbox
Aug 28, 2026
Merged

feat(mason): add manifest-backed LangGraph tools#484
elainewang-db merged 12 commits into
databricks:mainfrom
junchoi-db:mason-template-aware-sandbox

Conversation

@junchoi-db

@junchoi-db junchoi-db commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

This PR adds manifest-backed agent tools to Mason's LangGraph template:

  • mason init --framework langgraph records the selected framework/template in .mason/project.toml.
  • mason tools add sandbox, mcp, python, and uc-function update a canonical, framework-neutral agent.toml.
  • Direct agent.toml edits follow the same contract; no CLI-only generated runtime wiring is required.
  • mason dev and mason deploy load the manifest through the LangGraph runtime adapter and bind native tools/MCP clients.
  • Sandbox scopes stay in protected MCP _meta.downscope; they are not exposed as model-controlled tool arguments.
  • The generated LangGraph App exposes /api/health, /api/invocations, and /api/invocations/{id} aliases for Databricks Apps OAuth ingress.

Scope

This implementation intentionally supports only integrations/mason/templates/agent-langgraph. The manifest and adapter boundary are reusable for OpenAI, Claude Code, and other harnesses, but those adapters are future work.

Approval policy and auth configuration are also out of scope for this PR.

CLI

mason tools add sandbox \
  --scope table:samples.nyctaxi.trips

mason tools add mcp system.ai.web_search

mason tools add python lookup-ticket

mason tools add uc-function catalog.schema.function_name

mason tools list

The Python command creates a user-owned tool stub and test. MCP, sandbox, and UC-function entries remain declarative; the runtime adapter creates the framework-native objects at dev/deploy startup.

Proof of work

Canonical df1 E2E metric report — exact commands first

At commit 08b56dede3ae6979ac66b573dddd0ed3a6a3dd35, the full matrix passed on production df1:

Authoring Runtime Sandbox system.ai.web_search Python UC function
CLI mason dev PASS PASS PASS PASS
Direct agent.toml mason dev PASS PASS PASS PASS
CLI mason deploy PASS PASS PASS PASS
Direct agent.toml mason deploy PASS PASS PASS PASS

Result: 16 passed, 0 failed, 0 skipped.

Semantic proof:

  • sandbox called the production system.ai.sandbox MCP with read-only samples.nyctaxi.trips downscope and returned MASON_SANDBOX_OK;
  • MCP called system.ai.web_search and returned a Databricks documentation title and HTTPS URL;
  • Python returned MASON_PYTHON_OK;
  • supervisor_agent.mason_agent_tools_e2e.mason_uc_3264637c returned MASON_UC_OK:matrix;
  • both deployed Apps are RUNNING and were intentionally retained for a demo:

Artifact integrity:

  • wheel SHA-256: b2947e1ce7f2dd72c3c4c4c5a12e732a89ab0bb28f6aa82cd1672e9a89f886d1;
  • structured evidence SHA-256: 0c2e74130a1eab1b873aee00c3b396c3dc939284dc6bf093cd27b30a884c1327;
  • published report round-trip SHA-256: 6cebc625a9b6b9a0d78979e3e3f69f688a448513c6220eba3d835c00575b2a2b.

Local gates at this head:

  • Python 3.10: 138 passed;
  • Python 3.12 with all extras: 138 passed;
  • Ruff check/format and Ty: passed;
  • clean wheel install and CLI launch: passed;
  • template route test: passed.

Exact E2E command

cd integrations/mason
uv run python tests/e2e/tool_matrix.py \
  --profile df1 \
  --app-auth-profile df1-oauth-mcp \
  --wheel /tmp/mason-tooling-dist-484/databricks_mason-0.1.0.dev0-py3-none-any.whl \
  --output /tmp/mason-tool-matrix-df1-08b56de-r3 \
  --uc-schema supervisor_agent.mason_agent_tools_e2e \
  --template-repo /home/jun.choi/custom_agent_oss/worktrees/mason-template-aware-sandbox \
  --template-ref mason-template-aware-sandbox \
  --keep-resources

The HTML report contains clean-checkout setup, wheel build, OAuth profile verification, every generated command, all 16 cell durations/results, and retained-resource details.

CI

All Mason lint, typecheck, lowest/highest dependency, and Python-version checks pass. The only red check is the pre-existing typechecking for integrations/openai httpx/httpx2 mismatch, which is outside this LangGraph-only diff and also fails on main.

Design

Mason CLI CUJ

@junchoi-db
junchoi-db force-pushed the mason-template-aware-sandbox branch from c0c7e34 to 3b4704f Compare August 28, 2026 07:21
@elainewang-db
elainewang-db marked this pull request as ready for review August 28, 2026 16:10
@junchoi-db junchoi-db changed the title feat(mason): make add-sandbox template-aware feat(mason): add manifest-backed LangGraph tools Aug 28, 2026
Comment thread integrations/mason/templates/agent-langgraph/README.md
@elainewang-db
elainewang-db merged commit a5136d4 into databricks:main Aug 28, 2026
84 of 85 checks passed
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.

2 participants