databricks-agentbricks 0.6.0__tar.gz → 0.7.1__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 (224) hide show
  1. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/PKG-INFO +276 -42
  2. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/README.md +270 -41
  3. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/pyproject.toml +25 -1
  4. databricks_agentbricks-0.7.1/src/databricks_agentbricks/cli/__main__.py +9 -0
  5. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/deploy.py +209 -17
  6. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/dev.py +9 -14
  7. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/doctor.py +55 -6
  8. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/init.py +110 -22
  9. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/mcp.py +1 -1
  10. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/memory.py +131 -28
  11. databricks_agentbricks-0.7.1/src/databricks_agentbricks/cli/models.py +1177 -0
  12. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/pipeline.py +36 -17
  13. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/prompts.py +15 -3
  14. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/sessions.py +90 -27
  15. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/tools.py +23 -11
  16. databricks_agentbricks-0.7.1/src/databricks_agentbricks/cli/tracing.py +272 -0
  17. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/clients/apps_client.py +274 -42
  18. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/clients/conversation_store_client.py +42 -15
  19. databricks_agentbricks-0.7.1/src/databricks_agentbricks/clients/databricks_cli.py +84 -0
  20. databricks_agentbricks-0.7.1/src/databricks_agentbricks/clients/local_ports.py +52 -0
  21. databricks_agentbricks-0.7.1/src/databricks_agentbricks/clients/local_tracing_client.py +145 -0
  22. databricks_agentbricks-0.7.1/src/databricks_agentbricks/clients/mlflow_trace_client.py +92 -0
  23. databricks_agentbricks-0.7.1/src/databricks_agentbricks/model_upgrade.py +698 -0
  24. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/presentation/deploy.py +203 -55
  25. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/presentation/dev.py +5 -6
  26. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/presentation/endpoint.py +5 -9
  27. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/presentation/help.py +69 -17
  28. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/presentation/render.py +175 -47
  29. databricks_agentbricks-0.7.1/src/databricks_agentbricks/presentation/reporter.py +54 -0
  30. databricks_agentbricks-0.7.1/src/databricks_agentbricks/presentation/tracing.py +88 -0
  31. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/projects/agent_project.py +52 -12
  32. databricks_agentbricks-0.7.1/src/databricks_agentbricks/reporting.py +98 -0
  33. databricks_agentbricks-0.7.1/src/databricks_agentbricks/services/deploy_service.py +951 -0
  34. databricks_agentbricks-0.7.1/src/databricks_agentbricks/services/deployment/app_provisioner.py +322 -0
  35. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/deployment/config.py +1 -1
  36. databricks_agentbricks-0.7.1/src/databricks_agentbricks/services/deployment/deploy_state.py +415 -0
  37. databricks_agentbricks-0.7.1/src/databricks_agentbricks/services/deployment/names.py +93 -0
  38. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/deployment/provisioners.py +33 -167
  39. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/dev_service.py +45 -22
  40. databricks_agentbricks-0.7.1/src/databricks_agentbricks/services/tracing/__init__.py +1 -0
  41. databricks_agentbricks-0.7.1/src/databricks_agentbricks/services/tracing/targets.py +97 -0
  42. databricks_agentbricks-0.7.1/src/databricks_agentbricks/services/tracing_service.py +138 -0
  43. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-bricks-workflow/references/deployment.md +14 -1
  44. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/AGENTKIT_CONTRACT.md +16 -1
  45. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/AGENTS.md +8 -0
  46. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/README.md +51 -8
  47. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/agent/agent.py +52 -9
  48. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/pyproject.toml +1 -1
  49. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/runtime/adapter.py +0 -20
  50. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/AGENTKIT_CONTRACT.md +26 -5
  51. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/AGENTS.md +10 -1
  52. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/README.md +54 -8
  53. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/agent/agent.py +14 -11
  54. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/pyproject.toml +1 -1
  55. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/runtime/adapter.py +0 -8
  56. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/tests/test_agent.py +9 -5
  57. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/agent/agent.py +8 -1
  58. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/pyproject.toml +1 -1
  59. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/agent/agent.py +3 -0
  60. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/pyproject.toml +1 -1
  61. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/CHAT_APP.md +2 -0
  62. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/runtime/ui.py +6 -1
  63. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/CHAT_APP.md +2 -0
  64. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/runtime/ui.py +6 -1
  65. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/_api_client.py +80 -0
  66. databricks_agentbricks-0.7.1/src/databricks_agentkit/model_upgrades/__init__.py +42 -0
  67. databricks_agentbricks-0.7.1/src/databricks_agentkit/model_upgrades/optimization.py +1962 -0
  68. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/openai/mcp.py +21 -3
  69. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/README.md +43 -0
  70. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/app.py +25 -0
  71. databricks_agentbricks-0.7.1/src/databricks_agentkit/runtime/cors.py +79 -0
  72. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/model_services.py +7 -0
  73. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/tool_manifest.py +16 -2
  74. databricks_agentbricks-0.6.0/src/databricks_agentbricks/cli/models.py +0 -281
  75. databricks_agentbricks-0.6.0/src/databricks_agentbricks/cli/tracing.py +0 -739
  76. databricks_agentbricks-0.6.0/src/databricks_agentbricks/clients/databricks_cli.py +0 -40
  77. databricks_agentbricks-0.6.0/src/databricks_agentbricks/presentation/reporter.py +0 -29
  78. databricks_agentbricks-0.6.0/src/databricks_agentbricks/presentation/tracing.py +0 -17
  79. databricks_agentbricks-0.6.0/src/databricks_agentbricks/reporting.py +0 -36
  80. databricks_agentbricks-0.6.0/src/databricks_agentbricks/services/deploy_service.py +0 -455
  81. databricks_agentbricks-0.6.0/src/databricks_agentbricks/services/deployment/names.py +0 -44
  82. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/.gitignore +0 -0
  83. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/NOTICE +0 -0
  84. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/__init__.py +0 -0
  85. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/agent_hint.py +0 -0
  86. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/__init__.py +0 -0
  87. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/app.py +0 -0
  88. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/auth.py +0 -0
  89. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/endpoint.py +0 -0
  90. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/experimental.py +0 -0
  91. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/sandbox.py +0 -0
  92. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/cli/telemetry.py +0 -0
  93. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/clients/__init__.py +0 -0
  94. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/clients/api_client_provider.py +0 -0
  95. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/clients/apps_user_auth_client.py +0 -0
  96. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/clients/legacy_runtime_store.py +0 -0
  97. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/clients/managed_runtime_store.py +0 -0
  98. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/clients/tracing_client.py +0 -0
  99. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/errors.py +0 -0
  100. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/presentation/__init__.py +0 -0
  101. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/presentation/group.py +0 -0
  102. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/presentation/theme.py +0 -0
  103. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/projects/__init__.py +0 -0
  104. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/projects/app_manifest.py +0 -0
  105. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/projects/config.py +0 -0
  106. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/projects/resolver.py +0 -0
  107. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/projects/types.py +0 -0
  108. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/py.typed +0 -0
  109. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/__init__.py +0 -0
  110. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/deployment/__init__.py +0 -0
  111. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/deployment/model_binding_provisioner.py +0 -0
  112. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/deployment/tool_access.py +0 -0
  113. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/deployment/tool_access_provisioner.py +0 -0
  114. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/invoke/__init__.py +0 -0
  115. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/invoke/auth.py +0 -0
  116. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/invoke/request.py +0 -0
  117. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/invoke/transport.py +0 -0
  118. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/services/invoke_service.py +0 -0
  119. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/skills.py +0 -0
  120. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-bricks-migrate/SKILL.md +0 -0
  121. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-bricks-workflow/SKILL.md +0 -0
  122. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-bricks-workflow/references/state-and-tools.md +0 -0
  123. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/.env.example +0 -0
  124. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/.gitignore +0 -0
  125. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/CLAUDE.md +0 -0
  126. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/agent/__init__.py +0 -0
  127. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/agent/mcps.py +0 -0
  128. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/__init__.py +0 -0
  129. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/sample_tool.py +0 -0
  130. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/send_message.py +0 -0
  131. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/app.yaml +0 -0
  132. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/runtime/__init__.py +0 -0
  133. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/runtime/main.py +0 -0
  134. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/tests/__init__.py +0 -0
  135. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_agent.py +0 -0
  136. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_runtime.py +0 -0
  137. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_workspace.py +0 -0
  138. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/.env.example +0 -0
  139. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/.gitignore +0 -0
  140. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/CLAUDE.md +0 -0
  141. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/agent/__init__.py +0 -0
  142. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/agent/checkpoints.py +0 -0
  143. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/agent/mcps.py +0 -0
  144. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/agent/tools/__init__.py +0 -0
  145. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/agent/tools/sample_tool.py +0 -0
  146. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/agent/tools/send_message.py +0 -0
  147. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/app.yaml +0 -0
  148. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/runtime/__init__.py +0 -0
  149. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/runtime/main.py +0 -0
  150. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/tests/__init__.py +0 -0
  151. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/tests/test_checkpoints.py +0 -0
  152. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/tests/test_runtime.py +0 -0
  153. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/agent-openai/tests/test_workspace.py +0 -0
  154. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/.env.example +0 -0
  155. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/.gitignore +0 -0
  156. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/README.md +0 -0
  157. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/agent/__init__.py +0 -0
  158. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/app.yaml +0 -0
  159. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/runtime/__init__.py +0 -0
  160. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/runtime/main.py +0 -0
  161. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-langgraph/tests/test_runtime.py +0 -0
  162. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/.env.example +0 -0
  163. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/.gitignore +0 -0
  164. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/README.md +0 -0
  165. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/agent/__init__.py +0 -0
  166. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/app.yaml +0 -0
  167. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/runtime/__init__.py +0 -0
  168. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/runtime/main.py +0 -0
  169. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/custom-agent-openai/tests/test_runtime.py +0 -0
  170. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/sandbox_mcp.py +0 -0
  171. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/sandbox_mcp_langgraph.py +0 -0
  172. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/runtime/main.py +0 -0
  173. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/tests/test_demo_ui.py +0 -0
  174. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/agentbricks-mark.png +0 -0
  175. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/app.js +0 -0
  176. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/index.html +0 -0
  177. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/markdown-it-15.0.2.min.js +0 -0
  178. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/styles.css +0 -0
  179. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/runtime/main.py +0 -0
  180. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/tests/test_demo_ui.py +0 -0
  181. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/ui/agentbricks-mark.png +0 -0
  182. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/ui/app.js +0 -0
  183. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/ui/index.html +0 -0
  184. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/ui/markdown-it-15.0.2.min.js +0 -0
  185. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentbricks/templates/ui/agent-openai/ui/styles.css +0 -0
  186. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/__init__.py +0 -0
  187. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/_pagination.py +0 -0
  188. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/client.py +0 -0
  189. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/langgraph/__init__.py +0 -0
  190. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/langgraph/genie.py +0 -0
  191. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/langgraph/history.py +0 -0
  192. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/langgraph/mcp.py +0 -0
  193. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/langgraph/memory.py +0 -0
  194. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/langgraph/responses.py +0 -0
  195. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/langgraph/session_store.py +0 -0
  196. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/memory_store.py +0 -0
  197. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/models.py +0 -0
  198. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/openai/__init__.py +0 -0
  199. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/openai/genie.py +0 -0
  200. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/openai/history.py +0 -0
  201. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/openai/memory.py +0 -0
  202. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/openai/sessions.py +0 -0
  203. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/py.typed +0 -0
  204. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/ARCHITECTURE.md +0 -0
  205. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/__init__.py +0 -0
  206. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/auth.py +0 -0
  207. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/durability/__init__.py +0 -0
  208. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/durability/execution.py +0 -0
  209. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/durability/heartbeat.py +0 -0
  210. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/durability/lakebase_runtime_store.py +0 -0
  211. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/durability/recovery.py +0 -0
  212. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/durability/store.py +0 -0
  213. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/execution.py +0 -0
  214. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/genie.py +0 -0
  215. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/mcp_auth.py +0 -0
  216. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/prompt_registry.py +0 -0
  217. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/runtime.py +0 -0
  218. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/session_store_client.py +0 -0
  219. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/store.py +0 -0
  220. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/tracing.py +0 -0
  221. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/types.py +0 -0
  222. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/runtime/workspace.py +0 -0
  223. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/src/databricks_agentkit/session_store.py +0 -0
  224. {databricks_agentbricks-0.6.0 → databricks_agentbricks-0.7.1}/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.6.0
