Add intuitive resource APIs to MasonClient - #482
Open
annzhang-db wants to merge 10 commits into
Open
Conversation
smurching
reviewed
Aug 28, 2026
smurching
left a comment
Collaborator
There was a problem hiding this comment.
@annzhang-db thanks for adding this, how did you test it/did we do any validation to make sure the generated APIs are similar to what will eventually land in Databricks SDK?
annzhang-db
force-pushed
the
add-mason-sdk
branch
5 times, most recently
from
September 1, 2026 18:05
f3913c5 to
ac17efc
Compare
annzhang-db
force-pushed
the
add-mason-sdk
branch
from
September 1, 2026 23:48
e08fef5 to
8d06260
Compare
Contributor
|
for operations on the MemoryStore entity, should we simplify it to: etc. similar for session store. |
Adds an ergonomic SDK layer (DatabricksAgentClient + typed resource handles) over the existing AgentApiClient, alongside the CLI. It returns typed models instead of raw dicts, auto-consumes pagination, and adds convenience lookups (get-or-create memory stores, read-modify-write append). No existing modules are changed except additive package exports. Co-authored-by: Isaac <no-reply@databricks.com>
annzhang-db
force-pushed
the
add-mason-sdk
branch
from
September 2, 2026 22:01
24edf47 to
7342201
Compare
qinxinw-db
approved these changes
Sep 3, 2026
qinxinw-db
left a comment
Contributor
There was a problem hiding this comment.
The api shape looks good to me!
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.
Adds a small resource-oriented Python SDK over the Mason APIs. It returns typed resource handles, automatically consumes paginated list results, and keeps updates and deletes on the resources they affect.
The public layer is intentionally separate from transport. It currently wraps the private
_MasonApiClient; once the autogenerated API is available, that transport can be replaced byWorkspaceClient.masonwithout changing the resource-oriented surface below.SDK shape
Store collections use
create()to create stores. Bound stores useadd()for memories and sessions, leaving room for richer add semantics such as create-if-absent, append, or overwrite. IDs formemory_store.get(id)andsession_store.get(id)are positional. The SDK does not implement a client-sideget_or_createor non-atomicappend_memory. Session deletion is non-cascading by default; passforce=Trueto recursively delete descendant sessions.Examples
Validation
The Mason unit suite passes with 251 tests. Ruff lint/format and
ty checkalso pass.