databricks-agentbricks 0.3.0__tar.gz → 0.5.0__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 (195) hide show
  1. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/PKG-INFO +199 -38
  2. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/README.md +196 -36
  3. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/pyproject.toml +3 -2
  4. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/app.py +7 -5
  5. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/auth.py +1 -1
  6. databricks_agentbricks-0.5.0/src/databricks_agentbricks/cli/deploy.py +243 -0
  7. databricks_agentbricks-0.5.0/src/databricks_agentbricks/cli/dev.py +111 -0
  8. databricks_agentbricks-0.5.0/src/databricks_agentbricks/cli/doctor.py +1127 -0
  9. databricks_agentbricks-0.5.0/src/databricks_agentbricks/cli/endpoint.py +81 -0
  10. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/init.py +5 -5
  11. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/mcp.py +2 -2
  12. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/memory.py +22 -9
  13. databricks_agentbricks-0.5.0/src/databricks_agentbricks/cli/pipeline.py +227 -0
  14. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/sandbox.py +15 -51
  15. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/sessions.py +18 -9
  16. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/tools.py +33 -8
  17. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/tracing.py +21 -195
  18. databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients/__init__.py +1 -0
  19. databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients/api_client_provider.py +36 -0
  20. databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients/apps_client.py +645 -0
  21. databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli/app_auth.py → databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients/apps_user_auth_client.py +95 -47
  22. databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients/conversation_store_client.py +202 -0
  23. databricks_agentbricks-0.3.0/src/databricks_agentbricks/legacy_lakebase_runtime_store.py → databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients/legacy_runtime_store.py +38 -2
  24. databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients/tracing_client.py +235 -0
  25. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/errors.py +1 -1
  26. databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation/__init__.py +1 -0
  27. databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation/deploy.py +238 -0
  28. databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation/dev.py +98 -0
  29. databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation/endpoint.py +81 -0
  30. databricks_agentbricks-0.3.0/src/databricks_agentbricks/_group.py → databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation/group.py +2 -1
  31. {databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli → databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation}/help.py +52 -5
  32. {databricks_agentbricks-0.3.0/src/databricks_agentbricks → databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation}/render.py +1 -1
  33. databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation/reporter.py +29 -0
  34. databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation/tracing.py +17 -0
  35. databricks_agentbricks-0.5.0/src/databricks_agentbricks/projects/__init__.py +1 -0
  36. {databricks_agentbricks-0.3.0/src/databricks_agentbricks → databricks_agentbricks-0.5.0/src/databricks_agentbricks/projects}/agent_project.py +47 -24
  37. databricks_agentbricks-0.5.0/src/databricks_agentbricks/projects/app_manifest.py +131 -0
  38. databricks_agentbricks-0.3.0/src/databricks_agentbricks/project_config.py → databricks_agentbricks-0.5.0/src/databricks_agentbricks/projects/config.py +1 -1
  39. databricks_agentbricks-0.5.0/src/databricks_agentbricks/projects/resolver.py +56 -0
  40. databricks_agentbricks-0.5.0/src/databricks_agentbricks/reporting.py +36 -0
  41. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/__init__.py +4 -0
  42. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/deploy_service.py +426 -0
  43. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/deployment/__init__.py +5 -0
  44. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/deployment/config.py +54 -0
  45. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/deployment/names.py +44 -0
  46. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/deployment/provisioners.py +589 -0
  47. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/deployment/tool_access.py +370 -0
  48. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/deployment/tool_access_provisioner.py +49 -0
  49. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/dev_service.py +231 -0
  50. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/invoke/__init__.py +1 -0
  51. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/invoke/auth.py +32 -0
  52. databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli/endpoint_request.py → databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/invoke/request.py +2 -2
  53. databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli/endpoint_transport.py → databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/invoke/transport.py +6 -3
  54. databricks_agentbricks-0.5.0/src/databricks_agentbricks/services/invoke_service.py +138 -0
  55. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-bricks-migrate/SKILL.md +9 -6
  56. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/AGENTKIT_CONTRACT.md +11 -1
  57. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/README.md +12 -9
  58. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/agent.py +3 -1
  59. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/pyproject.toml +1 -1
  60. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/runtime/adapter.py +24 -14
  61. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_agent.py +21 -4
  62. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/AGENTKIT_CONTRACT.md +7 -1
  63. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/AGENTS.md +7 -5
  64. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/README.md +12 -9
  65. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/pyproject.toml +1 -1
  66. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/runtime/adapter.py +11 -12
  67. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/tests/test_agent.py +28 -5
  68. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/pyproject.toml +1 -1
  69. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/pyproject.toml +1 -1
  70. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/CHAT_APP.md +12 -7
  71. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/runtime/ui.py +6 -17
  72. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/tests/test_demo_ui.py +47 -9
  73. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/app.js +97 -70
  74. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/index.html +7 -6
  75. databricks_agentbricks-0.5.0/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/markdown-it-15.0.2.min.js +39 -0
  76. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/styles.css +21 -1
  77. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-openai/CHAT_APP.md +12 -7
  78. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-openai/runtime/ui.py +5 -14
  79. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-openai/tests/test_demo_ui.py +45 -7
  80. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/app.js +95 -30
  81. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/index.html +7 -6
  82. databricks_agentbricks-0.5.0/src/databricks_agentbricks/templates/ui/agent-openai/ui/markdown-it-15.0.2.min.js +39 -0
  83. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/styles.css +21 -1
  84. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/_api_client.py +107 -0
  85. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/langgraph/mcp.py +2 -2
  86. databricks_agentbricks-0.5.0/src/databricks_agentkit/langgraph/responses.py +40 -0
  87. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/openai/mcp.py +9 -9
  88. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/ARCHITECTURE.md +20 -3
  89. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/README.md +9 -4
  90. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/app.py +80 -33
  91. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/auth.py +18 -5
  92. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/durability/execution.py +42 -14
  93. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/durability/lakebase_runtime_store.py +222 -43
  94. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/execution.py +49 -14
  95. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/runtime.py +39 -13
  96. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/store.py +113 -18
  97. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/tool_manifest.py +120 -11
  98. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/types.py +9 -3
  99. databricks_agentbricks-0.3.0/src/databricks_agentbricks/app_resources.py +0 -198
  100. databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli/deploy.py +0 -989
  101. databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli/dev.py +0 -310
  102. databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli/endpoint.py +0 -145
  103. databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli/endpoint_examples.py +0 -33
  104. databricks_agentbricks-0.3.0/src/databricks_agentbricks/cli/endpoint_output.py +0 -53
  105. databricks_agentbricks-0.3.0/src/databricks_agentbricks/trace_tables.py +0 -36
  106. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/.gitignore +0 -0
  107. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/NOTICE +0 -0
  108. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/__init__.py +0 -0
  109. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/cli/__init__.py +0 -0
  110. {databricks_agentbricks-0.3.0/src/databricks_agentbricks → databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients}/databricks_cli.py +0 -0
  111. /databricks_agentbricks-0.3.0/src/databricks_agentbricks/lakebase_runtime_store.py → /databricks_agentbricks-0.5.0/src/databricks_agentbricks/clients/managed_runtime_store.py +0 -0
  112. {databricks_agentbricks-0.3.0/src/databricks_agentbricks → databricks_agentbricks-0.5.0/src/databricks_agentbricks/presentation}/theme.py +0 -0
  113. /databricks_agentbricks-0.3.0/src/databricks_agentbricks/project_types.py → /databricks_agentbricks-0.5.0/src/databricks_agentbricks/projects/types.py +0 -0
  114. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/py.typed +0 -0
  115. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/.env.example +0 -0
  116. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/.gitignore +0 -0
  117. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/AGENTS.md +0 -0
  118. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/CLAUDE.md +0 -0
  119. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/__init__.py +0 -0
  120. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/mcps.py +0 -0
  121. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/__init__.py +0 -0
  122. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/sample_tool.py +0 -0
  123. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/send_message.py +0 -0
  124. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/app.yaml +0 -0
  125. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/runtime/__init__.py +0 -0
  126. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/runtime/main.py +0 -0
  127. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/tests/__init__.py +0 -0
  128. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_runtime.py +0 -0
  129. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_workspace.py +0 -0
  130. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/.env.example +0 -0
  131. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/.gitignore +0 -0
  132. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/CLAUDE.md +0 -0
  133. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/agent/__init__.py +0 -0
  134. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/agent/agent.py +0 -0
  135. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/agent/mcps.py +0 -0
  136. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/agent/tools/__init__.py +0 -0
  137. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/agent/tools/sample_tool.py +0 -0
  138. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/agent/tools/send_message.py +0 -0
  139. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/app.yaml +0 -0
  140. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/runtime/__init__.py +0 -0
  141. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/runtime/main.py +0 -0
  142. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/tests/__init__.py +0 -0
  143. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/tests/test_runtime.py +0 -0
  144. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/agent-openai/tests/test_workspace.py +0 -0
  145. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/.env.example +0 -0
  146. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/.gitignore +0 -0
  147. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/README.md +0 -0
  148. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/agent/__init__.py +0 -0
  149. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/agent/agent.py +0 -0
  150. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/app.yaml +0 -0
  151. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/runtime/__init__.py +0 -0
  152. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/runtime/main.py +0 -0
  153. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/tests/test_runtime.py +0 -0
  154. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/.env.example +0 -0
  155. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/.gitignore +0 -0
  156. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/README.md +0 -0
  157. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/agent/__init__.py +0 -0
  158. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/agent/agent.py +0 -0
  159. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/app.yaml +0 -0
  160. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/runtime/__init__.py +0 -0
  161. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/runtime/main.py +0 -0
  162. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/custom-agent-openai/tests/test_runtime.py +0 -0
  163. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/sandbox_mcp.py +0 -0
  164. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/sandbox_mcp_langgraph.py +0 -0
  165. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/runtime/main.py +0 -0
  166. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/agentbricks-mark.png +0 -0
  167. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-openai/runtime/main.py +0 -0
  168. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/agentbricks-mark.png +0 -0
  169. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/__init__.py +0 -0
  170. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/_pagination.py +0 -0
  171. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/client.py +0 -0
  172. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/langgraph/__init__.py +0 -0
  173. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/langgraph/genie.py +0 -0
  174. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/langgraph/memory.py +0 -0
  175. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/langgraph/session_store.py +0 -0
  176. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/memory_store.py +0 -0
  177. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/models.py +0 -0
  178. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/openai/__init__.py +0 -0
  179. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/openai/genie.py +0 -0
  180. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/openai/memory.py +0 -0
  181. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/openai/sessions.py +0 -0
  182. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/py.typed +0 -0
  183. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/__init__.py +0 -0
  184. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/durability/__init__.py +0 -0
  185. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/durability/heartbeat.py +0 -0
  186. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/durability/recovery.py +0 -0
  187. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/durability/store.py +0 -0
  188. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/genie.py +0 -0
  189. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/mcp_auth.py +0 -0
  190. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/model_services.py +0 -0
  191. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/session_store_client.py +0 -0
  192. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/tracing.py +0 -0
  193. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/runtime/workspace.py +0 -0
  194. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/session_store.py +0 -0
  195. {databricks_agentbricks-0.3.0 → databricks_agentbricks-0.5.0}/src/databricks_agentkit/timefmt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: databricks-agentbricks