3
+ Version: 0.7.1
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
@@ -13,6 +13,7 @@ Requires-Dist: mlflow-skinny>=3.10.1
13
13
  Requires-Dist: packaging>=23.2
14
14
  Requires-Dist: psycopg[binary]>=3.1
15
15
  Requires-Dist: pyyaml>=6.0
16
+ Requires-Dist: requests<3,>=2.28.1
16
17
  Requires-Dist: rich>=13.7
17
18
  Requires-Dist: sqlalchemy[asyncio]>=2.0
18
19
  Requires-Dist: tomli>=2.0
@@ -32,14 +33,18 @@ Requires-Dist: databricks-openai>=0.13.0; extra == 'openai'
32
33
  Requires-Dist: mlflow>=3.10.1; extra == 'openai'
33
34
  Requires-Dist: openai-agents>=0.15.0; extra == 'openai'
34
35
  Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.25.0; extra == 'openai'
36
+ Provides-Extra: upgrade
37
+ Requires-Dist: gepa>=0.0.26; extra == 'upgrade'
38
+ Requires-Dist: litellm>=1.64.0; extra == 'upgrade'
39
+ Requires-Dist: mlflow>=3.11.0; extra == 'upgrade'
35
40
  Description-Content-Type: text/markdown
36
41
 
37
42
  # Agent Bricks CLI (`agentbricks`)
