databricks-mason 0.1.2.dev0__tar.gz → 0.1.4.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/PKG-INFO +83 -39
  2. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/README.md +79 -35
  3. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/pyproject.toml +4 -4
  4. databricks_mason-0.1.4.dev0/src/databricks_mason/__init__.py +41 -0
  5. databricks_mason-0.1.2.dev0/src/databricks_mason/client.py → databricks_mason-0.1.4.dev0/src/databricks_mason/_api_client.py +124 -54
  6. databricks_mason-0.1.4.dev0/src/databricks_mason/_pagination.py +15 -0
  7. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/agent_project.py +95 -1
  8. databricks_mason-0.1.4.dev0/src/databricks_mason/auth.py +139 -0
  9. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/cli.py +5 -5
  10. databricks_mason-0.1.4.dev0/src/databricks_mason/client.py +28 -0
  11. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/deploy.py +222 -124
  12. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/dev.py +44 -42
  13. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/errors.py +30 -2
  14. databricks_mason-0.1.4.dev0/src/databricks_mason/help.py +285 -0
  15. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/init.py +5 -5
  16. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/langgraph/__init__.py +1 -5
  17. databricks_mason-0.1.4.dev0/src/databricks_mason/langgraph/memory.py +67 -0
  18. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/langgraph/session_store.py +12 -12
  19. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/memory.py +105 -7
  20. databricks_mason-0.1.4.dev0/src/databricks_mason/memory_store.py +356 -0
  21. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/openai/__init__.py +1 -5
  22. databricks_mason-0.1.4.dev0/src/databricks_mason/openai/memory.py +67 -0
  23. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/openai/sessions.py +12 -14
  24. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/render.py +79 -5
  25. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/runtime/tool_manifest.py +61 -1
  26. databricks_mason-0.1.4.dev0/src/databricks_mason/session_store.py +358 -0
  27. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/sessions.py +97 -5
  28. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/store_access.py +6 -1
  29. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/tools.py +46 -0
  30. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/tracing.py +29 -10
  31. databricks_mason-0.1.2.dev0/src/databricks_mason/__init__.py +0 -89
  32. databricks_mason-0.1.2.dev0/src/databricks_mason/auth.py +0 -83
  33. databricks_mason-0.1.2.dev0/src/databricks_mason/help.py +0 -139
  34. databricks_mason-0.1.2.dev0/src/databricks_mason/langgraph/memory.py +0 -63
  35. databricks_mason-0.1.2.dev0/src/databricks_mason/openai/memory.py +0 -63
  36. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/.gitignore +0 -0
  37. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/NOTICE +0 -0
  38. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/langgraph/mcp.py +0 -0
  39. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/mcp.py +0 -0
  40. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/memory_store_access.py +0 -0
  41. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/models.py +0 -0
  42. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/openai/mcp.py +0 -0
  43. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/project_config.py +0 -0
  44. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/py.typed +0 -0
  45. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/runtime/__init__.py +0 -0
  46. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/runtime/background.py +0 -0
  47. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/runtime/session_store_client.py +0 -0
  48. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/runtime/tracing.py +0 -0
  49. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/runtime/workspace.py +0 -0
  50. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/sandbox.py +0 -0
  51. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/session_store_access.py +0 -0
  52. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/templates/python_tool_langgraph.py +0 -0
  53. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/templates/python_tool_test.py +0 -0
  54. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/templates/sandbox_mcp.py +0 -0
  55. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/templates/sandbox_mcp_langgraph.py +0 -0
  56. {databricks_mason-0.1.2.dev0 → databricks_mason-0.1.4.dev0}/src/databricks_mason/timefmt.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: databricks-mason
3
- Version: 0.1.2.dev0
3
+ Version: 0.1.4.dev0
4
4
  Summary: Databricks integration for Mason
5
5
  Author-email: Databricks <agent-feedback@databricks.com>
6
6
  License-File: NOTICE
7
7
  Requires-Python: >=3.10
8
8
  Requires-Dist: click>=8.1