3
- Version: 0.3.0
3
+ Version: 0.5.0
4
4
  Summary: Agent Bricks CLI and AgentKit SDK for custom agents on Databricks
5
5
  Author-email: Databricks <agent-feedback@databricks.com>
6
6
  License-File: NOTICE
@@ -10,6 +10,7 @@ Requires-Dist: databricks-ai-bridge[memory]>=0.22.0
10
10
  Requires-Dist: databricks-sdk>=0.124.0
11
11
  Requires-Dist: fastapi>=0.129.0
12
12
  Requires-Dist: mlflow-skinny>=3.10.1
13
+ Requires-Dist: packaging>=23.2
13
14
  Requires-Dist: psycopg[binary]>=3.1
14
15
  Requires-Dist: pyyaml>=6.0
15
16
  Requires-Dist: rich>=13.7
@@ -20,7 +21,7 @@ Requires-Dist: uvicorn>=0.20.0
20
21
  Provides-Extra: langgraph
21
22
  Requires-Dist: databricks-agents>=1.9.3; extra == 'langgraph'
22
23
  Requires-Dist: databricks-langchain>=0.17.0; extra == 'langgraph'
23
- Requires-Dist: langchain-mcp-adapters>=0.2.1; extra == 'langgraph'
24
+ Requires-Dist: langchain-mcp-adapters>=0.3.0; extra == 'langgraph'
24
25
  Requires-Dist: langchain>=1.0.0; extra == 'langgraph'
