Link data to an Agent
Last updated
Was this helpful?
Last updated
Was this helpful?
In the Agent Builder, connecting relevant data sources is one of the most crucial steps to empower your agent to perform meaningful analysis. Here's how to do it:
From the Agents list, select the agent you want to work on. This opens the Agent Detail Page.
Once you're inside the Agent Detail Page, navigate to the Data tab. Here, you’ll see an overview of the connected datasets.
Click on "Add data source" to choose from your available datasets. You can select any number of tables or files relevant to the agent’s purpose.
Each dataset will be listed with:
👁️ an icon to preview the data
☑️ a checkbox to toggle its visibility to the agent
While it might be tempting to connect your entire database, it's better to keep things focused. Connecting too many tables:
Can confuse the agent
Slows down reasoning
Makes debugging harder
Instead, only connect the tables relevant to the agent’s task.
❌ Don’t do this: You connect 80+ tables from your main production DB “just in case” — your Retail Agent gets overwhelmed with HR, logistics, and dev ops tables it doesn’t need.
✅ Do this instead: You’re building a Retail Analyst Agent to support sales and inventory questions. You only connect:
lh_customers
lh_order_items
lh_product_categories
lh_inventory
lh_employees
(for store-level reporting)
This keeps your agent sharp and focused.
✅ Another good example: You’re building a Marketing Campaign Agent. You only connect:
email_campaigns
ad_spend_by_channel
customer_segments
website_traffic_logs
Leave out everything else like finance, warehouses, or IT logs.
The agent inspects table columns to find:
Primary keys (PKs)
Foreign keys (FKs)
It builds a relational map automatically using this metadata, so you don’t need to manually define relationships.
The agent uses table and column metadata to understand business context. The more descriptive your metadata, the smarter your agent becomes.
Check out the Metadata docs to learn how to define it well.