This lab will guide you through creating a comprehensive multi-agent system in Databricks using Agent Bricks. You'll build a financial analysis system that can answer complex questions by combining document knowledge with structured data analysis.
By the end of this lab, you'll have created:
- Knowledge Assistant: Analyzes financial documents (10-Ks, 10-Qs, annual reports, earnings materials)
- Genie Space: Natural language to SQL agent for ticker/financial data queries
- Unity Catalog Function: Generates Vega-Lite chart specifications for data visualization
- Multi-Agent Supervisor: Orchestrates all agents to answer complex financial questions
- Chatbot App: Full-stack web application with chat UI, persistent history, and Vega-Lite rendering
- (Optional) External MCP Server: Adds real-time web search capabilities via You.com
┌─────────────────────────┐ ┌─────────────────────────┐ ┌─────────────────────────┐
│ Knowledge Assistant │ │ Genie Space │ │ Unity Catalog Function │
│ │ │ (NL to SQL Agent) │ │ (Vega-Lite Charts) │
│ - 10-K documents │ │ │ │ │
│ - 10-Q filings │ │ - Ticker data │ │ - Chart generation │
│ - Annual reports │ │ - Financial tables │ │ - Data visualization │
│ - Earnings materials │ │ - Market data │ │ - Interactive graphs │
└─────────────────────────┘ └─────────────────────────┘ └─────────────────────────┘
│ │ │
└─────────────┐ │ ┌─────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────┐
│ Multi-Agent Supervisor │
│ │
│ Orchestrates all agents to answer │
│ complex financial analysis questions │
└──────────────────┬──────────────────────────┘
│
(optional)│
▼
┌─────────────────────────────────────────────┐
│ You.com MCP Server (Web Search) │
│ │
│ Real-time web search for current news, │
│ market updates, and general knowledge │
└─────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Chatbot App (Databricks App) │
│ │
│ React + Express full-stack web app with │
│ streaming chat UI, Lakebase persistence, │
│ and Vega-Lite chart rendering │
└─────────────────────────────────────────────┘
- Access to a Databricks workspace with Unity Catalog enabled
- Serverless compute enabled (no cluster required - automatically selected when running cells)
- Permissions to create catalogs, schemas, volumes, tables, functions, and Agent Bricks
- Access to the Databricks UI for monitoring and testing Agent Bricks
- (Optional) A You.com API key for adding web search capabilities via MCP server
This workshop includes automated setup notebooks in the setup_instructor/ folder:
config.py: [CONFIGURE FIRST] Central configuration file for catalog, schema, volume names, and supervisor agent name- Table setup notebook: Creates ticker data tables in Unity Catalog
01_instructor_setup_ka.ipynb: Creates Knowledge Assistant with 5 knowledge sources02_instructor_setup_genie.ipynb: Creates Genie space for ticker data analysis03_create_vegalite_uc_function_simple.ipynb: Creates Unity Catalog visualization function04_instructor_setup_sa.ipynb: Creates Multi-Agent Supervisor coordinating all agents06_deploy_chatbot_app.ipynb: Deploys Chatbot App with Lakebase database and all permissions05_create_mcp_server_OPTIONAL.ipynb: (Optional) Adds You.com web search MCP server to the Supervisor
These notebooks handle the complex configuration automatically, allowing you to focus on testing and understanding the multi-agent workflows.
- Update
config.pywith your catalog, schema, and volume settings.
- For Vocareum labs you'll usually either want to use the default 'dbacademy' catalog, or the default catalog created for the user, e.g. "labuser13875106_1773320552". If you choose "dbacademy", the admin/instructor will need to grant 'manage' permissions to the user(s).
- Run table setup notebook to create ticker data tables
- Upload financial documents to Unity Catalog volumes
- Verify data setup
- Create Knowledge Assistant using setup notebook
- Configure multiple document knowledge sources
- Test document-based question answering
- Create Genie Space for ticker data analysis
- Configure natural language to SQL capabilities
- Add sample questions and instructions
- Create Vega-Lite chart generation function
- Test visualization capabilities
- Register function for agent use
- Create Multi-Agent Supervisor
- Configure agent orchestration with all tools
- Test complex multi-agent workflows
- Deploy full-stack chatbot app connected to the Supervisor Agent
- Provision Lakebase database for persistent chat history
- Test the web-based chat interface
- Set up You.com API key and Unity Catalog connection
- Attach MCP server to the Supervisor Agent
- Test web search capabilities in multi-agent workflows
All data, Genie Spaces, and agents will be created in the catalog, schema, and volume you specify here.
- For Vocareum labs you'll usually either want to use the default 'dbacademy' catalog, or the default catalog created for the user, e.g. "labuser13875106_1773320552". If you choose "dbacademy", the admin/instructor will need to grant 'manage' permissions to the user(s)
-
Open and edit
config.py:# YOUR CONFIGURATION - UPDATE THESE VALUES catalog = "main" # Your Unity Catalog name schema = "brandon_cowen" # Your schema name (use your username) table = "parsed_data" # Table for document metadata volume_name = "raw_documents" # Volume for document storage sa_name = "Supervisor_Agent_Mag7" # Supervisor Agent name
-
Update with your workspace details:
catalog: The Unity Catalog where all resources will be createdschema: Your personal schema (typically your username or team name)volume_name: Name for the UC Volume to store financial documentstable: Name for the metadata tablesa_name: Name for the Multi-Agent Supervisor
-
What gets created in these locations:
- Financial documents: Uploaded to
/Volumes/{catalog}/{schema}/{volume_name}/ - Ticker data table: Created as
{catalog}.{schema}.ticker_data - UC Function: Registered as
{catalog}.{schema}.generate_vega_lite_spec - Genie Space: Configured to query
{catalog}.{schema}.ticker_data - Knowledge Assistant: Uses documents from the volume path
- Multi-Agent Supervisor: References all agents created in your schema
- Financial documents: Uploaded to
-
Verify permissions:
- Ensure you have
CREATEpermissions on the catalog - Verify you can create schemas, volumes, tables, and functions
- Check that you have Agent Bricks creation permissions
- Ensure you have
Your repository contains the following financial document categories:
data/
├── 10k/ # Annual filings (10-K forms)
├── 10Q/ # Quarterly filings (10-Q forms)
├── annual_reports/ # Annual shareholder reports
├── earning_releases/ # Earnings press releases
└── earning_transcripts/ # Earnings call transcripts
This is your first execution step after configuring config.py.
-
Open the table setup notebook in the
resources/folder- Notebook handles data ingestion and table creation
- Uses serverless compute (no cluster required)
-
Run all cells in the notebook:
- Creates catalog and schema (if they don't exist)
- Creates Unity Catalog volume for documents
- Uploads all 153 financial documents to the volume
- Downloads ticker data for "Magnificent 7" companies (AAPL, MSFT, GOOGL, AMZN, META, NVDA, TSLA)
- Creates and populates
ticker_datatable - Includes price, volume, and financial metrics
-
Monitor progress:
- Watch for confirmation messages after each step
- Note any errors (usually permission-related)
- Verify table row counts in output
After running the table setup notebook, verify everything was created correctly:
-- Check that your catalog and schema were created
SHOW CATALOGS LIKE '{your_catalog}';
SHOW SCHEMAS IN {your_catalog} LIKE '{your_schema}';
-- Check the volume and uploaded files
LIST '/Volumes/{your_catalog}/{your_schema}/raw_documents/';
-- Check ticker data table
SELECT * FROM {your_catalog}.{your_schema}.ticker_data LIMIT 10;
-- Count rows and check date range
SELECT
COUNT(*) as total_rows,
COUNT(DISTINCT ticker) as num_companies,
MIN(date) as earliest_date,
MAX(date) as latest_date
FROM {your_catalog}.{your_schema}.ticker_data;Expected results:
- 7 distinct tickers (AAPL, MSFT, GOOGL, AMZN, META, NVDA, TSLA)
- Multiple days of historical data
- Complete price and volume information
-
Open and run the Knowledge Assistant setup notebook:
- File:
setup_instructor/01_instructor_setup_ka.ipynb - Open in Databricks workspace
- Uses serverless compute automatically
- File:
-
What the setup notebook does:
- Loads configuration from
config.py - Creates a Knowledge Assistant named
Financial_Analysis_Assistant - Configures 5 separate knowledge sources for better organization:
quarterly_reports_10q: 10-Q quarterly financial reportsannual_reports_10k: 10-K annual financial reportsearnings_releases: Quarterly earnings releases and announcementsannual_reports: Annual reports and business reviewsearnings_transcripts: Earnings call transcripts and Q&A sessions
- Adds example questions to guide users
- Loads configuration from
-
Knowledge Assistant Configuration:
- Name:
Financial_Analysis_Assistant - Description:
A Knowledge Assistant for analyzing financial documents and providing insights on company performance, earnings, and financial metrics. - Instructions: Specialized prompts for financial analysis with proper citation requirements
- Document Sources: 153 financial documents across 5 categories
- Name:
-
Wait for Knowledge Assistant creation (this may take several minutes):
- The setup notebook will create the Knowledge Assistant with all 5 knowledge sources
- Monitor the output for the Knowledge Assistant tile ID
- Example output:
Tile ID: 84104160-d8aa-490f-9251-047cf93f9e77 - Initial status will be
NOT_READYwhile documents are being indexed
-
Document indexing time:
- Indexing 153 documents typically takes 5-15 minutes
- Status will change from
NOT_READYtoONLINEwhen complete - You can continue with other phases while this completes
-
Verify in Databricks workspace:
- Navigate to Machine Learning > Knowledge Assistants
- Look for
Financial_Analysis_Assistant - Check that the status shows "ONLINE" before testing
-
Test with sample questions (once ONLINE):
- "What were the key revenue trends in the most recent quarterly report?" - "What are the main risk factors mentioned in the 10-K filing?" - "How did earnings per share change compared to the previous quarter?" - "What guidance did management provide for the upcoming quarter or year?"
-
Open and run the Genie Space setup notebook:
- File:
setup_instructor/02_instructor_setup_genie.ipynb - Open in Databricks workspace
- Uses serverless compute automatically
- File:
-
What the setup notebook does:
- Loads configuration from
config.py - Creates a Genie Space named
Financial_Data_Explorer - Automatically detects and uses an available SQL warehouse
- Configures the Genie space to use your ticker data table (
{catalog}.{schema}.ticker_data) - Adds 7 comprehensive sample questions for financial analysis
- Includes 5 instructional notes about the data structure
- Adds 4 SQL examples demonstrating query patterns
- Loads configuration from
-
Genie Space Configuration:
- Name:
Financial_Data_Explorer - Description:
A Genie space for exploring and analyzing financial ticker data through natural language queries - Data Source:
{your_catalog}.{your_schema}.ticker_data - Sample Questions: Price trends, volume analysis, company comparisons, performance metrics
- Name:
-
Wait for creation (usually quick, under 1 minute):
- Monitor the notebook output for the Genie Space ID
- Example output:
Genie ID: 01f118c553c91bd883197c81add4286c
-
Verify in Databricks workspace:
- Navigate to Data Intelligence > Genie
- Look for
Financial_Data_Explorer - Check that it shows your ticker data table as a source
-
Test with sample queries:
- "What are the latest stock prices for all companies?" - "Show me the daily trading volume for Apple over the last week" - "Compare the closing prices of NVIDIA and Meta" - "Which company had the highest trading volume yesterday?" - "What is the average closing price for each company?" - "Show me Tesla's price range over the last month" - "Which stocks had the biggest price increase this week?"
-
Open and run the Unity Catalog Function setup notebook:
- File:
setup_instructor/03_create_vegalite_uc_function_simple.ipynb - Open in Databricks workspace
- Uses serverless compute automatically
- File:
-
What the setup notebook does:
- Loads configuration from
config.py - Creates a Unity Catalog function named
generate_vega_lite_spec - Registers it in your catalog and schema:
{catalog}.{schema}.generate_vega_lite_spec - Supports multiple chart types: bar, line, scatter, area, pie
- Returns valid Vega-Lite v5 specifications as JSON strings
- Includes robust error handling and data validation
- Provides tooltip and interactive features
- Loads configuration from
-
Function Configuration:
- Full Name:
{your_catalog}.{your_schema}.generate_vega_lite_spec - Parameters:
chart_description(string): Natural language description of the chartdata_sample(string): JSON data for visualization
- Returns: JSON string containing Vega-Lite specification
- Full Name:
-
Monitor function creation:
- The notebook will create and test the function automatically
- Watch for successful registration message
- Note the full function name for use in the Supervisor
-
Verify in Databricks workspace:
- Navigate to Catalog > Your Catalog > Your Schema
- Look for
generate_vega_lite_specfunction - Check the function signature and description
-
Test with sample data (notebook includes these tests):
-- Bar chart SELECT {catalog}.{schema}.generate_vega_lite_spec( 'bar chart of sales', '[{"category": "Jan", "value": 100}, {"category": "Feb", "value": 150}]' ); -- Line chart SELECT {catalog}.{schema}.generate_vega_lite_spec( 'line chart showing revenue trend', '[{"month": "Jan", "revenue": 10000}, {"month": "Feb", "revenue": 15000}]' ); -- Scatter plot SELECT {catalog}.{schema}.generate_vega_lite_spec( 'scatter plot', '[{"x": 1, "y": 2}, {"x": 2, "y": 4}, {"x": 3, "y": 6}]' );
Prerequisites: Ensure the Knowledge Assistant status is ONLINE before proceeding. The Supervisor creation will fail if the KA is still NOT_READY.
-
Open and run the Multi-Agent Supervisor setup notebook:
- File:
setup_instructor/04_instructor_setup_sa.ipynb - Open in Databricks workspace
- Uses serverless compute automatically
- File:
-
What the setup notebook does:
- Loads configuration from
config.py - Creates a Multi-Agent Supervisor named
Supervisor_Agent_Mag7(or whateversa_nameis set to inconfig.py) - Automatically discovers and configures agents for:
- Knowledge Assistant: Financial document analysis (found by name:
Financial_Analysis_Assistant) - Genie Space: SQL queries against ticker data (found by name:
Financial_Data_Explorer) - Unity Catalog Function: Chart generation (found by path:
{catalog}.{schema}.generate_vega_lite_spec)
- Knowledge Assistant: Financial document analysis (found by name:
- Includes comprehensive instructions for multi-agent coordination
- Adds sample conversation starters demonstrating multi-tool workflows
- Loads configuration from
-
Supervisor Configuration:
- Name:
Supervisor_Agent_Mag7(configurable viasa_nameinconfig.py) - Description:
A multi-agent supervisor that coordinates financial analysis using Knowledge Assistant for document analysis, Genie for SQL queries, and Unity Catalog functions for data visualization - Agents: 3 specialized agents working together
- Instructions: Specialized coordination prompts for financial workflow orchestration
- Name:
-
Check prerequisites during execution:
- Notebook verifies Knowledge Assistant is ONLINE
- Discovers Genie Space by name
- Verifies UC Function exists
- Reports any missing components
-
Monitor script output:
- Look for the Multi-Agent Supervisor ID
- Example output:
Multi-Agent Supervisor ID: 93b6cc9b-5689-4586-a0eb-43742e53df61 - Initial status will be
NOT_READYwhile provisioning - Status changes to
ONLINEwhen ready (usually 1-2 minutes)
-
Verify in Databricks workspace:
- Navigate to Machine Learning > Agents
- Look for
Supervisor_Agent_Mag7 - Check that all 3 agents are configured correctly
- Wait for status to show "ONLINE"
-
Wait for supervisor to be ONLINE:
- Check the status in Machine Learning > Agents
- The supervisor status should change from NOT_READY to ONLINE
-
Test individual agent capabilities:
# Knowledge Assistant tests: - "What were Apple's key revenue highlights in their latest quarterly report?" - "What are the main risk factors mentioned in Meta's 10-K filing?" - "Summarize NVIDIA's guidance from their latest earnings call" # Genie Space tests (via Supervisor): - "What are the latest stock prices for all companies?" - "Which company had the highest trading volume yesterday?" - "Compare the closing prices of NVIDIA and Meta" # Unity Catalog Function tests: - "Create a bar chart showing sample sales data" - "Generate a line chart visualization" -
Test multi-agent coordination:
- "What risks did Tesla mention in their latest filing and create a chart showing their stock performance over the last month?" - "Compare NVIDIA's recent earnings performance with their guidance and create a visualization of their price trends" - "Show me the price trends for Apple over time and explain what their documents say about growth strategy" - "Analyze Meta's latest quarterly report and compare it with their actual stock performance data" -
Example workflows the Supervisor can handle:
- Document analysis + data visualization
- Cross-reference document insights with quantitative data
- Comprehensive analysis combining multiple information sources
- Generate charts based on both structured data and document mentions
-
Open and run the chatbot app deployment notebook:
- File:
setup_instructor/06_deploy_chatbot_app.ipynb - Open in Databricks workspace
- Uses serverless compute automatically
- File:
-
What the deployment notebook does:
- Automatically discovers the MAS serving endpoint name from your Supervisor Agent
- Identifies all sub-agent endpoints (e.g., Knowledge Assistant) for permission grants
- Creates a Lakebase database instance for persistent chat history
- Creates the Databricks App with all resource bindings (serving endpoints + database)
- Deploys the source code from the workspace to the app
-
App Configuration (set in
config.py):app_name = "agent-bricks-chatbot" # App name prefix lakebase_instance_name = "agent-bricks-lakebase" # Lakebase instance name prefix app_resource_suffix = "workshop" # Suffix for all resource names
-
What gets deployed:
- Databricks App:
{app_name}-{suffix}(e.g.,agent-bricks-chatbot-workshop) - Lakebase Instance:
{lakebase_instance_name}-{suffix}(e.g.,agent-bricks-lakebase-workshop) - Permissions:
CAN_QUERYon the MAS endpoint and all sub-agent endpoints,CAN_CONNECT_AND_CREATEon Lakebase
- Databricks App:
The chatbot app is a full-stack web application:
chatbot-app/
├── client/ # React + Vite frontend
│ └── src/
│ ├── components/ # Chat UI, Vega-Lite renderer, sidebar
│ ├── hooks/ # Streaming, chat history, config
│ └── pages/ # Chat and new chat pages
├── server/ # Express.js backend
│ └── src/
│ ├── routes/ # Chat, history, session, config APIs
│ └── middleware/ # Authentication
├── packages/ # Shared libraries
│ ├── ai-sdk-providers/ # Databricks AI SDK integration
│ ├── auth/ # Databricks authentication
│ ├── core/ # Domain types, schemas
│ ├── db/ # Drizzle ORM + Lakebase
│ └── utils/ # Shared utilities
├── app.yaml # Databricks app runtime config
└── databricks.yml # Asset bundle config (parameterized)
Key features:
- Streaming chat responses from the Multi-Agent Supervisor
- Vega-Lite chart rendering for visualization responses
- Persistent chat history via Lakebase (PostgreSQL)
- Conversation management with sidebar navigation
- Databricks-native authentication (OAuth)
-
Check app status:
- Navigate to Compute > Apps in your Databricks workspace
- Look for your app (e.g.,
agent-bricks-chatbot-workshop) - Wait for status to show Running (may take 2-5 minutes for first deployment)
-
Access the app:
- Click the app URL displayed in the notebook output or workspace UI
- The URL follows the pattern:
https://{app-name}-{workspace-id}.{region}.databricksapps.com
-
Test the chat interface:
- "What were Apple's key revenue highlights in their latest quarterly report?" - "Show me a chart of Tesla's stock price trends" - "Compare NVIDIA's earnings with their stock performance and visualize it" -
Verify persistent history:
- Send a few messages, then refresh the page
- Previous conversations should appear in the sidebar
- Chat history is stored in Lakebase and persists across sessions
- App status "Unavailable": The app may still be starting. Wait 2-5 minutes and refresh.
- "No source code" in app page: Re-run the deployment cell (Step 5) in the notebook.
- 401 errors during deployment: Token may have expired. Re-run from cell 1 to refresh the notebook context.
- Lakebase not ready: Lakebase provisioning can take a few minutes. The app will work without it initially (using in-memory storage) and switch to persistent storage once Lakebase is online.
- Chat not responding: Verify the MAS endpoint is ONLINE in Machine Learning > Agents.
This optional phase adds real-time web search capabilities to your Multi-Agent Supervisor using the You.com MCP server. Once configured, the Supervisor can search the internet for current news, market updates, and general knowledge to complement its existing document and data analysis capabilities.
-
Sign up for a You.com account:
- Visit documentation.you.com/quickstart
- Follow the quickstart guide to create an account
- Generate an API key from your dashboard
-
Keep your API key handy — you'll need it to create the Unity Catalog connection in the next step.
Create an HTTP connection in Unity Catalog named you-mcp that points to the You.com MCP endpoint:
- Navigate to Catalog > External Data > Connections in your Databricks workspace
- Click "Create connection" and configure:
- Connection name:
you-mcp - Connection type: HTTP
- Host:
https://api.you.com:443/mcp - Authentication: Bearer token
- Token: Your You.com API key from Step 6.1
- Connection name:
- Grant permissions: Ensure your user (and any workshop participants) has
USE CONNECTIONpermission on theyou-mcpconnection
Note: If a
you-mcpconnection already exists in your workspace, you can skip this step. The setup notebook will use the existing connection.
-
Open and run the MCP server setup notebook:
- File:
setup_instructor/05_create_mcp_server_OPTIONAL.ipynb - Open in Databricks workspace
- Uses serverless compute automatically
- File:
-
What the setup notebook does:
- Loads
sa_namefromconfig.pyto identify your Supervisor Agent - Dynamically looks up the Supervisor Agent tile ID by name
- Checks if the
you-mcpMCP server is already attached - If not present, adds a new
You_Web_Searchagent (type:external-mcp-server) referencing theyou-mcpconnection - Verifies the update was applied successfully
- The notebook is idempotent — re-running it safely detects the MCP server is already present
- Loads
-
Updated Supervisor Configuration: After running this notebook, your Supervisor will have 4 agents:
- Financial_Documents_Assistant (serving-endpoint): Knowledge Assistant
- Ticker_Data_Explorer (genie-space): Genie Space for SQL queries
- Chart_Generator (unity-catalog-function): Vega-Lite visualization
- You_Web_Search (external-mcp-server): You.com web search
-
Wait for the Supervisor to finish updating (usually under 1 minute)
-
Test web search queries through the Supervisor:
- "What are the latest news headlines about NVIDIA?" - "Search for recent analyst opinions on Tesla stock" - "What happened in the stock market today?" - "Find recent news about Apple's AI strategy" -
Test combined workflows (web search + existing agents):
- "Search for the latest news about Meta and compare it with what their 10-K filing says about risks" - "What are analysts saying about NVIDIA right now? Also show me their recent stock price trend in a chart." - "Find current market sentiment for Tesla and compare it with their actual trading volume data"
After completing all phases, you should have:
-
Data Infrastructure:
- Unity Catalog:
{your_catalog}.{your_schema} - Volume:
/Volumes/{your_catalog}/{your_schema}/raw_documents/(153 documents) - Table:
{your_catalog}.{your_schema}.ticker_data(7 companies, historical data)
- Unity Catalog:
-
Agent Bricks:
- Knowledge Assistant:
Financial_Analysis_Assistant(ONLINE) - Genie Space:
Financial_Data_Explorer(configured) - UC Function:
{catalog}.{schema}.generate_vega_lite_spec(registered) - Multi-Agent Supervisor:
Supervisor_Agent_Mag7(ONLINE) - Chatbot App:
agent-bricks-chatbot-workshop(RUNNING) with Lakebase persistence - (Optional) MCP Server:
You_Web_Searchviayou-mcpconnection (web search)
- Knowledge Assistant:
Try these end-to-end test questions with your Multi-Agent Supervisor:
-
Document Analysis:
- "What were the key revenue trends in Apple's most recent quarterly report?" - "What are the main risk factors mentioned in Tesla's 10-K filing?" - "Summarize NVIDIA's guidance from their latest earnings call" - "Compare the growth strategies mentioned in Meta and Google's annual reports" -
Data Analysis (via Genie through Supervisor):
- "Which company had the highest trading volume yesterday?" - "Compare the closing prices of NVIDIA and Meta over the last week" - "What is the average closing price for each company this month?" - "Show me the top 3 companies by recent trading volume" -
Visualization (via UC Function):
- "Create a bar chart comparing market caps" - "Generate a line chart showing revenue trends" - "Show me a scatter plot of price vs volume" -
Multi-Agent Coordination (the real power):
- "What risks did Tesla mention in their latest filing? Also show me their stock price trends over the last month in a chart." - "Analyze Apple's earnings performance mentioned in their documents and compare it with their actual stock price movements. Create a visualization." - "Compare NVIDIA's guidance from earnings calls with their actual stock performance and create a visual representation." - "What growth strategies does Meta mention in their reports? Show me how this correlates with their stock performance using a chart." -
Web Search + Multi-Agent (if Phase 6 completed):
- "Search for the latest analyst ratings on NVIDIA and compare with what their earnings documents say about growth" - "What's in the news about Apple today? Cross-reference with their recent stock price data and create a chart." - "Find current market sentiment for the Magnificent 7 stocks and show me their comparative trading volumes" - "Search for recent AI industry news and relate it to NVIDIA's latest quarterly performance from their filings"
Your multi-agent system should be able to:
- ✅ Answer document-based questions using the Knowledge Assistant
- ✅ Perform quantitative analysis using the Genie Space
- ✅ Create interactive Vega-Lite visualizations using the UC Function
- ✅ Coordinate between agents for complex, multi-faceted questions
- ✅ Provide synthesized insights combining documents and data
- ✅ Generate charts alongside textual analysis
- ✅ Cite sources and explain reasoning for all conclusions
- ✅ Provide a web-based chat interface via the deployed Chatbot App
- ✅ Persist conversation history across sessions via Lakebase
- ✅ Render Vega-Lite charts directly in the chat UI
- ✅ (Optional) Search the web for real-time information via the You.com MCP server
- ✅ (Optional) Combine web search results with document analysis and data queries
-
Configuration errors:
- Symptom:
NameError: name 'catalog' is not defined - Solution: Ensure you updated
config.pyand the notebook loaded it correctly - Check: Run cells in order - configuration cells must run before setup cells
- Symptom:
-
Knowledge Assistant not ready:
- Symptom: KA status shows
NOT_READY, Supervisor creation fails - Solution: Wait 5-15 minutes for document indexing to complete
- Check: Navigate to Machine Learning > Knowledge Assistants and verify status
- Note: You can proceed with Phases 3-4 while waiting
- Symptom: KA status shows
-
Genie Space queries failing:
- Symptom: "Table not found" or permission errors
- Solution: Verify
ticker_datatable exists in your catalog/schema - Check: Run
SELECT * FROM {catalog}.{schema}.ticker_data LIMIT 10;
-
Multi-Agent Supervisor discovery issues:
- Symptom: "KA endpoint not found" or "Genie space not found"
- Solution: Verify asset names match exactly (case-sensitive)
- Check: Asset names in notebooks must match what's created
- Note: Supervisor discovers agents by name, not ID
-
Permission errors:
- Symptom: "Access denied" when creating resources
- Solution: Verify Unity Catalog permissions
- Check: Ensure CREATE permissions on catalog/schema for tables, volumes, functions
-
Serverless compute issues:
- Symptom:
%runcommands fail with "File not found" - Solution: Use
dbutils.notebook.run()instead for cross-notebook execution - Note: Serverless compute uses IPython magic, not Databricks
%run
- Symptom:
-
MCP server connection issues (Phase 6):
- Symptom: "Connection not found" or authentication errors when running
05_create_mcp_server_OPTIONAL - Solution: Verify the
you-mcpUnity Catalog connection exists and is configured with a valid You.com API key - Check: Navigate to Catalog > External Data > Connections and look for
you-mcp - API key: Obtain one at documentation.you.com/quickstart
- Symptom: "Connection not found" or authentication errors when running
-
Supervisor Agent not found (Phase 6):
- Symptom:
AssertionError: Supervisor Agent 'Supervisor_Agent_Mag7' not found - Solution: Run Phase 5 first to create the Supervisor, or verify
sa_nameinconfig.pymatches the existing Supervisor name
- Symptom:
- Check Databricks documentation for Agent Bricks
- Review Unity Catalog permissions and setup
- Test individual components before integration
- Monitor agent status and error messages in the UI
- Verify
config.pysettings match your workspace
After completing this lab, consider these enhancements:
-
Add more data sources:
- Earnings estimates and analyst reports
- Real-time news feeds
- Economic indicators and market data
- Additional financial metrics tables
-
Extend with more agents:
- Sector-specific analysis agents
- Risk assessment specialists
- ESG (Environmental, Social, Governance) analysis
- Compliance and regulatory review agents
-
Build automated workflows:
- Scheduled financial monitoring reports
- Alert systems for significant market changes
- Regular portfolio analysis updates
- Automated report generation
-
Enhance data pipelines:
- Real-time ticker data ingestion
- Automated document collection and upload
- Data quality validation and monitoring
- Historical data expansion
-
Add more external MCP servers:
- If you completed Phase 6, you already have web search via You.com
- Explore additional MCP servers from the Databricks Marketplace for more external tool integrations
- Consider building custom MCP servers hosted as Databricks Apps for organization-specific APIs
Your completed workshop includes these working components:
agent-bricks-workshop/
├── config.py # ⚠️ CONFIGURE FIRST - catalog/schema/volume/sa_name settings
├── LAB_INSTRUCTIONS.md # This file - full lab guide
├── setup_instructor/
│ ├── 01_instructor_setup_ka.ipynb # ✅ Knowledge Assistant creation
│ ├── 02_instructor_setup_genie.ipynb # ✅ Genie space for ticker data
│ ├── 03_create_vegalite_uc_function_simple.ipynb # ✅ Unity Catalog function
│ ├── 04_instructor_setup_sa.ipynb # ✅ Multi-Agent Supervisor
│ ├── 06_deploy_chatbot_app.ipynb # ✅ Chatbot App + Lakebase deployment
│ ├── 05_create_mcp_server_OPTIONAL.ipynb # 🔧 (Optional) You.com MCP server
│ └── README.md # Setup documentation
├── chatbot-app/ # Full-stack chatbot application
│ ├── client/ # React + Vite frontend
│ ├── server/ # Express.js backend
│ ├── packages/ # Shared libraries (AI SDK, auth, DB, etc.)
│ ├── app.yaml # Databricks app runtime config
│ └── databricks.yml # Asset bundle config (parameterized)
├── resources/
│ ├── [table_setup_notebook] # Infrastructure and data setup
│ ├── data_setup_functions.py # Helper functions for data setup
│ ├── download_ticker_data.py # Ticker data download utilities
│ ├── brick_setup_functions.py # Agent Bricks helper functions
│ └── generate_vega_lite_spec.py # Visualization function code
└── data/
├── 10k/, 10Q/, annual_reports/ # 153 financial documents
├── earning_releases/, earning_transcripts/
Execution Order:
- First: Update
config.pywith your catalog/schema/volume/sa_name/app settings - Second: Run table setup notebook in
resources/ - Then: Run setup notebooks 01-04 in
setup_instructor/(in order) - Deploy App: Run
06_deploy_chatbot_appto deploy the chatbot with Lakebase - (Optional): Run
05_create_mcp_server_OPTIONALafter completing step 3 and setting up ayou-mcpUC connection
Congratulations! You've built a comprehensive financial analysis multi-agent system that can analyze documents, query data, generate visualizations, search the web, and coordinate complex analytical workflows.