25
26
  Requires-Dist: langgraph>=1.1.0; extra == 'langgraph'
26
27
  Requires-Dist: mlflow>=3.10.1; extra == 'langgraph'
@@ -102,19 +103,16 @@ The two ways to run an agent:
102
103
 
103
104
  ## Installation
104
105
 
105
- From PyPI:
106
-
107
106
  The `databricks-agentbricks` Python distribution installs the `agentbricks` command and AgentKit.
108
107
 
109
108
  ```sh
110
109
  pip install databricks-agentbricks
111
110
  ```
112
111
 
113
- From source:
114
-
115
- ```sh
116
- pip install 'git+https://github.com/databricks/databricks-ai-bridge.git#subdirectory=integrations/agentbricks'
117
- ```
112
+ Install from PyPI rather than from this repository. Templates on `main` can depend on SDK changes that
113
+ are not yet released, while generated projects install the released SDK from PyPI, so a CLI installed
114
+ from source can scaffold projects that fail to start. To work on Agent Bricks itself, see
115
+ [CONTRIBUTING.md](CONTRIBUTING.md).
118
116
 
119
117
  The base package includes the CLI, store SDK, and `DurableAgentServer` HTTP runtime. Generated projects
120
118
  declare their framework dependencies automatically.
@@ -152,7 +150,7 @@ The shortest path from a blank directory to a running and deployed agent:
152
150
 