38
43
 
39
44
  Agent Bricks CLI is an experimental command-line interface for building and deploying custom
40
45
  agents on Databricks. It manages memory, sessions, tracing, and deployments from one authenticated
41
- command. Under `agentbricks experimental`, it also binds each of the agent's LLM calls to a model
42
- service you own, so the model behind it can change without a code change or redeploy.
46
+ command. Under `agentbricks experimental`, it also picks the model and prompt behind each of the
47
+ agent's LLM calls by searching candidates on your own eval set.
43
48
 
44
49
  > The underlying APIs are in preview and may need workspace enablement.
45
50
 
@@ -72,7 +77,7 @@ invocation protocol to design yourself. Bring your own agent, or start from a te
72
77
  up (detailed under [Agent tools](#agent-tools)).
73
78
  - **`agentbricks deploy`** - provisions the bound stores, grants the app's service principal access to
74
79
  them, provisions the durable-runtime database when durability is on, configures tracing, and rolls
75
- out the app. `agentbricks deployments` covers the lifecycle (list, get, logs, start, stop, delete).
80
+ out the app. `agentbricks deployments` covers the lifecycle (list, get, wait, logs, start, stop, delete).
76
81
  - **`agentbricks dev`** - runs your agent from the same manifest the deployment uses, so local behavior
77
82
  matches what ships.
78
83
 
@@ -90,6 +95,19 @@ The two ways to run an agent:
90
95
  server with no `DurableAgentServer`: you define your own endpoints, request/response shapes, and protocol.
91
96
  `agentbricks dev` and `agentbricks deploy` run and ship it the same way.
92
97
 
98
+ Both managed framework templates support human approval with request-user (OBO) tools. A new
99
+ invocation from the same authenticated user resumes the saved state with that request's tool
100
+ credentials; the browser can use its existing valid login session.
101
+
102
+ | Framework | Interactive OBO approval decisions |
103
+ | --- | --- |
104
+ | LangGraph | Approve, edit, or reject according to the middleware policy |
105
+ | OpenAI Agents SDK | Approve or reject, with the pending tool call's `call_id` |
106
+
107
+ Automatic OBO failure recovery remains unsupported. Existing generated apps need the corresponding
108
+ template source updates; upgrading the installed package does not rewrite their agent or adapter.
109
+ Custom servers own their authentication and approval protocol.
110
+
93
111
  ## Prerequisites
94
112
 
95
113
  - **Python ≥3.10** — the `agentbricks` CLI installs and runs on any Python 3.10+. The
@@ -182,16 +200,45 @@ agentbricks login --profile <profile>
182
200
  agentbricks init my-agent # Defaults to LangGraph; add --framework=openai for OpenAI Agents SDK
183
201
  cd my-agent
184
202
  agentbricks dev # optional: develop and test locally
185
- agentbricks deploy my-agent # deploy to Databricks
203
+ agentbricks deploy # deploy to Databricks as agent-bricks-my-agent
186
204
  ```
187
205
 
188
206
  `agentbricks dev` runs the agent locally on `http://localhost:8000`, wrapping the Databricks Apps
189
207
  local runtime so local behavior matches a deployment.
190
208
 
191
- `agentbricks deploy my-agent` deploys a Databricks App named `agent-bricks-my-agent`, provisions the
209
+ `agentbricks init` records the deployment name in `agent.toml`, so `agentbricks deploy` from the
210
+ project directory deploys a Databricks App named `agent-bricks-my-agent`, provisions the
192
211
  stores declared in `agent.toml`, and grants the app's service principal access to the stores and
193
212
  direct App-auth tool resources declared there. Use `agentbricks deployments list` to find deployed
194
213
  apps, and `agentbricks deployments get agent-bricks-my-agent` to print an app's URL and status.
214
+ Databricks App names cap at 30 characters, so a deployment name can be up to 17 characters after
215
+ the `agent-bricks-` prefix. `init` shortens a longer directory name to fit (for example
216
+ `caj-langgraph-agent` becomes `caj-langgr-<token>`); pass `agentbricks init --name <name>` to choose
217
+ it yourself, or `agentbricks deploy <name>` to change it later.
218
+
219
+ The app's compute starts first and boots while the other resources are provisioned. If a first
220
+ deploy stops partway, the app it created is kept: re-run `agentbricks deploy` to resume, or remove
221
+ it with `agentbricks deployments delete agent-bricks-my-agent`.
222
+
223
+ ### Deploying from a coding agent
224
+
225
+ A first deploy takes ~3 min (mostly starting app compute); redeploys are faster. Either run
226
+ `agentbricks deploy` in the foreground with a long command timeout (for example, Claude Code's Bash
227
+ `timeout: 600000`), or start it in the background and wait on it:
228
+
229
+ ```sh
230
+ agentbricks deploy my-agent --no-wait # quick checks, then deploys in the background
231
+ agentbricks deployments wait agent-bricks-my-agent
232
+ ```
233
+
234
+ `deployments wait` returns within 100 seconds (`--timeout`). Exit 0 means the agent is deployed and
235
+ running, and it prints the URL; exit 1 means the deploy failed, and it prints the error and the end
236
+ of the deploy log; exit 75 means it is still deploying, so run the same command again. Don't poll
237
+ with `sleep`. Progress lines with the elapsed time go to stderr, also under `-o json`, whose stdout
238
+ is a single JSON document. A second `deploy` of the same app is refused while one is still running
239
+ from the project; the deploy's state and background log are in `.agentbricks/deploy-<app>.json` and
240
+ `.agentbricks/deploy-<app>.log`. If the App is busy with another operation, `deploy` retries for
241
+ about two minutes before failing.
195
242
 
196
243
  `agentbricks init` declares default memory and session stores in `agent.toml`, so the deployed agent has
197
244
  long-term memory and durable conversation history. It creates `<name>-<6-letter-token>-memory` and
@@ -258,15 +305,15 @@ bindings. A declaration does not confirm that the resource exists or that the de
258
305
  | Local onboarding checks | `agentbricks doctor .` | Offline; does not verify bindings or deployed resources. |
259
306
  | 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. |
260
307
  | App status and URL | `agentbricks -p <profile> deployments get agent-bricks-<name>` | Queries the selected workspace for the named app. |
261
- | 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. |
262
- | 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. |
308
+ | Memory store IDs and details | `agentbricks -p <profile> memory stores get <name>`, or `agentbricks -p <profile> memory stores list --name <part-of-name>` | Pass the display name from `agent.toml`, the ID, or the resource name. If several stores share a display name, `get` lists them; pass one resource name. `list` is workspace-wide and paged; `--name` and `--all` read every page. |
309
+ | Session store names and details | `agentbricks -p <profile> sessions stores get <name>`, or `agentbricks -p <profile> sessions stores list --name <part-of-name>` | Pass the store name from `agent.toml`. `list` is workspace-wide and paged; `--name` and `--all` read every page. |
263
310
 
264
311
  Review each confirmation. Delete a store only after confirming that you own it and no other agent
265
312
  needs it, using the same profile and identifier used to inspect it.
266
313
 
267
314
  | Clean up | Command | Details |
268
315
  | --- | --- | --- |
269
- | 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. |
316
+ | Deployment | `agentbricks -p <profile> deployments delete agent-bricks-<name> [--delete-source]` | Managed Runtime Store cleanup checks the app identity and runs before app deletion; a cleanup failure retains the app for retry. Returns once the app is gone. The workspace folder its source was uploaded to is kept unless you pass `--delete-source`, which deletes it once the app is confirmed gone; otherwise delete prints the command to remove it. Exits 1 if the app isn't confirmed gone or a requested folder delete fails. Memory/session stores, tracing experiments and tools are retained. |
270
317
  | [Memory store](cli.md#agentbricks-memory-stores-delete) | `agentbricks -p <profile> memory stores delete <resource-name>` | Soft-deletes the store after confirmation. |
271
318
  | [Session store](cli.md#agentbricks-sessions-stores-delete) | `agentbricks -p <profile> sessions stores delete <name>` | Deletes the store after confirmation. |
272
319
 
@@ -354,6 +401,10 @@ agentbricks dev
354
401
  agentbricks --profile <profile> deploy my-agent
355
402
  ```
356
403
 
404
+ Use the URL `agentbricks dev` prints (port 8000, or `--app-port`). The `localhost:8001` line from the
405
+ wrapped `databricks apps run-local` is its proxy to the same app. Requests can fail with HTTP 500 for
406
+ a few seconds while the app starts.
407
+
357
408
  Use `--framework openai` for OpenAI Agents. Templates keep agent code separate from the runtime
358
409
  adapter and declare default Session and Memory Store bindings in `agent.toml`.
359
410
 
@@ -370,7 +421,9 @@ Each managed run is an **invocation**. Send a client-generated UUID `id` and you
370
421
  ```
371
422
 
372
423
  The optional top-level `session_id` groups invocations into one application session. It is distinct
373
- from the invocation `id` and from the `X-Routing-Key` sticky-routing header.
424
+ from the invocation `id` and from the `X-Routing-Key` sticky-routing header. The framework templates
425
+ require it, and read `input.actor` to choose whose long-term memory to use (see
426
+ [How sessions and memory are keyed](#how-sessions-and-memory-are-keyed)).
374
427
 
375
428
  | Endpoint | Behavior |
376
429
  | --- | --- |
@@ -407,6 +460,86 @@ scaffold a new project with the desired `agentbricks init --server` option and d
407
460
  See the [runtime guide](src/databricks_agentkit/runtime/README.md) for agent hooks, full API examples,
408
461
  and recovery behavior.
409
462
 
463
+ ### Call an agent from an external browser (CORS)
464
+
465
+ An external frontend, such as a React app at `https://chat.example.com`, has a different origin
466
+ from the agent's Databricks Apps URL. Enable CORS for its exact origin when deploying:
467
+
468
+ ```sh
469
+ agentbricks deploy my-agent \
470
+ --allowed-origin https://chat.example.com \
471
+ --allowed-origin http://localhost:3000
472
+ ```
473
+
474
+ This replaces the allowlist and records it in `agent.toml`:
475
+
476
+ ```toml
477
+ [cors]
478
+ allowed_origins = ["https://chat.example.com", "http://localhost:3000"]
479
+ ```
480
+
481
+ Later `agentbricks deploy` calls reuse the recorded origins. Direct edits to this table also
482
+ apply to `agentbricks dev` and the next deployment. To revoke browser access, use
483
+ `agentbricks deploy --clear-allowed-origins` or set `allowed_origins = []` and redeploy.
484
+ CORS is off by default. Origins include scheme, hostname, and optional port; paths, wildcards,
485
+ and `null` origins are rejected. For internationalized hostnames, supply the browser's ASCII/punycode
486
+ origin (for example, `https://xn--fa-hia.example` for `https://faß.example`); Unicode input is rejected
487
+ to avoid changing the allowed hostname. You can copy `window.location.origin` from the frontend's
488
+ browser console. IPv6 addresses are compressed to match browser origins. List every intended origin
489
+ when replacing the allowlist and remove development origins before production deployment.
490
+
491
+ The customer journey is:
492
+
493
+ 1. Deploy the managed agent server with the external frontend's allowed origin.
494
+ 2. Authenticate the frontend user and obtain a Databricks user OAuth token. For an external IdP
495
+ such as Microsoft Entra, configure [account-wide token federation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-federation)
496
+ and exchange the user's IdP JWT for a Databricks user token. An IdP login alone is insufficient.
497
+ 3. Send the token to the agent's `/api/` endpoints using `fetch`. The caller needs Apps `CAN USE`
498
+ permission and the required OAuth scopes. User-authorized tools also need Apps user-token
499
+ forwarding enabled, `auth = "user"` bindings, and the caller's resource permissions.
500
+ 4. Receive JSON or stream SSE events directly in the browser:
501
+
502
+ ```javascript
503
+ const response = await fetch(`${agentUrl}/api/invocations`, {
504
+ method: "POST",
505
+ credentials: "omit",
506
+ headers: {
507
+ Authorization: `Bearer ${databricksUserToken}`,
508
+ "Content-Type": "application/json",
509
+ },
510
+ body: JSON.stringify({
511
+ id: crypto.randomUUID(),
512
+ input: { messages: [{ role: "user", content: "Hello" }] },
513
+ stream: true,
514
+ }),
515
+ });
516
+ if (!response.ok || !response.body) throw new Error(`Invocation failed: ${response.status}`);
517
+ const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
518
+ while (true) {
519
+ const { value, done } = await reader.read();
520
+ if (done) break;
521
+ console.log(value); // Feed these SSE chunks to the frontend's SSE parser.
522
+ }
523
+ ```
524
+
525
+ The runtime allows `GET`/`POST` and the `Authorization`, `Content-Type`, `X-Routing-Key`, and
526
+ `Last-Event-ID` request headers. It answers preflight without invoking the agent and adds CORS
527
+ headers to JSON, SSE, polling, and agent-generated error responses. Use `fetch` for authenticated
528
+ SSE; native `EventSource` cannot set the bearer Authorization header. Cross-origin cookie
529
+ authentication is not enabled. The bundled chat UI uses same-origin requests and needs no allowlist.
530
+
531
+ CORS controls browser access to responses; it does not replace authentication or prevent non-browser
532
+ clients from calling the API. Apps ingress must allow unauthenticated `OPTIONS` requests through.
533
+ Errors generated by ingress, including rejected tokens, do not pass through runtime middleware and
534
+ can appear as generic browser CORS failures. Verify a deployed App's preflight and authenticated
535
+ stream before relying on this path; a same-origin backend proxy is an alternative when ingress
536
+ cannot satisfy the browser contract.
537
+
538
+ Both the CLI and the agent project's `databricks-agentbricks` dependency must contain this feature;
539
+ upgrading the CLI alone does not upgrade an already resolved runtime dependency. Before release,
540
+ follow [the unreleased SDK instructions](CONTRIBUTING.md#testing-sdk--runtime-changes-in-a-scaffold).
541
+ The flags require `server = "agentbricks"`; custom servers configure their own CORS middleware.
542
+
410
543
  ## Memory and sessions
411
544
 
412
545
  To hold context, an agent needs two kinds of state: the state of the interaction it is handling right
@@ -517,7 +650,8 @@ To browse rather than search, `memory_store.list(actor_id=..., path_prefix=...)`
517
650
  directly, and `memory_store.list(actor_id=..., path=...)` returns the entries at one exact path.
518
651
 
519
652
  In an agent configured with `server = "agentbricks"`, add the memory tools so the model can read and write memory during a run.
520
- `memory_tools(actor)` returns four tools bound to one actor's partition:
653
+ `memory_tools(actor)` returns four tools bound to one actor's partition (the templates pass
654
+ `input.actor`; see [How sessions and memory are keyed](#how-sessions-and-memory-are-keyed)):
521
655
 
522
656
  - `remember(fact, topic)` appends the fact to one memory per topic, `/{topic}.md`, with the topic
523
657
  reduced to a safe path segment. Remembering a fact that is already there is a no-op.
@@ -549,6 +683,30 @@ agent = create_agent(model=..., tools=[*your_tools, *memory_tools(actor)])
549
683
  > `session_store.grant_permission(principal_id)` or `memory_store.grant_permission(principal_id)`;
550
684
  > `agentbricks deploy` does this for the deployed app automatically.
551
685
 
686
+ ### How sessions and memory are keyed
687
+
688
+ In an agent generated by `agentbricks init`, each invocation picks its session and its memory
689
+ partition:
690
+
691
+ - **Session store:** one conversation's state, keyed by the invocation's top-level `session_id`.
692
+ - **Memory store:** facts recalled across conversations, keyed by `input.actor`.
693
+
694
+ If a request leaves out `actor`, it defaults to the `session_id`, so long-term memory won't carry
695
+ across conversations. For memory that persists, pass a stable `actor`, such as the end user's ID, from
696
+ trusted application context. The chat app sends the signed-in user; HTTP clients, including
697
+ `agentbricks endpoint invoke`, have to send it themselves. With a request-user (`auth = "user"`) tool
698
+ bound, the runtime also namespaces a supplied `actor` to the signed-in user.
699
+
700
+ Memory is off under `agentbricks dev`, so try this against a deployed agent: two conversations, one
701
+ actor.
702
+
703
+ ```sh
704
+ ask() { agentbricks --profile <profile> endpoint invoke agent-bricks-my-agent --path /api/invocations \
705
+ --json "{\"id\":\"$(uuidgen)\",\"session_id\":\"$(uuidgen)\",\"input\":{\"actor\":\"user-123\",\"messages\":[{\"role\":\"user\",\"content\":\"$1\"}]}}"; }
706
+ ask "Remember that I prefer answers as bullet points." # conversation 1 saves a fact
707
+ ask "How do I like my answers formatted?" # conversation 2 recalls it
708
+ ```
709
+
552
710
  ### Declaring and provisioning stores
553
711
 
554
712
  For a deployed agent, `agent.toml` declares which stores it uses and `agentbricks deploy` provisions them —
@@ -576,31 +734,78 @@ removes the corresponding `AGENT_MEMORY_STORE` or `AGENT_SESSION_STORE` entry fr
576
734
  Unbinding does not delete the store or revoke an existing grant to the App's service principal.
577
735
  If access must be revoked, coordinate that separately with the store owner or workspace admin.
578
736
 
579
- ## Model services and prompts (experimental)
737
+ ## Model and prompt upgrades (experimental)
580
738
 
581
- `agentbricks experimental models` and `agentbricks experimental prompts` bind each LLM call in
582
- your agent to a Unity Gateway model service you own (Unity Gateway was formerly AI Gateway), and
583
- declare the Prompt Registry prompts it loads. They live under `experimental` because their flags
584
- and output may still change between releases without a deprecation period. The agent.toml tables
585
- they write live under `[experimental]` too.
739
+ `agentbricks experimental models` and `agentbricks experimental prompts` find the best model and
740
+ prompt for each LLM call in your agent and swap them in. They live under `experimental` because
741
+ their flags and output may still change between releases without a deprecation period. The
742
+ agent.toml tables they write live under `[experimental]` too.
586
743
 
587
- A one-model agent binds one service. A compound agent binds one per call site, each under a role:
744
+ Point each of the agent's LLM calls at a Unity Gateway model service you own (Unity Gateway was
745
+ formerly AI Gateway), and the models behind them can change without a code change or redeploy. A
746
+ one-model agent binds one service. A compound agent binds one per call site, each under a role,
747
+ and declares the Prompt Registry prompts it loads so the search can rewrite them too:
588
748
 
589
749
  ```sh
590
750
  agentbricks experimental models bind main.my_agent.router_llm --role router --default system.ai.claude-haiku-4-5
591
751
  agentbricks experimental models bind main.my_agent.writer_llm --role writer --default system.ai.claude-sonnet-4-5
592
752
  agentbricks experimental prompts bind main.my_agent.writer
593
753
  agentbricks deploy my-agent # creates the services and grants the app access to them and the prompt
594
- agentbricks experimental models status # the model behind each service
595
- agentbricks experimental models set claude-haiku-4-5 --role writer # switch one, no redeploy
754
+ agentbricks experimental models upgrade -c router=claude-haiku-4-5,gpt-5-4-nano -c writer=claude-haiku-4-5 \
755
+ --predict agent.eval:predict --train-data agent.eval:TRAIN --val-data agent.eval:VAL \
756
+ --scorer agent.eval:SCORERS
757
+ agentbricks experimental models status # the job's state, then its recommendation
758
+ agentbricks experimental models apply # switch to it
596
759
  ```
597
760
 
598
- Each LLM call must use its role's service, `resolve_model_service("<role>")`, which reads the
599
- `AGENT_MODEL_SERVICE_<ROLE>` env var that deploy sets. Deploy creates a service that doesn't exist
600
- yet, routed to its `--default` model, and never repoints one that does, so a redeploy can't undo a
601
- switch. For bound prompts, deploy grants the app the schema privileges the Prompt Registry requires
602
- to load them (USE SCHEMA, EXECUTE, CREATE FUNCTION, and MANAGE). `agentbricks experimental prompts
603
- list` shows each bound prompt and the version its `@production` alias points at.
761
+ By default `models upgrade` uploads the project to your workspace and runs the search as a
762
+ serverless Databricks job, because a search can take hours. `--run-on local` runs it in your
763
+ terminal instead, which needs the `upgrade` extra and the agent's dependencies installed. Each call
764
+ takes longer from a laptop than on a serverless job, and a record slower than `--latency-gate` (60
765
+ seconds by default) scores 0, so raise it if a local run warns that records went over the gate. The job imports the `predict_fn`,
766
+ eval data, and scorers you name from the project (the same inputs `optimize_prompts_and_models`
767
+ takes, below) and runs each eval record once per candidate, against a temporary `<service>_exp_<id>`
768
+ clone. Each LLM call must use its role's service, `resolve_model_service("<role>")`, which reads the
769
+ `AGENT_MODEL_SERVICE_<ROLE>` env var that deploy (and the job, before importing your code) sets.
770
+ GEPA also rewrites every prompt bound with `prompts bind` for each candidate model. Pass
771
+ `--prompt` to pick specific prompts instead, or `--models-only` to leave prompts alone. `models apply` switches
772
+ to the best quality / latency / cost trade-off and registers any rewritten prompts (prior versions
773
+ keep `@production_previous`). `models rollback` undoes the whole last apply: it switches every
774
+ model back and moves each prompt's alias back to its prior version. Apply refuses recommendations
775
+ whose prompt aliases changed during the search; rollback checks those aliases against the versions
776
+ recorded when the recommendation was applied. If rollback fails partway through, run it again
777
+ to finish the remaining changes. Each search owns its temporary clones, so overlapping jobs can
778
+ evaluate different models independently.
779
+
780
+ The search is `databricks_agentkit.model_upgrades`, which you can also call directly (for example
781
+ from a notebook) to tune several model services and MLflow Prompt Registry prompts together:
782
+
783
+ ```python
784
+ from databricks_agentkit.model_upgrades import optimize_prompts_and_models, promote_to_prod
785
+
786
+ result = optimize_prompts_and_models(
787
+ predict, # predict(inputs: dict) -> answer
788
+ train_data, # [{"inputs": {...}, "expectations": {"expected_response": ...}}, ...]
789
+ val_data,
790
+ prompt_uris=["prompts:/main.my_agent.router@production"],
791
+ gateway_endpoints={
792
+ "main.my_agent.router_llm": ["claude-haiku-4-5", "gpt-5-4-mini"],
793
+ "main.my_agent.writer_llm": ["claude-sonnet-4-5", "claude-haiku-4-5"],
794
+ },
795
+ scorers=scorers, # MLflow scorers, or (inputs, expectations, answer) -> float
796
+ max_metric_calls=200,
797
+ )
798
+ promote_to_prod(result) # repoints the services, registers and aliases the winning prompts
799
+ ```
800
+
801
+ Model choices use a UCB1 bandit by default (`model_selection="reflection"` asks the reflection LLM
802
+ instead); prompts are rewritten by GEPA's reflection loop, which uses Claude Opus 5.5. Both need the `upgrade` extra:
803
+ `pip install 'databricks-agentbricks[upgrade]'`.
804
+
805
+ Prompts the agent loads from the MLflow Prompt Registry go under `[experimental.prompts]`
806
+ (`agentbricks experimental prompts bind main.my_agent.writer`), and deploy grants the app
807
+ the schema privileges the registry requires to load them. `agentbricks experimental prompts list`
808
+ shows each bound prompt and the version its `@production` alias points at.
604
809
 
605
810
  ## Commands
606
811
 
@@ -632,7 +837,7 @@ agentbricks [-p <profile>] [-o text|json]
632
837
  unbind [--source PATH]
633
838
  list | get [--experiment-name NAME | --experiment-id ID] [--source PATH]
634
839
  tools
635
- add sandbox --scope SCOPE [--scope SCOPE ...]
840
+ add sandbox [--name NAME] [--auth user|app]
636
841
  [--no-databricks-access-token-included] [--source PATH]
637
842
  add mcp SERVICE [--name NAME] [--source PATH]
638
843
  add uc-function FUNCTION [--name NAME] [--auth user|app] [--source PATH]
@@ -645,12 +850,21 @@ agentbricks [-p <profile>] [-o text|json]
645
850
  bind SERVICE [--role ROLE] [--default MODEL] [--source PATH]
646
851
  unbind | list | status
647
852
  set MODEL [--role ROLE] [--yes]
853
+ rollback [--role ROLE] [--yes]
854
+ upgrade [--candidates [ROLE=]MODEL[,...] [...]] [--prompt URI ... | --models-only] --predict REF --train-data REF --val-data REF
855
+ --scorer REF [...] [--budget N] [--quality-weight Q] [--latency-weight L] [--cost-weight C]
856
+ [--timeout-hours H]
857
+ [--run-on job|local] [--apply never|ask|auto] [--wait]
858
+ apply [--yes]
648
859
  prompts
649
860
  bind PROMPT [--key KEY] [--source PATH]
650
861
  unbind KEY [--source PATH]
651
862
  list [--source PATH]
652
- deploy [<name>] [--source PATH] [--instances N]
653
- deployments list | get | logs | start | stop | delete
863
+ deploy [<name>] [--source PATH] [--instances N] [--no-wait]
864
+ [--allowed-origin ORIGIN ... | --clear-allowed-origins]
865
+ deployments
866
+ wait [<name>] [--timeout SECONDS] [--source PATH]
867
+ list | get | logs | start | stop | delete
654
868
  endpoint
655
869
  invoke [APP] --path PATH [--url URL] [--json JSON] [--sse]
656
870
  ```
@@ -773,7 +987,7 @@ add` updates only this file; direct TOML edits have the same behavior. Both mana
773
987
  adapters read the managed bindings at runtime without generating or patching agent source:
774
988
 
775
989
  ```sh
776
- agentbricks tools add sandbox --scope volume:main.data.files
990
+ agentbricks tools add sandbox
777
991
  agentbricks tools add mcp system.ai.web_search
778
992
  agentbricks tools add uc-function catalog.schema.lookup_ticket
779
993
  agentbricks tools add genie-one
@@ -970,9 +1184,9 @@ points to that project's file. JSON add output includes its path in `manifest`.
970
1184
 
971
1185
  `agentbricks tools list` discovers **available integrations to add**, not configured bindings. By default
972
1186
  it shows built-in add recipes and caller-visible MCP Services in `system.ai`. A recipe may still
973
- need your resources: sandbox scopes, a concrete UC function name, or a Genie Space ID. Genie One
974
- needs no additional argument. `system.ai.sandbox` is represented by its scoped recipe rather than
975
- a second unscoped add command. The list does not enumerate every workspace schema, individual
1187
+ need your resources: a concrete UC function name or a Genie Space ID. Sandbox and Genie One need no
1188
+ additional argument. `system.ai.sandbox` is represented by the `tools add sandbox` recipe rather
1189
+ than a generic `tools add mcp` command. The list does not enumerate every workspace schema, individual
976
1190
  operations inside MCP services, or custom Python tools.
977
1191
 
978
1192
  `agentbricks tools add mcp` looks up the service in the selected workspace before writing `agent.toml`.
@@ -1032,22 +1246,41 @@ If a manifest with `server = "agentbricks"` contains `source = { kind = "python"
1032
1246
  `[[tools]]` entry; the decorated tool in `agent/tools/` remains active. `agentbricks dev` and `agentbricks deploy`
1033
1247
  do not generate or patch Python tool code, and do not alter the manifest's `[[tools]]` bindings.
1034
1248
 
1035
- Sandbox scopes support volumes only and default to read-only access. Repeat `--scope` to allow more
1036
- than one volume, use `volume:catalog.schema.volume`, and use `--permission read_write` only when the
1037
- agent needs writes. Every sandbox call carries this fixed downscope in MCP `_meta`, outside the tool
1038
- arguments controlled by the model. New sandbox bindings also expose the selected Databricks
1039
- credential to sandbox code by default:
1249
+ Sandbox code runs with the selected identity's own Unity Catalog access: the request user for
1250
+ `auth = "user"` (the default) or the App service principal for `auth = "app"`. Grant that identity
1251
+ only the data the agent needs. New sandbox bindings also expose the selected Databricks credential to
1252
+ sandbox code by default:
1040
1253
 
1041
1254
  ```toml
1042
1255
  [[tools]]
1043
1256
  id = "sandbox"
1044
1257
  auth = "user"
1045
1258
  source = { kind = "sandbox", service = "system.ai.sandbox" }
1046
- policy = { downscope = [{ resource = "volume:main.data.files", permission = "read_only" }], databricks_access_token_included = true }
1259
+ policy = { databricks_access_token_included = true }
1047
1260
  ```
1048
1261
 
1049
- Table sandbox scopes are not supported yet because Databricks Connect does not support table
1050
- downscoping. Workspace sandbox scopes are also not supported yet; they have not been validated
1262
+ Every sandbox call carries this fixed policy in MCP `_meta`, outside the tool arguments controlled
1263
+ by the model, with an empty `downscope`.
1264
+
1265
+ Sandbox resource scopes are not supported: the Sandbox API backend of `system.ai.sandbox` rejects any
1266
+ non-empty `_meta.downscope`. The scoping implementation (`--scope`, `--permission`, and
1267
+ `policy.downscope`) is retained behind a disabled code-level gate, `SANDBOX_DOWNSCOPE_ENABLED`, so it
1268
+ can be enabled when the backend supports resource policies. There is no CLI option to bypass that
1269
+ gate. While it is disabled, `agentbricks tools add sandbox --scope ...` fails without changing the
1270
+ project, and `agentbricks dev`, `agentbricks deploy`, and the runtime reject a manifest that still
1271
+ declares `policy.downscope`:
1272
+
1273
+ ```text
1274
+ Tool 'sandbox' declares policy.downscope, which system.ai.sandbox does not support: sandbox code
1275
+ runs with the selected identity's own Unity Catalog access. Remove policy.downscope from the
1276
+ [[tools]] entry with id = 'sandbox' in agent.toml.
1277
+ ```
1278
+
1279
+ To fix an existing project, delete the `downscope = [...]` entry from that tool's `policy` table and
1280
+ keep `databricks_access_token_included`. Then grant the sandbox identity access to the data it needs.
1281
+
1282
+ When scopes are enabled, table sandbox scopes remain unsupported because Databricks Connect does not
1283
+ support table downscoping. Workspace sandbox scopes are also not supported yet; they have not been validated
1051
1284
  against a live workspace. Use a volume instead. Existing `table:` and `workspace:` entries must be
1052
1285
  removed from `agent.toml` before using `agentbricks dev` or `agentbricks deploy`.
1053
1286
 
@@ -1169,7 +1402,8 @@ via the `AGENT_MEMORY_STORE` env var that `deploy` injects; `agentbricks dev` ru
1169
1402
  and does not inject it. The id is not persisted in `agent.toml`.)
1170
1403
 
1171
1404
  The chat UI generates a stable application session UUID in browser local storage, sends it as the
1172
- invocation's top-level `session_id`, and creates a fresh invocation UUID per turn. The chat app also
1405
+ invocation's top-level `session_id`, sends the signed-in user as `input.actor`, and creates a fresh
1406
+ invocation UUID per turn. The chat app also
1173
1407
  sends this session UUID in the `X-Routing-Key` request header, which is used verbatim to pin
1174
1408
  the session to one app replica (it must be non-blank and no more than 128 UTF-8 bytes). The header is neither
1175
1409
  authentication nor the template's application session state; it is independent sticky-routing