Add agent deployment layer for Workbench services#32
Open
stuart-gano wants to merge 6 commits intomainfrom
Open
Add agent deployment layer for Workbench services#32stuart-gano wants to merge 6 commits intomainfrom
stuart-gano wants to merge 6 commits intomainfrom
Conversation
Includes project development guide and the GenieRX analysis/recommendation framework specification.
- Updated line counts (10,178 total backend) - Documented SP fallback pattern (get_service_principal_client + _is_scope_error) added in PR #7 as new integration challenge (#4) - Documented genie_client.py scope-error retry pattern in pain points - Updated scorer scaffold with notes on field name changes (space_id/title) and space_url addition from PR #6 - Noted SP fallback in get_space_detail from PR #7
…tecture Add shared utilities and agent-specific modules that solve the 5 integration challenges identified in the architecture proposal: 1. OBO Auth Bridge (agents/_shared/auth_bridge.py): Context manager that bridges @app_agent UserContext into both monolith ContextVar auth and databricks-tools-core ContextVars in a single `with` block. 2. Complex Tool Schemas (agents/creator/schemas.py): Pydantic models that auto-generate JSON Schema for @app_agent tool registration, replacing ~580 lines of hand-written schema in create_agent_tools.py. 3. Frontend Transparent Proxy (agents/supervisor/proxy.py): Ordered route table mapping all 28 frontend API paths to sub-agents with SSE stream detection and glob support for path parameters. 4. SP Fallback Decorator (agents/_shared/sp_fallback.py): Extracts the _is_scope_error + retry-with-SP pattern from genie_client.py into a reusable decorator and convenience function. 5. Shared Lakebase Client (agents/_shared/lakebase_client.py): Connection pool lifecycle with idempotent DDL per agent and in-memory fallback. Also updates scorer/app.py and creator/app.py scaffolds to demonstrate the integration patterns, and updates the proposal doc with concrete solutions replacing the placeholder descriptions.
Rewrite architecture-proposal.md and CLAUDE.md to position the agent layer as an enhancement that wraps existing domain logic, not a migration that replaces it. Existing monolith stays unchanged. Co-authored-by: Isaac
Replace NotImplementedError stubs with actual implementations: - scorer: calls scanner.py, lakebase.py for scoring/history/stars - analyzer: calls genie_client.py, sql_executor.py, result_comparator.py - optimizer: calls optimizer.py for suggestions, merge, and space creation - fixer: calls fix_agent.py for patch generation and application - creator: delegates all 16 tools to create_agent_tools.handle_tool_call() All agents use obo_context() to bridge auth. No changes to existing backend services — agents are thin wrappers. Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@app_agentdeployment layer so each Workbench capability can be deployed as a standalone Databricks agent with A2A discovery, MCP server, andmlflow.genai.evaluate()supportbackend/services/logic viaobo_context()auth bridge — no changes to existing codeagents.yamldeployment configAll additive — existing monolith deployment is unchanged.
Agents
scanner.py,lakebase.pygenie_client.py,sql_executor.py,result_comparator.pyoptimizer.py,genie_creator.pyfix_agent.pycreate_agent_tools.handle_tool_call()What this enables
mlflow.genai.evaluate()against individual agentsTest plan
backend/)/invocationsand/health/.well-known/agent.jsonreturns correct agent cardmlflow.genai.evaluate()against deployed scorer viaapp_predict_fn()This pull request was AI-assisted by Isaac.