153
151
  ```sh
154
152
  agentbricks login --profile <profile>
155
- agentbricks init my-agent
153
+ agentbricks init my-agent # Defaults to LangGraph; add --framework=openai for OpenAI Agents SDK
156
154
  cd my-agent
157
155
  agentbricks dev # run locally
158
156
  agentbricks deploy my-agent # deploy to Databricks
@@ -162,9 +160,9 @@ agentbricks deploy my-agent # deploy to Databricks
162
160
  local runtime so local behavior matches a deployment.
163
161
 
164
162
  `agentbricks deploy my-agent` deploys a Databricks App named `agent-bricks-my-agent`, provisions the
165
- stores declared in `agent.toml`, and grants the app's service principal access to them. Use
166
- `agentbricks deployments list` to find deployed apps, and `agentbricks deployments get agent-bricks-my-agent` to
167
- print an app's URL and status.
163
+ stores declared in `agent.toml`, and grants the app's service principal access to the stores and
164
+ direct App-auth tool resources declared there. Use `agentbricks deployments list` to find deployed
165
+ apps, and `agentbricks deployments get agent-bricks-my-agent` to print an app's URL and status.
168
166
 
169
167
  `agentbricks init` declares default memory and session stores in `agent.toml`, so the deployed agent has
170
168
  long-term memory and durable conversation history. It creates `<name>-<6-letter-token>-memory` and
@@ -179,6 +177,28 @@ it an HTTP request. MLflow tracing is on by default (`agentbricks init` binds a
179
177
  `.agentbricks/` and `agentbricks deploy` to the bound workspace experiment; `agentbricks tracing list` shows the
180
178
  available traces.
181
179
 
180
+ ## Inspect and clean up a project
181
+
182
+ Read `agent.toml` for the recorded agent name, declared memory/session stores, tracing, and tool
183
+ bindings. A declaration does not confirm that the resource exists or that the deployed app can use it.
184
+
185
+ | Inspect | Command | Details |
186
+ | --- | --- | --- |
187
+ | Local onboarding checks | `agentbricks doctor .` | Offline; does not verify bindings or deployed resources. |
188
+ | Agent Bricks apps in a workspace | `agentbricks -p <profile> deployments list` | Lists apps with the `agent-bricks-` prefix in the selected workspace, including other projects. |
189
+ | App status and URL | `agentbricks -p <profile> deployments get agent-bricks-<name>` | Queries the selected workspace for the named app. |
190
+ | Memory store IDs and details | `agentbricks -p <profile> memory stores list`, then `agentbricks -p <profile> memory stores get <resource-name>` | Workspace-wide; can include other projects' stores. Use the ID or resource name, not the display name. |
191
+ | Session store names and details | `agentbricks -p <profile> sessions stores list`, then `agentbricks -p <profile> sessions stores get <name>` | Workspace-wide; can include other projects' stores. Use the store name. |
192
+
193
+ Review each confirmation. Delete a store only after confirming that you own it and no other agent
194
+ needs it, using the same profile and identifier used to inspect it.
195
+
196
+ | Clean up | Command | Details |
197
+ | --- | --- | --- |
198
+ | Deployment | `agentbricks -p <profile> deployments delete agent-bricks-<name>` | Managed Runtime Store cleanup checks the app identity and runs before app deletion; a cleanup failure retains the app for retry. Memory/session stores, tracing experiments, tools, and source files are retained. |
199
+ | [Memory store](cli.md#agentbricks-memory-stores-delete) | `agentbricks -p <profile> memory stores delete <resource-name>` | Soft-deletes the store after confirmation. |
200
+ | [Session store](cli.md#agentbricks-sessions-stores-delete) | `agentbricks -p <profile> sessions stores delete <name>` | Deletes the store after confirmation. |
201
+
182
202
  ## Public names
183
203
 
184
204
  Use `agentbricks` for the CLI and `AgentKitClient` from `databricks_agentkit` for the Python SDK. New
@@ -263,12 +283,16 @@ Each managed run is an **invocation**. Send a client-generated UUID `id` and you
263
283
  ```json
264
284
  {
265
285
  "id": "550e8400-e29b-41d4-a716-446655440000",
286
+ "session_id": "support-case-123",
266
287
  "input": {"messages": [{"role": "user", "content": "Hello"}]},
267
288
  "background": true,
268
289
  "stream": true
269
290
  }
270
291
  ```
271
292
 
293
+ The optional top-level `session_id` groups invocations into one application session. It is distinct
294
+ from the invocation `id` and from the `X-Routing-Key` sticky-routing header.
295
+
272
296
  | Endpoint | Behavior |
273
297
  | --- | --- |
274
298
  | `POST /api/invocations` | Defaults to synchronous execution: `200` with the result under `output`. `stream: true` returns SSE events. `background: true` returns `202` with a status URL; adding `stream: true` also includes an events URL. |
@@ -455,6 +479,10 @@ agentbricks deploy my-agent
455
479
  ```
