-
Notifications
You must be signed in to change notification settings - Fork 0
[Enhancement] Leverage AppKit Genie Plugin and Agent Plugin for live in-app Agent & Genie integration #4
Description
Enhancement: AppKit for Agent and Genie Connection
Summary
The workshop's Data Intelligence chapter (Steps 17-19, 25) guides participants through building Genie Spaces and multi-agent orchestrators, but the workshop app itself has no live integration with either. All Agent and Genie steps are delivered as copy-paste prompts for an external IDE -- participants build these assets externally and verify them by opening workspace URLs.
Databricks AppKit now ships a Genie Plugin and has an Agent Plugin in active development that could bring live Genie and Agent interactions directly into the workshop UI. Combined with the Genie Conversation APIs (Public Preview), the workshop can evolve from a prompt-generation tool to an interactive platform where participants build, test, and interact with their Genie Spaces and Agents without leaving the app.
1. Current State: Prompt-Only Agent & Genie Steps
The workshop has 5 steps involving Agents and Genie, all in the "Data Intelligence" chapter:
| Step | Section Tag | What It Does | How It Works Today |
|---|---|---|---|
| 17 | genie_space |
Build semantic layer (TVFs, Metric Views) + Genie Space | Generates a large prompt referencing semantic-layer/ skill files; participant copies to IDE |
| 18 | agent_framework |
Build multi-agent orchestrator with Genie integration | References agentic-framework/agents/multi-agent-build-prompt.md; participant copies to IDE |
| 19 | wire_ui_agent |
Wire app frontend to agent serving endpoint | References agent-ui-wiring-prompt.md; participant copies to IDE |
| 25 | optimize_genie |
Benchmark and optimize Genie Space for production | References 05-genie-optimization-orchestrator/SKILL.md; hidden by default |
| Accelerator | genie-accelerator |
Filtered workshop path focusing on Genie steps | Hides non-Genie steps (18, 19, 16) from the DI section |
What the backend does today:
routes.pyhas agent-format payload compatibility for Foundation Model serving endpoints (fallback JSON shapes forinputvsmessages), but no Genie Conversation API calls and no embedded Genie or Agent chat- Verification links (
verificationLinks.ts) point to{workspace_url}genie?o=...-- participants leave the app to verify ServicePopover.tsxshowsgenieSpacesandagentsas service blurbs with doc links, but no interactive functionality- The skill tree (
skillTreeMapping.ts) maps steps 17-19 to orchestrator/worker skill hierarchies for prompt generation -- pure content, no API integration
There are zero API calls to:
- Genie Conversation API (
POST /api/2.0/genie/spaces/{space_id}/conversations) - Genie Management API (
POST /api/2.0/genie/spaces) - Agent serving endpoints (beyond the generic Foundation Model payload fallback)
- Agent Framework APIs
2. What AppKit Offers
2a. Genie Plugin (Shipped -- v0.21.0)
AppKit's Genie Plugin provides a conversational AI interface powered by Databricks AI/BI Genie:
- Natural-language data querying against curated Genie Spaces
- Automatic chart inference and visualization from query results
- Stateful multi-turn conversations
- Embeddable React components
This could be integrated into the workshop so that after Step 17 (where participants create their Genie Space), they can immediately test it inside the workshop app via an embedded Genie chat panel -- instead of navigating to the workspace URL.
2b. Agent Plugin (In Active Development)
AppKit has multiple active PRs for an Agent Plugin:
| PR | Title | Status | Date |
|---|---|---|---|
| #138 | AgentPlugin + ChatUIPlugin for LangChain/LangGraph agents (POC) | Open | Feb 26, 2026 |
| #166 | AgentPlugin for LangChain/LangGraph agents | Open (47 comments) | Mar 9, 2026 |
| #176 | Tracing integration for agent plugin | Open | Mar 11, 2026 |
| #217 | PoC agent plugin (latest) | Draft | Mar 26, 2026 |
Once shipped, this plugin would allow the workshop to embed an agent chat UI so participants can interact with the multi-agent orchestrator they built in Step 18 -- directly from the workshop app, with tracing and observability built in.
2c. Genie Conversation APIs (Public Preview)
The Genie Conversation APIs enable:
- Programmatic Genie Space creation (
POST /api/2.0/genie/spaces) -- the workshop could auto-create a Genie Space from the participant's Gold tables as part of Step 17 - Stateful conversations (
POST /api/2.0/genie/spaces/{space_id}/conversations) -- embedded multi-turn chat - Space management -- update instructions, add benchmark questions, configure data sources via API
- Validation -- run benchmark questions programmatically to verify Genie Space quality (Step 25)
2d. Related AppKit Plugins
| Plugin | Relevance |
|---|---|
| Vector Search (PR #200) | Could complement agent RAG workflows built in Step 18 |
| Files Plugin (shipped) | UC Volumes file management for agent artifacts |
| Analytics Plugin (shipped) | Type-safe SQL queries that agents could reference |
3. Proposed Enhancements
3a. Embedded Genie Chat (Post-Step 17)
After participants complete Step 17 (Genie Space creation), show an embedded Genie conversational panel in the workshop UI:
- Use AppKit's Genie Plugin to render a chat interface connected to the participant's newly created Genie Space
- Participant can test natural-language queries against their data immediately
- Results show with automatic chart inference -- participants see the value of their semantic layer without leaving the app
- Replace the current "Open Genie Space" verification link with this live panel
3b. Programmatic Genie Space Creation (Step 17 Automation)
Use the Genie Conversation API to automate parts of Step 17:
- After the participant's Gold tables are created (Steps 11-14), the workshop backend can auto-discover available tables via Unity Catalog
- Pre-populate a Genie Space configuration (tables, sample questions, instructions) based on the participant's use case
- Call
POST /api/2.0/genie/spacesto create the space programmatically - Participant refines via the embedded Genie chat rather than writing all the config by hand in the IDE
3c. Embedded Agent Chat (Post-Step 18/19)
After participants deploy their agent (Steps 18-19), embed an agent chat panel:
- Use AppKit's Agent Plugin (once shipped) to render a chat UI connected to the participant's agent serving endpoint
- Participant can test the multi-agent orchestrator directly: ask questions that route through the Genie integration, LLM rewrite, and web search fallback
- Show agent tracing (via AppKit's tracing integration PR #176) so participants can see how the orchestrator routes queries
3d. Genie Benchmark Automation (Step 25)
Use the Genie API to automate the optimization loop in Step 25:
- Programmatically run benchmark questions against the Genie Space
- Display accuracy metrics in the workshop UI
- Suggest improvements (additional instructions, example SQL, TVF adjustments) based on benchmark results
- Currently this step is hidden (
step_enabled = FALSE) -- with live API integration, it becomes practical to enable by default
3e. Genie Accelerator Upgrade
The genie-accelerator workshop level currently just filters steps. With AppKit Genie Plugin integration, it could become a fully interactive Genie experience:
- Guided Genie Space creation with live preview
- Iterative refinement loop: ask question -> see result -> add instruction -> re-test
- Benchmark-driven optimization with accuracy scores
- All within the workshop app, zero IDE switching
4. What Needs to Change
| Component | Current | Proposed |
|---|---|---|
Backend (routes.py) |
No Genie API calls; agent-format payload fallback only | Add Genie Conversation API routes; add agent endpoint proxy routes |
Frontend (WorkflowDiagram.tsx) |
Steps 17-19 render as prompt generators | Add embedded Genie/Agent chat panels after step completion |
Verification (verificationLinks.ts) |
Links to {workspace_url}genie?o=... |
In-app Genie panel replaces external link |
Services (ServicePopover.tsx) |
Static blurbs for genieSpaces and agents |
Live status indicators (space created, agent deployed) |
Config (app.yaml) |
No Genie Space ID or Agent endpoint env vars | Add GENIE_SPACE_ID, AGENT_SERVING_ENDPOINT per-session vars |
| Session state (Lakebase) | No Genie/Agent metadata stored | Store genie_space_id, agent_endpoint_name in session |
Step 25 (optimize_genie) |
Hidden by default, prompt-only | Enabled by default with live benchmark execution |
Skill tree (skillTreeMapping.ts) |
Content references only | Add "Test in App" action nodes that trigger embedded panels |
| Deployment | No AppKit dependency | Add AppKit Genie Plugin as frontend dependency; Agent Plugin when available |
5. Proposed Implementation Phases
Phase 1: Genie Conversation API Backend
- Add Genie API proxy routes to
routes.py(create space, start conversation, send message, get results) - Store
genie_space_idin session metadata (Lakebasesessionstable) - Add
GENIE_WAREHOUSE_IDtoapp.yamlenv vars
Phase 2: Embedded Genie Chat UI
- Integrate AppKit Genie Plugin (or build custom React component using Genie API)
- Add Genie chat panel to Step 17 completion view
- Replace
genie_spaceverification link with in-app panel
Phase 3: Agent Plugin Integration
- Track AppKit Agent Plugin development (PRs #166, #217)
- When shipped: integrate Agent Plugin for embedded agent chat after Steps 18-19
- Add agent endpoint metadata to session state
Phase 4: Automated Benchmarking (Step 25)
- Use Genie API to run benchmarks programmatically
- Display accuracy metrics in the workshop UI
- Enable Step 25 by default with live functionality
Phase 5: Genie Accelerator Interactive Mode
- Redesign
genie-acceleratorworkshop level as a guided, interactive Genie experience - Live create -> test -> refine -> benchmark loop entirely in-app
6. Dependencies and Risks
- AppKit Genie Plugin: Shipped (v0.21.0) -- ready for integration
- AppKit Agent Plugin: In development (PRs open) -- Phase 3 depends on this shipping; can be deferred
- Genie Conversation API: Public Preview -- stable enough for workshop use, but API may change
- Session architecture: Currently sessions store step prompts as JSON; adding Genie/Agent metadata requires schema evolution
- Auth flow: Genie API requires the participant's credentials (not the workshop app's SP) to access their Genie Space -- may need OAuth delegation or a different auth pattern
- AppKit migration: If Issue [PFR] Integrate Databricks AppKit SDK to replace custom React + FastAPI + Lakebase stack #1 (full AppKit migration) proceeds first, Genie/Agent plugins integrate naturally; if this enhancement is done standalone, it adds a hybrid AppKit + FastAPI architecture
References
- AppKit Genie Plugin: https://databricks.github.io/appkit/
- AppKit Agent Plugin PRs: #138, #166, #176, #217
- Genie Conversation API: https://docs.databricks.com/aws/en/genie/conversation-api
- Genie blog post: https://www.databricks.com/blog/genie-conversation-apis-public-preview
- Current Genie step:
src/constants/workflowSections.ts(steps 17, 22, 25) - Current Agent steps:
src/constants/workflowSections.ts(steps 18, 19) - Genie Accelerator:
src/constants/workflowSections.ts(genie-accelerator level filtering) - Agent seed prompts:
db/lakebase/dml_seed/02_seed_section_input_prompts.sql(agent_framework, wire_ui_agent) - Skill tree mapping:
src/constants/skillTreeMapping.ts(genie_space, agent_framework, wire_ui_agent) - Verification links:
src/constants/verificationLinks.ts(genie_space, optimize_genie) - Service popovers:
src/components/ServicePopover.tsx(genieSpaces, agents) - Related issues: [PFR] Integrate Databricks AppKit SDK to replace custom React + FastAPI + Lakebase stack #1 (AppKit SDK migration), [PFR] Add Genie Code support as a workshop coding assistant target #2 (Genie Code support)