9
- Requires-Dist: databricks-sdk>=0.49
9
+ Requires-Dist: databricks-sdk>=0.94.0
10
10
  Requires-Dist: psycopg[binary]>=3.1
11
11
  Requires-Dist: pyyaml>=6.0
12
12
  Requires-Dist: rich>=13.7
@@ -27,11 +27,11 @@ Requires-Dist: databricks-agents>=1.9.3; extra == 'runtime-openai'
27
27
  Requires-Dist: databricks-openai>=0.13.0; extra == 'runtime-openai'
28
28
  Requires-Dist: fastapi>=0.129.0; extra == 'runtime-openai'
29
29
  Requires-Dist: mlflow>=3.10.1; extra == 'runtime-openai'
30
- Requires-Dist: openai-agents>=0.4.1; extra == 'runtime-openai'
30
+ Requires-Dist: openai-agents>=0.7.0; extra == 'runtime-openai'
31
31
  Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.25.0; extra == 'runtime-openai'
32
32
  Requires-Dist: uuid-utils>=0.10.0; extra == 'runtime-openai'
33
33
  Provides-Extra: tracing
34
- Requires-Dist: mlflow[databricks]>=3.9.0; extra == 'tracing'
34
+ Requires-Dist: mlflow[databricks]>=3.10.1; extra == 'tracing'
35
35
  Description-Content-Type: text/markdown
36
36
 
37
37
  # `databricks-mason`
@@ -62,48 +62,85 @@ For tracing commands, install Mason with tracing extras:
62
62
  pip install 'databricks-mason[tracing]'
63
63
  ```
64
64
 
65
+ ## Shell completion
66
+ Add this to `~/.zshrc`:
67
+ ```sh
68
+ eval "$(_MASON_COMPLETE=zsh_source mason)"
69
+ ```
70
+
65
71
  ## Authentication
66
72
 
67
73
  Mason uses [Databricks authentication](https://docs.databricks.com/aws/en/dev-tools/cli/authentication).
68
- If you do not already have credentials, authenticate a named profile first. You can
69
- then ask Mason to validate and remember that profile:
74
+ Ask Mason to authenticate and remember a named profile:
70
75
 
71
76
  ```sh
72
- databricks auth login --profile <profile>
73
77
  mason login --profile <profile>
74
78
  mason sessions stores list
75
79
  ```
76
80
 
77
- `mason login` does not create credentials; it stores the selected profile in
78
- `~/.mason/config.json`. `mason logout` forgets that selection without revoking the
79
- underlying credentials. If Databricks SDK default authentication is already configured,
80
- you can skip `mason login`. You can also pass `--profile/-p` for an individual command.
81
- Use `--output json` for scripting.
81
+ `mason login` validates existing credentials first. If credentials are missing or rejected in
82
+ an interactive terminal, Mason runs `databricks auth login --profile <profile>`, revalidates the
83
+ profile, and stores the selection in `~/.mason/config.json`. This browser-based setup requires
84
+ the Databricks CLI. In non-interactive environments, authenticate the profile before running
85
+ Mason. `mason logout` forgets the saved selection without revoking the underlying credentials.
86
+
87
+ If Databricks SDK default authentication is already configured, you can skip `mason login`.
88
+ You can also pass the global `--profile/-p` option before an individual command, for example
89
+ `mason --profile <profile> mcp list`. Use `--output json` for scripting.
82
90
 
83
91
  ## Python SDK
84
92
 
85
- The same memory and session APIs are available programmatically through
86
- `MasonClient`, which authenticates exactly like the CLI (a `.databrickscfg` profile
87
- or the SDK's default resolution):
93
+ `MasonClient` adds a small resource-oriented layer over the Mason API. Pass it an
94
+ authenticated Databricks `WorkspaceClient`, or omit the argument to use the
95
+ Databricks SDK's default authentication resolution:
88
96
 
89
97
  ```python
98
+ from databricks.sdk import WorkspaceClient
90
99
  from databricks_mason import MasonClient
91
100
 