456
480
 
457
481
  Memory and session stores are independent resources: deleting one never affects the other.
482
+ For projects with `agent.toml`, unbinding either store removes its declaration; the next deploy
483
+ removes the corresponding `AGENT_MEMORY_STORE` or `AGENT_SESSION_STORE` entry from `app.yaml`.
484
+ Unbinding does not delete the store or revoke an existing grant to the App's service principal.
485
+ If access must be revoked, coordinate that separately with the store owner or workspace admin.
458
486
 
459
487
  ## Commands
460
488
 
@@ -469,6 +497,7 @@ agentbricks [-p <profile>] [-o text|json]
469
497
  [--disable-chat-app]
470
498
  [--memory-store NAME] [--session-store NAME]
471
499
  [--existing] [--profile P] [directory]
500
+ doctor [directory]
472
501
  dev [--source PATH] [--prepare-environment] [--app-port PORT]
473
502
  memory
474
503
  bind STORE [--source PATH]
@@ -485,7 +514,8 @@ agentbricks [-p <profile>] [-o text|json]
485
514
  unbind [--source PATH]
486
515
  list | get [--experiment-name NAME | --experiment-id ID] [--source PATH]
487
516
  tools
488
- add sandbox --scope SCOPE [--scope SCOPE ...] [--source PATH]
517
+ add sandbox --scope SCOPE [--scope SCOPE ...]
518
+ [--no-databricks-access-token-included] [--source PATH]
489
519
  add mcp SERVICE [--name NAME] [--source PATH]
490
520
  add uc-function FUNCTION [--name NAME] [--source PATH]
491
521
  add genie-one [--name NAME] [--auth user|app] [--source PATH]
@@ -508,6 +538,26 @@ agentbricks init --framework langgraph --existing .
508
538
  agentbricks init --framework openai --existing .
509
539
  ```
510
540
 
541
+ Before or after the conversion, inspect its progress without changing the repository or contacting
542
+ Databricks:
543
+
544
+ ```sh
545
+ agentbricks doctor .
546
+ agentbricks -o json doctor .
547
+ ```
548
+
549
+ Doctor exits 0 only when the project has a valid Agent Bricks manifest and matching project
550
+ metadata, uses the Agent Bricks server, declares the framework-appropriate `databricks-agentbricks`
551
+ extra and a non-empty `app.yaml` command, constructs `DurableAgentServer` with an `invoke` hook, and
552
+ calls a recognized adapter for the selected framework in production Python source. Test, example, and
553
+ old/stale directories do not count as source evidence. A failed report is the normal result for a
554
+ project that still needs migration; run
555
+ `agentbricks init --framework <framework_name> --existing <directory>` with the appropriate framework
556
+ to prepare the migration instructions. Doctor never imports or executes the target's source, and a
557
+ bounded source scan that exceeds a limit is reported while the evidence it already found still counts.
558
+ Its findings are static repository evidence, not proof that the configured startup command executes
559
+ the files it finds.
560
+
511
561
  This writes `agent-bricks-migrate/` containing a skill, a prompt to paste into your coding agent,
512
562
  `references/migration.json`, and a reference project generated from the templates bundled with the
513
563
  installed CLI. The bundle sits outside any single agent's configuration directory; `.claude/skills/`
@@ -544,11 +594,11 @@ server.
544
594
  ```sh
545
595
  agentbricks --profile <profile> endpoint invoke agent-bricks-my-agent \
546
596
  --path /api/invocations \
547
- --json '{"id":"00000000-0000-4000-8000-000000000001","input":[{"role":"user","content":"Hello"}]}'
597
+ --json '{"id":"00000000-0000-4000-8000-000000000001","session_id":"support-case-123","input":[{"role":"user","content":"Hello"}]}'
548
598
 
549
599
  agentbricks endpoint invoke --url http://localhost:8000 \
550
600
  --path /api/invocations \
551
- --json '{"id":"00000000-0000-4000-8000-000000000001","input":[{"role":"user","content":"Hello"}]}'
601
+ --json '{"id":"00000000-0000-4000-8000-000000000001","session_id":"support-case-123","input":[{"role":"user","content":"Hello"}]}'
552
602
  ```
553
603
 
554
604
  The JSON body remains explicit even for generated agents. For example, managed runtime agents require
@@ -556,21 +606,26 @@ a client-generated invocation ID, and streaming servers require their own stream
556
606
  `--sse` so the CLI consumes the response as Server-Sent Events.
557
607
 
558
608
  ```sh
609
+ SESSION_ID=$(uuidgen)
559
610
  INVOCATION_ID=$(uuidgen)
560
611
  agentbricks --profile <profile> endpoint invoke agent-bricks-my-agent \
