Open
Conversation
2f40724 to
f7038f8
Compare
Proposes refactoring the monolithic Workbench backend (~10K lines) into
5 discoverable sub-agents using @app_agent + AI Dev Kit, with a thin
supervisor routing frontend API calls. Additive only — no existing code
is modified.
New files:
- docs/architecture-proposal.md: full proposal with migration phases
- agents.yaml: multi-agent deployment config
- agents/{scorer,analyzer,creator,optimizer,fixer}/app.py: agent scaffolds
- agents/{scorer,analyzer,creator,optimizer,fixer}/app.yaml: per-agent config
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.
8045f4f to
e2bebc3
Compare
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_agent(dbx-agent-app) + AI Dev Kit (databricks-tools-core)agents.yamldeployment config, and skeletonapp.py+app.yamlfor each agentAgent Decomposition
Integration Challenge Solutions
obo_context()context manager bridges all 3 in onewithblockagents/_shared/auth_bridge.pygenerate_confighas 11 params with 4-5 nesting levels; 580 lines of hand-written JSON schemaagents/creator/schemas.pyagents/supervisor/proxy.py@with_sp_fallbackdecorator +genie_api_call()convenience functionagents/_shared/sp_fallback.pyagents/_shared/lakebase_client.pyEstimated Impact
@app_agent)mlflow.genai.evaluate()support via eval bridgeFiles
New — shared utilities
agents/_shared/auth_bridge.py— OBO auth context manageragents/_shared/sp_fallback.py— SP fallback decoratoragents/_shared/lakebase_client.py— Shared Lakebase poolagents/creator/schemas.py— Pydantic models for complex tool schemasagents/supervisor/proxy.py— Frontend-transparent proxyNew — agent scaffolds
agents/scorer/app.py— scorer agent (wired up with auth_bridge, sp_fallback, lakebase)agents/analyzer/app.py— analyzer agent scaffoldagents/creator/app.py— creator agent (uses Pydantic schema override)agents/optimizer/app.py— optimizer agent scaffoldagents/fixer/app.py— fixer agent scaffoldagents.yaml— multi-agent deployment configDocs
docs/architecture-proposal.md— full proposal with concrete integration solutionsTest plan
docs/architecture-proposal.mdfor completeness and accuracy