92
- client = MasonClient(profile="my-workspace") # or MasonClient() for default auth
101
+ mason = MasonClient(WorkspaceClient(profile="my-workspace"))
102
+
103
+ session_store = mason.session_stores.create("support-agent-sessions")
104
+ session = session_store.add(actor_id="customer-123", session_id="case-456")
105
+ session.append_items(
106
+ [
107
+ {"type": "message", "role": "user", "content": "I need help with my cluster."},
108
+ {"type": "message", "role": "assistant", "content": "Let's take a look."},
109
+ ]
110
+ )
111
+
112
+ memory_store = mason.memory_stores.create("coding-agent-memory")
113
+ memory = memory_store.add(
114
+ actor_id="alice",
115
+ path="/preferences/style.md",
116
+ content="The user prefers concise answers.",
117
+ )
118
+ results = memory_store.search(
119
+ actor_id="alice",
120
+ query="response preferences",
121
+ limit=10,
122
+ )
123
+ memory = memory.update(content="The user prefers very concise answers.")
124
+ memory.delete()
125
+ ```
93
126
 
94
- store = client.create_memory_store("my-store")
95
- print(store.name, store.display_name) # typed attribute access
127
+ The root collections manage stores: `mason.memory_stores.create/get/list` and
128
+ `mason.session_stores.create/get/list`. A returned store owns operations on its
129
+ contents, such as `memory_store.add()`, `memory_store.get("memory-id")`,
130
+ `memory_store.list()`, and `memory_store.search()`, or `session_store.add()`,
131
+ `session_store.get("session-id")`, and `session_store.list()`. Returned memories,
132
+ sessions, and stores own their `update()` and `delete()` operations.
96
133
 
97
- client.create_memory_entry("my-store", actor_id="alice", path="/notes/1.md", content="hi")
98
- for entry in client.list_memory_entries("my-store", actor_id="alice").entries:
99
- print(entry.path, entry.content)
100
- ```
134
+ All `list()` methods return iterators that automatically consume server pages. List
135
+ `page_size` and search `limit` values must be between 1 and 100. `session.list_items()`
136
+ also auto-pages. `session.fork(...)` creates an independent copy, optionally through
137
+ a specific item. Deleting a session with descendants requires
138
+ `session.delete(force=True)` to cascade the deletion.
101
139
 
102
- Each method maps to one `/api/agents/v1` operation. Responses come back as typed
103
- models (`MemoryStore`, `Session`, `SessionItemList`, ...) that expose attribute
104
- accessors (`store.name`) while remaining plain dicts underneath — so `store["name"]`,
105
- `json.dumps(store)`, and any new server-side fields keep working. API errors raise
106
- `databricks_mason.AgentCliError`. Deployment, sandbox, and tracing remain CLI-only.
140
+ The resource layer intentionally does not mirror every API method. Its private
141
+ transport will be replaced by the generated `WorkspaceClient.mason` service when that
142
+ is released, without changing this public surface. Deployment, sandbox, tracing, and
143
+ the existing CLI commands remain separate.
107
144
 
108
145
  ## Commands
109
146
 
@@ -114,12 +151,15 @@ mason [-p <profile>] [-o text|json]
114
151
  init [--framework openai|langgraph] [--disable-chat-app]
115
152
  [--profile P] [--repo URL] [--ref REF] [directory]
116
153
  dev [--source PATH] [--prepare-environment] [--app-port PORT]
117
- [--memory/-m N] [--session/-s N]
118
- [--with-traces C.S] [--no-create-stores]
154
+ [--with-traces C.S]
119
155
  memory
156
+ bind STORE [--source PATH] [--no-create-stores]
157
+ unbind [--source PATH]
120
158
  stores create | list | get | update | delete
121
159
  entries create | get | list | search | update | delete
122
160
  sessions create | list | get | update | delete | fork
161
+ bind STORE [--source PATH] [--no-create-stores]
162
+ unbind [--source PATH]
123
163
  stores create | list | get | update | delete
124
164
  items list | append | pop | clear