561
612
  --path /api/invocations \
562
- --json "{\"id\":\"$INVOCATION_ID\",\"input\":[{\"role\":\"user\",\"content\":\"Run the report\"}]}"
613
+ --routing-key "$SESSION_ID" \
614
+ --json "{\"id\":\"$INVOCATION_ID\",\"session_id\":\"$SESSION_ID\",\"input\":[{\"role\":\"user\",\"content\":\"Run the report\"}]}"
563
615
 
616
+ INVOCATION_ID=$(uuidgen)
564
617
  agentbricks --profile <profile> endpoint invoke agent-bricks-my-agent \
565
618
  --path /api/invocations \
619
+ --routing-key "$SESSION_ID" \
566
620
  --sse \
567
- --json "{\"id\":\"$INVOCATION_ID\",\"input\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":true}"
621
+ --json "{\"id\":\"$INVOCATION_ID\",\"session_id\":\"$SESSION_ID\",\"input\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":true}"
568
622
  ```
569
623
 
570
- `--session-id` preserves one application session across calls by setting the Databricks Apps routing
571
- cookie. This also works with a direct App URL and with the generated runtime on localhost. OAuth and
572
- session headers are managed by the runtime; arbitrary custom request headers are intentionally not exposed
573
- by this command.
624
+ `--routing-key` keeps a session on one app replica (sticky routing): set it to your stable session id
625
+ and it is sent verbatim in the `X-Routing-Key` request header. It is routing only and is never used
626
+ as the session id - put the session id at the top level of the `--json` body for session continuity. This
627
+ also works with a direct App URL and with the generated runtime on localhost. OAuth and session headers are managed by
628
+ the runtime; arbitrary custom request headers are intentionally not exposed by this command.
574
629
 
575
630
  ## Command help
576
631
 
@@ -592,7 +647,7 @@ add` updates only this file; direct TOML edits have the same behavior. Both mana
592
647
  adapters read the managed bindings at runtime without generating or patching agent source:
593
648
 
594
649
  ```sh
595
- agentbricks tools add sandbox --scope table:samples.nyctaxi.trips
650
+ agentbricks tools add sandbox --scope volume:main.data.files
596
651
  agentbricks tools add mcp system.ai.web_search
597
652
  agentbricks tools add uc-function catalog.schema.lookup_ticket
598
653
  agentbricks tools add genie-one
@@ -620,9 +675,77 @@ Managed-tool add commands write the selected identity to `agent.toml`; inspect t
620
675
  review configured bindings. Missing legacy auth continues to mean App identity at runtime; it is
621
676
  never silently upgraded to user identity.
622
677
 
623
- `DurableAgentServer` derives its request-auth policy directly from the managed tool bindings in `agent.toml`.
624
- Projects do not maintain a separate request-auth contract marker: the presence of any managed tool
625
- with `auth = "user"` makes the invocation require a transient request-user credential.
678
+ ### Automatic App-identity access on deploy
679
+
680
+ `agentbricks deploy` reconciles least-privilege access for resources explicitly declared by App/default
681
+ identity tool bindings. It skips every `auth = "user"` binding because those calls use the request
682
+ user's permissions instead of the App service principal.
683
+
684
+ | Explicit `agent.toml` resource | Automatic App service-principal access |
685
+ | --- | --- |
686
+ | UC function | Apps `uc_securable`: `FUNCTION` / `EXECUTE` |
687
+ | Genie Agent space | Apps `genie_space`: `CAN_RUN` |
688
+ | Sandbox volume scope | Apps `uc_securable`: `VOLUME` / `READ_VOLUME` or `WRITE_VOLUME` |
689
+ | External MCP service | Unity Catalog: effective `EXECUTE` plus `USE_SCHEMA` and `USE_CATALOG` on its named parents |
690
+ | Built-in `system.ai` MCP service, including Sandbox and Genie One | Platform-managed access defaults; Agent Bricks does not mutate system securables |
691
+
692
+ Native Genie One has no resource identifier in its binding, so it does not add a resource-specific
693
+ grant. Use a Genie Agent binding when the App identity should be scoped to one explicit Genie Space.
694
+
695
+ Apps-backed tool resources are named deterministically and reconciled to the manifest on each
696
+ deploy: removing a binding removes that Agent Bricks-owned Apps resource while preserving Runtime
697
+ Store, tracing, and user-owned resources. MCP grants are additive in this release
698
+ because their permission APIs do not expose trustworthy Agent Bricks ownership metadata; removing
699
+ those bindings does not revoke an independently valid grant.
700
+
701
+ Only direct resources are automatic. Agent Bricks never discovers or grants tables and warehouses
702
+ used by a Genie Space, objects called by a UC function, or resources wrapped by an MCP service.
703
+ Grant those transitive dependencies manually when the called service uses the App identity. If any
704
+ required direct grant cannot be read, applied, or verified, deploy stops before source upload and
705
+ leaves the currently deployed version untouched.
706
+
707
+ `DurableAgentServer` derives its request-auth policy directly from the managed tool bindings in
708
+ `agent.toml`. Projects do not maintain a separate request-auth contract marker: a managed tool with
709
+ `auth = "user"` requires a transient request-user credential. Code-first tools can declare any
710
+ additional API scopes that Agent Bricks cannot infer from Python:
711
+
712
+ ```toml
713
+ [auth.user]
714
+ required = true
715
+ additional_api_scopes = ["sql"]
716
+ ```
717
+
718
+ `additional_api_scopes` is additive: deploy unions it with scopes inferred from managed bindings,
719
+ deduplicates the result, and preserves unrelated scopes already configured on the App. Scope names
720
+ are not restricted to a client-side allowlist; Databricks Apps validates whether a requested scope
721
+ is supported. Entries must be non-empty strings without surrounding whitespace or control
722
+ characters, and a non-empty list requires `required = true`. This request-auth contract is supported
723
+ only with `[agent].server = "agentbricks"`.
724
+
725
+ Generated framework adapters pass the request-bound resolver to agent construction. A code-first
726
+ tool should obtain its user client from that resolver inside the active invocation rather than
727
+ creating or persisting a user credential:
728
+
729
+ ```python
730
+ from langchain_core.tools import tool
731
+
732
+
733
+ def sql_tools(workspace_client_for):
734
+ @tool
735
+ def run_statement(statement: str) -> str:
736
+ client = workspace_client_for("user")
737
+ response = client.statement_execution.execute_statement(
738
+ warehouse_id="...",
739
+ statement=statement,
740
+ )
741
+ return str(response.result)
742
+
743
+ return [run_statement]
744
+ ```
745
+
746
+ The resolver is request-bound and closes after the attempt. Agent Bricks does not inject it into
747
+ arbitrary auto-discovered decorated tools; build those tools from the resolver passed to the
748
+ generated request-aware agent function.
626
749
 
627
750
  Request-user invocations use the same synchronous, streaming, background, status, event-replay,
628
751
  and idempotency APIs as app-auth invocations. The Runtime Store records only token-free request
@@ -638,13 +761,18 @@ upgrade copied Python adapter code. Outdated adapters fail closed rather than si
638
761
  identity. App-only legacy projects and generic bring-your-own source directories keep the existing
639
762
  path.
640
763
 
641
- Deploy derives Apps user scopes from explicit `auth = "user"` bindings:
764
+ Deploy derives Apps user scopes from explicit `auth = "user"` bindings and unions them with
765
+ `[auth.user].additional_api_scopes`:
642
766
 
643
767
  | Binding | Requested Apps scopes |
644
768
  | --- | --- |
645
769
  | Managed MCP (governed ingress) | `ai-gateway` |
770
+ | `system.ai.dbsql` | `ai-gateway`, `sql` |
646
771
  | `system.ai.genie_one_mcp` | `ai-gateway`, `genie` |
772
+ | Sandbox with a Volume downscope | `ai-gateway`, `files` |
647
773
  | First-class Genie One or Genie Agent | `genie` |
774
+ | Sandbox with token injection | `ai-gateway`, `workspace.workspace` |
775
+ | Sandbox with token injection disabled | `ai-gateway` |
648
776
 
649
777
  For example, bind Genie tools in a current project with `server = "agentbricks"`:
650
778
 
@@ -653,7 +781,8 @@ agentbricks tools add mcp system.ai.genie_one_mcp --auth user
653
781
  agentbricks tools add genie-agent SPACE_ID --auth user
654
782
  ```
655
783
 
656
- Mixed bindings request the union. App-auth and legacy bindings add no user scopes. These are
784
+ Mixed bindings and explicit additions request the union. App-auth and legacy bindings add no user
785
+ scopes. These are
657
786
  explicit service-consent scopes, not a claim that gateway access alone authorizes the downstream
658
787
  resource. OAuth consent does not grant Unity Catalog privileges: the user still needs access to
659
788
  the configured Genie Space and its underlying data.
@@ -670,10 +799,15 @@ The `system.ai.dbsql` managed MCP additionally requests the Apps `sql` user scop
670
799
  API consent, not `sql:restricted-query`; read-only enforcement remains the service policy plus the
671
800
  requesting user's Unity Catalog grants. DBSQL does not use Databricks Connect.
672
801
 
673
- A sandbox binding with a Volume downscope additionally requests the Apps `files` user scope.
802
+ When a user-auth sandbox has `databricks_access_token_included = true`, it requests the Apps
803
+ `workspace.workspace` user scope so the injected credential can call workspace APIs. A sandbox
804
+ binding with a Volume downscope additionally requests the Apps `files` user scope.
674
805
  OAuth consent does not grant Volume access: the requesting user still needs the corresponding