125
165
  tracing
@@ -133,9 +173,7 @@ mason [-p <profile>] [-o text|json]
133
173
  add uc-function FUNCTION [--name NAME] [--source PATH]
134
174
  add python NAME [--source PATH]
135
175
  list [--source PATH]
136
- deploy <name> --source PATH [--memory/-m N]
137
- [--session/-s N] [--actor-id ID]
138
- [--with-traces C.S] [--no-create-stores]
176
+ deploy <name> --source PATH [--with-traces C.S]
139
177
  deployments list | get | logs | start | stop | delete
140
178
  ```
141
179
 
@@ -153,7 +191,7 @@ mason sessions items append --help
153
191
  For the shortest path from a blank directory to a running and deployed agent:
154
192
 
155
193
  ```sh
156
- mason login --profile my-workspace
194
+ mason login --profile <profile>
157
195
  mason init my-agent
158
196
  cd my-agent
159
197
  mason dev
@@ -176,9 +214,14 @@ mason tools add sandbox --scope table:samples.nyctaxi.trips
176
214
  mason tools add mcp system.ai.web_search
177
215
  mason tools add uc-function catalog.schema.lookup_ticket
178
216
  mason tools add python lookup-ticket
217
+ mason tools remove mcp system.ai.web_search
179
218
  mason tools list
180
219
  ```
181
220
 
221
+ For MCP services, the remove command accepts the same service name as the add command. You can also
222
+ remove any binding by the ID shown in `mason tools list`, for example `mason tools remove
223
+ web_search`. Removal updates only `agent.toml`; Python source and test files remain user-owned.
224
+
182
225
  Discover the MCP Services available to your user before adding one. By default Mason lists the
183
226
  Databricks-managed services in `system.ai`; pass `--schema catalog.schema` for another Unity Catalog
184
227
  schema. Text output includes a copyable add command, while `--output json` returns normalized service
@@ -216,16 +259,17 @@ The chat app includes synchronous, SSE streaming, background polling, Session St
216
259
  and HITL resume UI. The framework-specific overlay adds `ui/`, `runtime/ui.py`, the UI-enabled
217
260
  `runtime/main.py`, and UI tests.
218
261
 
219
- For the full deployed demo, connect both managed stores:
262
+ For the full deployed demo, bind both managed stores, then deploy:
220
263
 
221
264
  ```sh
222
- mason --profile <profile> deploy mason-agent-demo --source . \
223
- --session mason-demo-sessions \
224
- --memory mason-demo-memory \
225
- --actor-id alice
265
+ mason sessions bind mason-demo-sessions
266
+ mason memory bind mason-demo-memory
267
+ mason --profile <profile> deploy mason-agent-demo --source .
226
268
  ```
227
269
 
228
- (Missing stores are created automatically; pass `--no-create-stores` to require they already exist.)
270
+ (Binding creates a missing store automatically; pass `--no-create-stores` to require it already
271
+ exists. The agent reads the bound stores from `agent.toml` at runtime; `deploy` grants the app's
272
+ service principal access to them.)
229
273
 
230
274
  The Databricks Apps `__Host-databricks-app-router` cookie is both the sticky routing key and the
231
275
  application session id. The browser sends it automatically; API clients must reuse it as a cookie.
@@ -26,48 +26,85 @@ For tracing commands, install Mason with tracing extras:
26
26
  pip install 'databricks-mason[tracing]'
27
27
  ```
28
28
 
29
+ ## Shell completion
30
+ Add this to `~/.zshrc`:
31
+ ```sh
32
+ eval "$(_MASON_COMPLETE=zsh_source mason)"
33
+ ```
34
+
29
35
  ## Authentication
30
36
 
31
37
  Mason uses [Databricks authentication](https://docs.databricks.com/aws/en/dev-tools/cli/authentication).
32
- If you do not already have credentials, authenticate a named profile first. You can
33
- then ask Mason to validate and remember that profile:
38
+ Ask Mason to authenticate and remember a named profile:
34
39
 
35
40
  ```sh
36
- databricks auth login --profile <profile>
37
41
  mason login --profile <profile>
38
42
  mason sessions stores list
39
43
  ```
40
44
 
41
- `mason login` does not create credentials; it stores the selected profile in
42
- `~/.mason/config.json`. `mason logout` forgets that selection without revoking the
43
- underlying credentials. If Databricks SDK default authentication is already configured,
44
- you can skip `mason login`. You can also pass `--profile/-p` for an individual command.
45
- Use `--output json` for scripting.
45
+ `mason login` validates existing credentials first. If credentials are missing or rejected in
46
+ an interactive terminal, Mason runs `databricks auth login --profile <profile>`, revalidates the
47
+ profile, and stores the selection in `~/.mason/config.json`. This browser-based setup requires
48
+ the Databricks CLI. In non-interactive environments, authenticate the profile before running
49
+ Mason. `mason logout` forgets the saved selection without revoking the underlying credentials.
50
+
51
+ If Databricks SDK default authentication is already configured, you can skip `mason login`.
52
+ You can also pass the global `--profile/-p` option before an individual command, for example
53
+ `mason --profile <profile> mcp list`. Use `--output json` for scripting.
46
54
 
47
55
  ## Python SDK
48
56
 
49
- The same memory and session APIs are available programmatically through
50
- `MasonClient`, which authenticates exactly like the CLI (a `.databrickscfg` profile
51
- or the SDK's default resolution):
57
+ `MasonClient` adds a small resource-oriented layer over the Mason API. Pass it an
58
+ authenticated Databricks `WorkspaceClient`, or omit the argument to use the
59
+ Databricks SDK's default authentication resolution:
52
60
 
53
61
  ```python
62
+ from databricks.sdk import WorkspaceClient
54
63
  from databricks_mason import MasonClient
55
64
 
56
- client = MasonClient(profile="my-workspace") # or MasonClient() for default auth
65
+ mason = MasonClient(WorkspaceClient(profile="my-workspace"))
66
+
67
+ session_store = mason.session_stores.create("support-agent-sessions")
68
+ session = session_store.add(actor_id="customer-123", session_id="case-456")
69
+ session.append_items(
70
+ [
71
+ {"type": "message", "role": "user", "content": "I need help with my cluster."},
72
+ {"type": "message", "role": "assistant", "content": "Let's take a look."},
73
+ ]
74
+ )
75
+
76
+ memory_store = mason.memory_stores.create("coding-agent-memory")
77
+ memory = memory_store.add(
78
+ actor_id="alice",
79
+ path="/preferences/style.md",
80
+ content="The user prefers concise answers.",
81
+ )
82
+ results = memory_store.search(
83
+ actor_id="alice",
84
+ query="response preferences",
85
+ limit=10,
86
+ )
87
+ memory = memory.update(content="The user prefers very concise answers.")
88
+ memory.delete()
89
+ ```
57
90
 
58
- store = client.create_memory_store("my-store")
59
- print(store.name, store.display_name) # typed attribute access
91
+ The root collections manage stores: `mason.memory_stores.create/get/list` and
92
+ `mason.session_stores.create/get/list`. A returned store owns operations on its
93
+ contents, such as `memory_store.add()`, `memory_store.get("memory-id")`,
94
+ `memory_store.list()`, and `memory_store.search()`, or `session_store.add()`,
95
+ `session_store.get("session-id")`, and `session_store.list()`. Returned memories,
96
+ sessions, and stores own their `update()` and `delete()` operations.
60
97
 
61
- client.create_memory_entry("my-store", actor_id="alice", path="/notes/1.md", content="hi")
62
- for entry in client.list_memory_entries("my-store", actor_id="alice").entries:
63
- print(entry.path, entry.content)
64
- ```
98
+ All `list()` methods return iterators that automatically consume server pages. List
99
+ `page_size` and search `limit` values must be between 1 and 100. `session.list_items()`
100
+ also auto-pages. `session.fork(...)` creates an independent copy, optionally through
101
+ a specific item. Deleting a session with descendants requires
102
+ `session.delete(force=True)` to cascade the deletion.
65
103
 
66
- Each method maps to one `/api/agents/v1` operation. Responses come back as typed
67
- models (`MemoryStore`, `Session`, `SessionItemList`, ...) that expose attribute
68
- accessors (`store.name`) while remaining plain dicts underneath — so `store["name"]`,
69
- `json.dumps(store)`, and any new server-side fields keep working. API errors raise
70
- `databricks_mason.AgentCliError`. Deployment, sandbox, and tracing remain CLI-only.
104
+ The resource layer intentionally does not mirror every API method. Its private
105
+ transport will be replaced by the generated `WorkspaceClient.mason` service when that
106
+ is released, without changing this public surface. Deployment, sandbox, tracing, and
107
+ the existing CLI commands remain separate.
71
108
 
72
109
  ## Commands
73
110
 
@@ -78,12 +115,15 @@ mason [-p <profile>] [-o text|json]
78
115
  init [--framework openai|langgraph] [--disable-chat-app]
79
116
  [--profile P] [--repo URL] [--ref REF] [directory]
80
117
  dev [--source PATH] [--prepare-environment] [--app-port PORT]
81
- [--memory/-m N] [--session/-s N]
82
- [--with-traces C.S] [--no-create-stores]
118
+ [--with-traces C.S]
83
119
  memory
120
+ bind STORE [--source PATH] [--no-create-stores]
121
+ unbind [--source PATH]
84
122
  stores create | list | get | update | delete
85
123
  entries create | get | list | search | update | delete
86
124
  sessions create | list | get | update | delete | fork
125
+ bind STORE [--source PATH] [--no-create-stores]
126
+ unbind [--source PATH]
87
127
  stores create | list | get | update | delete
88
128
  items list | append | pop | clear
89
129
  tracing
@@ -97,9 +137,7 @@ mason [-p <profile>] [-o text|json]
97
137
  add uc-function FUNCTION [--name NAME] [--source PATH]
98
138
  add python NAME [--source PATH]
99
139
  list [--source PATH]
100
- deploy <name> --source PATH [--memory/-m N]
101
- [--session/-s N] [--actor-id ID]
102
- [--with-traces C.S] [--no-create-stores]
140
+ deploy <name> --source PATH [--with-traces C.S]
103
141
  deployments list | get | logs | start | stop | delete
104
142
  ```
105
143
 
@@ -117,7 +155,7 @@ mason sessions items append --help
117
155
  For the shortest path from a blank directory to a running and deployed agent:
118
156
 
119
157
  ```sh
120
- mason login --profile my-workspace
158
+ mason login --profile <profile>
121
159
  mason init my-agent
122
160
  cd my-agent
123
161
  mason dev
@@ -140,9 +178,14 @@ mason tools add sandbox --scope table:samples.nyctaxi.trips
140
178
  mason tools add mcp system.ai.web_search
141
179
  mason tools add uc-function catalog.schema.lookup_ticket
142
180
  mason tools add python lookup-ticket
181
+ mason tools remove mcp system.ai.web_search
143
182
  mason tools list
144
183
  ```
145
184
 
185
+ For MCP services, the remove command accepts the same service name as the add command. You can also
186
+ remove any binding by the ID shown in `mason tools list`, for example `mason tools remove
187
+ web_search`. Removal updates only `agent.toml`; Python source and test files remain user-owned.
188
+
146
189
  Discover the MCP Services available to your user before adding one. By default Mason lists the
147
190
  Databricks-managed services in `system.ai`; pass `--schema catalog.schema` for another Unity Catalog
148
191
  schema. Text output includes a copyable add command, while `--output json` returns normalized service
@@ -180,16 +223,17 @@ The chat app includes synchronous, SSE streaming, background polling, Session St
180
223
  and HITL resume UI. The framework-specific overlay adds `ui/`, `runtime/ui.py`, the UI-enabled
181
224
  `runtime/main.py`, and UI tests.
182
225
 
183
- For the full deployed demo, connect both managed stores:
226
+ For the full deployed demo, bind both managed stores, then deploy:
184
227
 
185
228
  ```sh
186
- mason --profile <profile> deploy mason-agent-demo --source . \
187
- --session mason-demo-sessions \
188
- --memory mason-demo-memory \
189
- --actor-id alice
229
+ mason sessions bind mason-demo-sessions
230
+ mason memory bind mason-demo-memory
231
+ mason --profile <profile> deploy mason-agent-demo --source .
190
232
  ```
191
233
 
192
- (Missing stores are created automatically; pass `--no-create-stores` to require they already exist.)
234
+ (Binding creates a missing store automatically; pass `--no-create-stores` to require it already
235
+ exists. The agent reads the bound stores from `agent.toml` at runtime; `deploy` grants the app's
236
+ service principal access to them.)
193
237
 
194
238
  The Databricks Apps `__Host-databricks-app-router` cookie is both the sticky routing key and the
195
239
  application session id. The browser sends it automatically; API clients must reuse it as a cookie.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "databricks-mason"
3
- version = "0.1.2.dev0"
3
+ version = "0.1.4.dev0"
4
4
  description = "Databricks integration for Mason"
5
5
  authors = [
6
6
  { name="Databricks", email="agent-feedback@databricks.com" },
@@ -9,7 +9,7 @@ readme = "README.md"
9
9
  requires-python = ">=3.10"
10
10
  dependencies = [
11
11
  "click>=8.1",
12
- "databricks-sdk>=0.49",
12
+ "databricks-sdk>=0.94.0",
13
13
  "psycopg[binary]>=3.1",
14
14
  "PyYAML>=6.0",
15
15
  "rich>=13.7",
@@ -19,7 +19,7 @@ dependencies = [
19
19
 
20
20
  [project.optional-dependencies]
21
21
  tracing = [
22
- "mlflow[databricks]>=3.9.0",
22
+ "mlflow[databricks]>=3.10.1",
23
23
  ]
24
24
  # The agent-side runtime helpers a deployed agent imports. Kept as extras so a plain
25
25
  # `pip install databricks-mason` (the CLI) stays light; each template depends on the extra for its
@@ -38,7 +38,7 @@ runtime = [
38
38
  "databricks-agents>=1.9.3",
39
39
  ]
40
40
  runtime-openai = [
41
- "openai-agents>=0.4.1",
41
+ "openai-agents>=0.7.0",
42
42
  "databricks-openai>=0.13.0",
43
43
  "fastapi>=0.129.0",
44
44
  "mlflow>=3.10.1",
@@ -0,0 +1,41 @@
1
+ """High-level Python client and framework-neutral runtime helpers for Mason."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from databricks_mason.client import MasonClient
6
+ from databricks_mason.memory_store import Memory, MemorySearchResult, MemoryStore
7
+ from databricks_mason.session_store import Session, SessionItem, SessionStore
8
+
9
+ if TYPE_CHECKING:
10
+ from databricks_mason.runtime import (
11
+ configure_tracing,
12
+ tag_session,
13
+ workspace_client,
14
+ workspace_headers,
15
+ )
16
+
17
+ __all__ = [
18
+ "MasonClient",
19
+ "Memory",
20
+ "MemorySearchResult",
21
+ "MemoryStore",
22
+ "Session",
23
+ "SessionItem",
24
+ "SessionStore",
25
+ "configure_tracing",
26
+ "tag_session",
27
+ "workspace_client",
28
+ "workspace_headers",
29
+ ]
30
+
31
+ _RUNTIME_REEXPORTS = frozenset(
32
+ {"configure_tracing", "tag_session", "workspace_client", "workspace_headers"}
33
+ )
34
+
35
+
36
+ def __getattr__(name: str) -> object:
37
+ if name in _RUNTIME_REEXPORTS:
38
+ import importlib
39
+
40
+ return getattr(importlib.import_module("databricks_mason.runtime"), name)
41
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")