675
- Unity Catalog privileges, and the sandbox downscope remains authoritative. Table-only sandbox
676
- bindings request `ai-gateway` but do not request `files`.
806
+ Unity Catalog privileges, and the sandbox downscope remains authoritative. A sandbox binding with
807
+ token injection disabled does not request `workspace.workspace`; its other resource-derived scopes
808
+ still apply. Databricks Apps rejects the legacy bare `workspace` scope, so Agent Bricks requests
809
+ `workspace.workspace`. These scopes are requested only for `auth = "user"`; `auth = "app"` uses
810
+ the App service principal's permissions instead.
677
811
 
678
812
  Review the target App's scopes and coordinate with its other owners before allowing the update. Once
679
813
  those scopes are present, later deploys do not need the flag. The CLI preserves unrelated scopes,
@@ -769,10 +903,35 @@ If a manifest with `server = "agentbricks"` contains `source = { kind = "python"
769
903
  `[[tools]]` entry; the decorated tool in `agent/tools/` remains active. `agentbricks dev` and `agentbricks deploy`
770
904
  do not generate or patch Python tool code, and do not alter the manifest's `[[tools]]` bindings.
771
905
 
772
- Sandbox scopes default to read-only access. Repeat `--scope` to allow more than one resource, use
773
- `volume:` or `workspace:` for those resource types, and use `--permission read_write` only when the
906
+ Sandbox scopes support volumes only and default to read-only access. Repeat `--scope` to allow more
907
+ than one volume, use `volume:catalog.schema.volume`, and use `--permission read_write` only when the
774
908
  agent needs writes. Every sandbox call carries this fixed downscope in MCP `_meta`, outside the tool
775
- arguments controlled by the model.
909
+ arguments controlled by the model. New sandbox bindings also expose the selected Databricks
910
+ credential to sandbox code by default:
911
+
912
+ ```toml
913
+ [[tools]]
914
+ id = "sandbox"
915
+ auth = "user"
916
+ source = { kind = "sandbox", service = "system.ai.sandbox" }
917
+ policy = { downscope = [{ resource = "volume:main.data.files", permission = "read_only" }], databricks_access_token_included = true }
918
+ ```
919
+
920
+ Table sandbox scopes are not supported yet because Databricks Connect does not support table
921
+ downscoping. Workspace sandbox scopes are also not supported yet; they have not been validated
922
+ against a live workspace. Use a volume instead. Existing `table:` and `workspace:` entries must be
923
+ removed from `agent.toml` before using `agentbricks dev` or `agentbricks deploy`.
924
+
925
+ The table implementation is retained behind a disabled code-level gate so it can be enabled when
926
+ Databricks Connect supports table downscoping. There is no CLI option to bypass that gate.
927
+
928
+ With `databricks_access_token_included = true`, the sandbox receives `DATABRICKS_HOST`, a short-lived
929
+ `DATABRICKS_TOKEN`, and `DATABRICKS_AUTH_TYPE`, so code such as
930
+ `WorkspaceClient().current_user.me()` can call workspace APIs. This policy does not choose the
931
+ identity: `auth = "user"` uses the request user's OBO credential, while `auth = "app"` uses the
932
+ Databricks App service principal. Use `--no-databricks-access-token-included` when adding a sandbox that
933
+ does not need workspace API access. Existing manifests that omit `databricks_access_token_included`
934
+ remain disabled until explicitly updated.
776
935
 
777
936
  ### Genie tools
778
937
 
@@ -880,10 +1039,12 @@ store and grants the app's service principal access to it. The memory store id f
880
1039
  via the `AGENT_MEMORY_STORE` env var that `deploy` injects; `agentbricks dev` runs locally with memory off
881
1040
  and does not inject it. The id is not persisted in `agent.toml`.)
882
1041
 
883
- The chat UI generates a stable application session UUID in browser local storage, places it inside
884
- the invocation's opaque `input`, and creates a fresh invocation UUID per turn. The
885
- `__Host-databricks-app-router` cookie remains independent: API clients may reuse it for sticky
886
- replica routing, but it is neither authentication nor the template's application session state.
1042
+ The chat UI generates a stable application session UUID in browser local storage, sends it as the
1043
+ invocation's top-level `session_id`, and creates a fresh invocation UUID per turn. The chat app also
1044
+ sends this session UUID in the `X-Routing-Key` request header, which is used verbatim to pin
1045
+ the session to one app replica (it must be non-blank and no more than 128 UTF-8 bytes). The header is neither
1046
+ authentication nor the template's application session state; it is independent sticky-routing
1047
+ plumbing.
887
1048
 
888
1049
  The generated `README.md` documents every request the client makes: config discovery, sync and SSE
889
1050
  invocations, background submission and polling, session transcript loading, HITL resume, and memory