Skip to main content

Turn Genie Into an Agent Using Conversation APIs

Summary

  • Text-to-SQL agents: Genie Conversation APIs transform Genie into intelligent SQL agents translating natural language to queries.
  • Multi-agent frameworks: Integrate Genie with other agents to build systems answering structured and unstructured data questions.
  • Enterprise permissions: Genie agents enforce data permissions automatically, preventing privilege escalation in production.

Turn Genie Into an Agent Using Conversation APIs

Watch: Turn Genie Into an Agent Using Conversation APIs
Talk by Hanlin Sun, Product Manager, Databricks ; Prithvi Kannan, SWE, Databricks
Transform your AI/BI Genie into a text-to-SQL powerhouse using the Genie Conversation APIs. this video explores how Genie functions as an intelligent agent, translating natural language queries into SQL to accelerate insights and enhance self-service analytics. You'll learn practical techniques for configuring agents, optimizing queries and handling errors — ensuring Genie delivers accurate, relevant responses in real time. A must-attend for teams looking to level up their AI/BI capabilities and deliver smarter analytics experiences.
Intelligent analytics for everyone: https://www.databricks.com/product/business-intelligence
BI meets AI: https://www.databricks.com/resources/ebook/business-intelligence-meets-ai
Explore the only unified platform for agent systems: https://www.databricks.com/product/artificial-intelligence
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements

Chapters

FAQs

What are Genie Conversation APIs?

These APIs allow developers to build conversational SQL agents using Genie. Instead of users typing in Genie Spaces, applications can programmatically send questions and receive SQL queries and results.

How do multi-agent systems work?

Multi-agent frameworks combine specialized agents for different data types. Genie handles structured SQL queries while other agents process unstructured data like documents. This unified approach answers complex questions across diverse data.

How can business users ask data questions without SQL?

This video demonstrates how to turn Genie into an AI agent using Conversation APIs on the Databricks Data and AI platform. Business users can ask natural language questions about data without writing SQL, and the agent processes queries and takes actions. Genie's conversational interface abstracts SQL complexity, enabling non-technical stakeholders to explore data interactively.

What are the top AI agents for business users?

This video shows how Genie, powered by Conversation APIs on the Databricks Data and AI platform, acts as an intelligent data assistant for business users. The agent can understand context, remember conversation history, and provide relevant insights. By combining Genie with Agent Framework capabilities, you create intelligent assistants that go beyond answering questions to proactively identifying insights and recommending actions.

What are the best text-to-SQL tools?

This video demonstrates that Genie's Conversation APIs on the Databricks Data and AI platform provide sophisticated text-to-SQL capabilities. The agent converts natural language queries into accurate SQL while handling complex semantics, ambiguity, and context. By extending Genie with custom logic and tool integration, you create agentic systems that reliably translate business questions into data insights.

Full transcript

0:00 Enterprise agents landscape

Right, welcome everyone. I'm a product manager for Genie. I'm joined by from our agents team and we're super excited to be here today to talk about turning Genie into agents for your business. Quick road map. We'll start with some landscape about enterprise agents today. Next, talk about how Genie fits in as your enterprise SQL agent, how it integrates with agent frameworks, and how to build it all with MLFlow. Then, Priy will take us through a live demo, and we'll do some road map and Q&A.
So, what are customers trying to build? We've heard a couple key requirements. First is that customers want their business users to just have one place to ask all data questions, no matter if it's structured or unstructured. So instead of having one place to go to for tables and another for PDFs, can I just send them to one unified agent? Similarly, our Genie customers don't want their business users having to look for the Genie space first just to ask their data questions.
And finally, a key requirement for all of this is that any agent has to follow the underlying data permissions and not allow for privilege escalations. And so as customers were building these unified agent frameworks that can answer questions across different data types, a lot of them tried to build their own homegrown SQL agents. And this was another key theme. It's very hard building these. Manually setting up your schema is very hard.

1:08 Mosaic AI framework

It's def it's hard defining table structures and table relationships and also doesn't stay in sync as your schemas update. Next, there's a whole host of quality challenges. It's hard finding labeled gold standard SQL. Resolving inconsistent and overconfidence behavior takes a lot of time and general prompt strategy takes a lot. And finally, just generating query results is also complex. Applying user permissions when you execute SQL, handling errors, providing answer explanations, visualizations, all require a significant amount of effort.
So from these key use cases and pain points, we'd like to introduce the Mosaic AI agent framework. This is a suite of tools that is designed to help developers build and deploy highquality multi- aent apps so your business users can just have one place to ask any data question. There are three key pillars for this. First is using Genie as your SQL agent. Genie is an in-house structured data agent that is uniquely fit to answer your business user questions by leveraging context from your data intelligence platform.
It also handles SQL execution and answer explanations out of the box. Second is is giving you all the tools you need to build an effective agent framework. We have rappers for Genie and other native apps on data bricks. You can then test for quality with Mosaic agent evaluation. And we're also super excited to be announcing a low code development tool called agent bricks. And finally, we want to give you an abil the way to share your agents securely with your users.
Our agents have endto-end permissions all the way down to the row and column level of our tables which you can then safely deploy to Mosaic AI serving. Finally, any debugging and monitoring you would want to do can be done with the tracing library. So, let's talk about each of these pillars in into a bit more detail. And first, why should Genie be your SQL agent? As we talked about, there's a couple key challenges with using a custom SQL agent.

3:01 Genie SQL agent features

Defining manual schemas is hard to keep up to date. It's challenging iterating on answer quality, and generating results is complex. Genie handles each of these pain points by design. First, it's automatically synced with Unity Catalog. Instead of having to manually change your schemas as they update, Genie automatically pulls and updates your table column names, descriptions, and table relationships whenever they change.
Second, Genie is able to generate contextaware results. It's able to do this by uniquely learning from your data intelligence platform. So if you have query objects that already have a lot of workloads on it and dashboard that you've already built, Genie is able to search through this, learn from its context and answer net new data questions. Additionally, we have a whole data bricks research team developing new text to SQL techniques that are always kept up to date with Genie.
And finally, the query results are handled for you. We execute SQL with UC permissions applied, give you answer explanations, and also generate visualizations. So now that we understand genie's benefits from a high level, how exactly does one go about building a genie space? First, you want to define a focused data topic and bring in a tight well doumented set of data. This table metadata is the most effective way of teaching Genie on how to reason about your data.
Second, you want to teach Genie business semantics by adding example SQL instructions. And finally, you can then add any formatting guidances through text and general instructions. One note for all the developers in the room is that Genie curation is currently in the UI only as we're introducing some new instruction primitive types to build a genie space. Once those are finalized, the create update APIs will follow. Let's talk about each of these steps in a little bit more detail.

4:46 Curating Genie spaces

So, first to reiterate, you want to really bring in a tight data set that doesn't have conflicting information. This is really key to Genie's ability to reason and generate accurate SQL. Second, make sure that you have high quality table and column descriptions and table relationships defined. This is how Genie is able to map your user prompts to the actual data. We also started to autocalculate some of this metadata for you to make it really easy to start setting up your spaces.
We automatically calculate column statistics and example values that add general understanding to the LLMs. We also started to make it easier for authors by editing a local version of your metadata. So instead of always having to go to Unity catalog and change your gold standard definitions, each Genie space has a local copy of your column descriptions which you can edit directly. Additionally, you can also hide unnecessary or conflicting columns directly in a genie space to slim down your data sets.
After Genie understands your data, it also needs to understand your business semantics. You can do this by giving Genie example SQL statements. After you add an example SQL statement, you can associate it with a natural language question that a business user would ask. Then Genie dynamically applies this as context to only relevant user prompts. So if I add an example SQL statement that calculates for sales, only user prompts for sales will leverage that context.
This allows me to add a lot more different definitions of my key KPIs and Genie will be able to handle all of them. And finally, the data intelligence platform makes this easier as well. Instead of authors always having to manually define gold standard SQL, Genie will actually search through your existing query objects and suggest the popular ones for authors to review. Authors can then look through and see which ones apply to their Genie space and save that as context.
So after Genie understands your data and your business semantics, you can also give it some general guidance through text instructions. It's important to note to first prioritize adding table metadata and then example SQL before using text instructions as a last resort. There are some helpful pieces of information you can include here, such as teaching Genie when to ask clarification questions and also general formatting such as round my decimals to two digits.
To make these instructions really effective, you first want to keep them concise and direct. The text should be phrased as an explicit direction such as when the user asks for this, make sure to include that or always include this this formatting. It also helps to organize it as a list using dashes or asterisks so it's easier to collaborate on and also for genies to understand. There's also some common pitfalls to avoid.
First, don't overload or add conflicting instructions. This was most likely to confuse the genie's LLMs just as you would confuse a new starting data analyst with a long set of conflicting instructions. Additionally, don't add text instructions that better belong in other places such as don't adding uh don't enumerate column values because this will take up unnecessary context space. The example values are automatically calculated for you.
Additionally, don't add SQL logic in text instructions because you have example SQL statement that's applied dynamically. So, you've seen how an author can build an effective genie space, but we also want to make it really easy for authors to build this using the data intelligence platform. One of the upcoming features is suggested instructions that autopop populate as you simply converse with Genie. So in the UI, I can ask a question, give it a thumbs up, and then Genie will actually start extracting new information from this response.

7:46 Building agent frameworks

The author can then review the instruction snippets that it generated and save the good ones to Genie. So you've now seen how to build an effective SQL agent with Genie, but how do you embed it into a unified agent framework that's able to answer questions across different data types? This is where the Mosaic agent framework helps. by providing a set of tools to seamlessly integrate your GD spaces. So typically people building agents leverage popular frameworks like lane chain and llama index to make it super simple for you to embed a genie space into these frameworks.
We have a native wrapper. This way when I have a genie space that I'm happy about it's curated well I can just take its ID and drop it into the wrapper. Then the wrapper will integrate with the conversation APIs and generate a sub aent for you. Then when you have a sub agent, you can embed it into a framework like the example you see on the right. This agent framework is now able to do a couple things. First is directly ask Genie questions when it's relevant.
Additionally, it can also use Genie responses as context. So maybe I want to ask a question to the first genie space and then use that answer to then direct it to another genie space for a final answer that's more accurate. You can then enhance this sub aents quality by adding some few shot examples that really teach the supervisor when to use each GE space. Some other best practices. First, again, make sure you're building topic specific Genie spaces.
If you add all of the tables inside of your catalog into one space, there's going to be a lot of conflicting information for Genie to reason through and it won't generate as accurate SQL. Second is to make sure you're including those few shot examples as it really teaches the supervisor when to use each sub agent. Third, prevent looping to the same sub aent with some of these best practices. Each agent description should describe its outputs and the supervisor agent prompt should handle each response case.
You can also set a max recursion depth. And next, presscript your SQL to the common business user questions people have. This improves latency by avoiding a round trip to Genie's LLM and also boosts accuracy for the most common SQL answers. You can still also use this back and forth as context for future conversations. And finally, start small. It's a lot easier to start with a few sub aents and iterate on quality over time than trying to manage 50 all at once.
So, you've seen how developers can build custom agent solutions with the agent framework. But we also want to make this process easier for customers. This is why we introduced agent bricks, a tool that handles the complexity for you. Simply specify your data and the tasks you have and the agent bricks will go about creating an agent framework. Then as your users give more feedback over time, the system will improve. For more details on this new feature, please check out breakout session where she goes into more details about how everything works.

10:16 Agent Bricks and deployment

Great. So now you have an agent framework that you've built with all the relevant context and you want to get it into your user's hands securely. The agent framework also supports last mile productionization. First, you can prototype your agent inside of the AI playground. Then you can deploy it to model serving. And after you've deployed it, you can debug with endtoend observability by leveraging the MLflow tracing library.
And finally, evaluation is important. We have the mosaic agent evaluation that has end testing on your overall framework and also additional tools to test each test each genie space. There's a benchmarks feature which allows you to actually test the accuracy of the SQL responses. So now we've walked through how you can build a unified agent framework that answers questions across different data types. But it's important to note that you can also use each Genie space as a standalone agent.

11:23 Genie conversation APIs

You can do this by leveraging the conversation APIs. The conversation APIs allow you to embed a Genie space into any UI, a custom one, into Slack, into Teams, and anywhere else. We've been super excited to see the different customer use cases. For example, the Automobile Association, UK's leading provider of roadside assistance, was able to embed their Genie Space directly into their Microsoft Teams. This enabled business users to ask any ad hoc data question they had and get real-time data insights instead of having to wait hours or days for a response.
Additionally, this also saved data teams time and allowed them to focus on strategic efforts instead of always having to field ad hoc questions like how are my sales doing or did we hit our targets this week and things like that. There are some best practices for using the conversation APIs on their own as well. For the best performance, make sure you're implementing request queuing, pulling for status every 5 to 10 seconds, and using exponential backoff.
For the best accuracy, make sure you're starting a new conversation thread for each user session, as this keeps the context window clean. Awesome. So, hopefully now you'll have a better overview on how to build multi-agent frameworks that leverage Genie and also how to use Genie as a standalone agent. I'll now pass it over to take us through a live demo. Thanks a lot. Uh so now switching over to our demo uh let's talk a little bit about these genie spaces.

12:34 Live demo: Multi-agent system

So first I want to show you this opportunity space uh that Hanley just uh talked about earlier. So this opportunity space has Salesforce data uh for a bunch of different sales. And if we take a look at the configuration there's a table called big rock opportunity opportunity history and the period. And we can try an example query here. How many opportunities were closed each month in the last two years. So this Genie query is going to run.
It's going to come up with the SQL statement and then it's going to execute the statement and hopefully it'll tell us exactly how many opportunities were closed each month. Uh so we'll let this query run and there we go. We have our results. Uh so we can see that for each year 2023 each each month from the year uh how many opportunities were closed and you can also see a plot of this uh data. So this is really useful.
This is kind of like the traditional way that people use their genie space. Uh, next I want to show you another genie space that we've created called the customer profile genie space. And this has data about specific customers, their industry, name, ID, revenue, etc. Uh, so let's find out kind of who our customers are and where they're located. I'll ask how many users are there in each region. This is going to run a query over my users table, probably filter by the region, and it'll tell me exactly how many.
So for my AER region, my AP pack region, my AMA region, my LATAM region, I have about 22 customers or 22 users in each region. Note that like these acronyms are business specific to, you know, what we know in in our organization, right? It may mean something else to one group versus another group. Uh so these are all kind of like tailored to what your data intelligence uh means to you. Uh and just take a look at the query that was run here.
It looks like we're running against the user table and we're grouping by the region. So we can see that this actually is exactly the query that we want. Uh and this is the way we recommend people to curate their genie spaces basically by a certain domain. Uh whether it's the opportunity space and now the customer profile space. So the next thing I want to show you is how you can build a multi- aent system around these two spaces that can be really useful as a data analyst to answer questions combining these two spaces together.
Uh and just to show you like these are off different data sets. So the data sets here are about accounts and teams and the data sets involved in the opportunity space are kind of about like the sales. Uh so we haven't combined these into one genie space. Uh but we're going to do so in our multi- aent example. Uh so now I'm going to show you a bunch of code uh that is using the Mosaic AI agent framework to author and deploy a multi- aent system with Genie.
This is pretty much all from a starter example notebook. Uh so I'll gloss over a lot of this code. You can download it later if you would like. Uh but we'll just go ahead and start running this notebook. So the main thing to keep in mind here is that we are basically just going to hook up the Genie space ids from the opportunity space and the customer profile space. So these are the ids right here in the URL. So I'll just paste these in.
I've already done it beforehand. Uh but basically this is the main thing that you need to specify. All the other kind of orchestration logic is like your own business logic that you would write in uh langraph in this case but you can use any other popular framework. Uh and the main important thing is basically you're just importing uh directly from our data bricks langchain integration package a genie agent. So this is something that our o open source team at data bricks is managing uh our integrations with langchain and you just basically import this genie agent and it's super easy.
All you have to do is create genie agent, specify the space ID, give it a name, and describe the space a little bit. That's really all it takes. Uh, and now let's talk about how we can connect this with the rest of our agentic system. Uh, so in rest of our agentic system, we need a agent that's going to be like the orchestrator. So we'll select the data bricks cloud 37 sonnet. Um, so we'll just create that node. Uh and then the other piece is that you know our agent can have many capabilities uh one of which is getting information about the customers one of which is getting agent getting information about the opportunities but it can also do things like using tools that are in UC.
Uh so for example we'll give it access to all the system AI tools in UC. So that includes the Python execution tool. If you have further questions and you need to do some you know mathematical analysis between the results from Genie um you can just add that tool in. So we'll add this coder agent which will let us add that capability. Uh and then we'll talk a little bit about the supervisor agent. So in the diagram that handling shared earlier you have a supervisor agent that's kind of selecting which agent should speak next.
If you imagine there's like a chat room and there's like a microphone and kind of gets handed off between the different agents, right? Um so we'll just describe the agents a little bit. Uh and we have this system prompt. So it says you're a supervisor responsible for executing a plan, routing the steps to the next worker. The plan is a list of tasks assigned to each work worker with some certain formatting and your job is to execute each step uh and kind of follow the plan.
Don't uh go astray from the plan. This is more or less all you need to do to set up a moderator agent. Uh we'll go through more details about like how to tune the moderator quality maybe toward the end of the session. Uh but that's basically all I need to do. And then we'll just run right through here. And uh you can see here you build this workflow and you add these nodes. Uh so let me go ahead and run some of these cells.

18:25 Debugging and deployment

And uh then you can go ahead and run the agent. So at the end of this I'm setting it as a MLflow model. I'll share a little bit more about what that looks like. Uh but basically all we have to do is load this agent back. Uh and then we can ask it a question. So for example, we can ask what were my total sales from the last six months. And I'll go ahead and run this. And we expect this is going to query the opportunity space and find information about the last 6 months.
I believe the answer is something in the order of 11 million. So let's hope that's the answer that we get from Genie. Now we'll give it a moment. Um so the really cool piece here is that uh what we've done is all we had to do was take this you know starter code uh multi-agent thing which you find on the langraph website or you know there are hundreds of examples about building multi-agent systems and uh we can just go ahead and run this on the genie space.
So, if we look at our results here, let me scroll down to the bottom. Cool. Based on the data shown, your total sales for the last six months amount to about uh 11. 2 million, which is what I expected it to be. So, great. One part of the live demo is working as intended. Um, so the thing I really want to show you here is uh let's take a look at what actually happened inside this agent. Uh, so the MLFlow tracing UI is a really neat way to kind of see what happened inside this system.
Uh, it's really cool that it got the right answer, but what if it just came up with uh the answer from, you know, some hard-coded thing, right? Like I'm not like, let's make sure that I actually gave a real demo today. Um, so first the supervisor agent is going to select the next node uh and create this plan. So it says I'm going to ask the sales I'm going to have the sales genie answer this question. And then we query the sales genie and we ask what were the total sales for the last six months?
And the results come back from the sales genie with this uh with this number. And then the supervisor then decides who should speak again. It goes back to the sales genie. And then eventually the supervisor decides no this is the final answer. We're going to format it this way. Based on the data shown, your total sales from the last six months amounts to 11 million. Uh you know, this is the final answer. Oh, I'm sorry.
You can barely see it on there. Zoom in. Yeah. Okay, hopefully that's a little bit easier to read. Uh, but this is really important and let's imagine that, you know, this demo didn't go as intended and it actually queried the wrong genie space or it got the wrong data somehow. Uh, the only way we'd be able to debug this is with a product like this tracing system, which would let us find out where we went wrong. And then we can go back to the code and figure out, you know, my agent selected the wrong system.
Maybe I need to tune my moderator. Maybe I need to add more context. uh maybe I need to be more specific in some way, provide some guardrails, whatever it may be. Uh the tracing kind of provides the necessary observability that helps you get to the next step to improve the quality. So now let's ask a little bit more complicated of a question. Find me the technology accounts in Chicago and then calculate the total sales across these accounts.
Uh so this is kind of like a multi-step question. It's going to involve first we have to talk to the customer uh profile genius space to find the technology accounts in Chicago and then we're going to have to talk to the um the opportunity space to find out how much sales were there from those accounts. So this number I expect to be something in the order of 70 million. Uh so let's see if we get that answer. Uh but what I really want to show you is kind of like the multi- aent nature of this and how we're able to combine these two agents, pass the context from the customers that were uh retrieved from the customer profile space to the next agent. notes on latency as well.
Um there's you know obviously a number of factors that contribute to this and so first you can optimize the query that Genie runs at the warehouse level. Uh this is a demo environment so I was not allowed to make a big one. Um but yeah so you can optimize a SQL warehouse. You can also optimize how it's served in ML. Um so yeah. Okay cool. We've got our answer. Uh so let's scroll down to the bottom and see what the results look like.
Um so here we said the technology accounts in Chicago. There are 11 technology accounts which is what we expected. Uh these are the account IDs. They're just random UU IDs. They don't have names for our demo workspace. Uh and then we see the total sales. Uh it is 77 million which is what we expected. So this is really cool. But let's see how we got here and actually make sure that we went through the right series of steps.
Uh so first as expected we queried the customer genie space and we asked it so first our plan was created where we're going to find the tech technology accounts in Chicago uh and then we're going to ask the sales genie to calculate the total sales. So the customer genie is going to retrieve these accounts. Um and then we'll scroll down a little bit. Uh we talked to the coder agent. And finally we get our our results.
And it looks like here, let me actually pull open this one. I think this trace that I have preloaded does the does what we expect instead. Uh but here we use the sales genie and uh we're going to ask the sales genie the question that says find me the technology accounts. Here are all the accounts. Uh you can see I'm kind of formatted in this uh tabular format and then the genie is now going to return the actual results of the of the sales data.
So this is kind of like what we see our multi- aent interaction and what we imagine this looking like. Uh it's like two agents or in this case there are three agents involved. Uh they're all kind of like communicating back and forth in this messages array like appending to this conversation. Uh each genie space has access to the whole conversation and can kind of uh reason about the previous amount of work that's done by the other agents and uh make the next step.
So let's say I'm feeling really good about this agent and now I want to do the next step and I want to uh deploy this. So the next piece we want to do is log this model to MLflow. Uh so just run this ign example. Uh what we're going to do is run this mlflow. py. log model. And this will basically capture all of the code that we ran earlier in this session as a object. And that will kind of like store it as something that's persistent in in uh data bricks.
And so we're logging this agent with an input example and we're also giving it certain resources. So in this case, we're giving it the resource of the data brick serving endpoint. This is the claude 3. 7 endpoint. We're giving it the resource of the two genie spaces. And we're basically saying like these are the objects on data bricks that we want this model to be able to have access to. This is really important because then when we serve this model on data bricks, we'll make sure to provision access for this endpoint to only those resources. uh and then you'll be able to kind of seamlessly connect your permissions for your ML flow model with exactly what you uh what you would expect.
Okay, cool. Uh nice little error there. Let's run this again and see what happens. But let's uh let's just assume that the model did did indeed uh get logged ML flow. In fact, if I open this experiment, we can probably see a previous version of this model that I logged earlier. Okay, we'll uh we'll let this run. But basically once the model is logged to MLflow uh that basically creates this object and then you can register this model to Unity catalog.
Uh this is kind of an important step which is taking your models that are kind of just used for experimentation and uh you can register to UC when you feel like it's ready to make the next step. When you register it to UC you can move it around different workspaces much more easily and then you can serve this model. Uh so let's see if it's going to log this time maybe. Of course, my live demo is moving very slow. All right, my apologies.
We'll just move forward and uh we'll hopefully show you a real version of these things toward the end. Uh but once you're reg once your model has been registered to UC uh then the next step you want to do is deploy it uh to using the agent framework. Uh so you can use our agents SDK from datab bricks uh import agents and just do agents. deploy uh it's literally just one line that's all it takes. Uh and when you run that one line you will deploy this agent uh on data bricks which will spin up the model serving endpoint which is going to host this model. uh it's going to do what I said earlier basically provision the resources for this object uh with within model serving u and that's all it takes and at that point you have a model available uh ready to serve from a URL you can just basically uh embed this anywhere in your uh in your app okay demo gods are not with me today uh so luckily I have some stuff uh pre-loaded so I'll go ahead and show you what we have there um so one of the other really cool pieces is So I have this demo here.

28:16 Permission and security demo

This is the model serving endpoint. Uh you can see that in here I have this demo uh that I set up right before the session. Uh but I can query this agent in the playground. Uh so this is a really neat UI. It's within data bricks. Uh and you can just put in any question here. So let's try a question again. Uh maybe what were my total sales for the last six months? Uh this is a question that we've already asked before.
Uh but let's see if it works in kind of our so-called production setting uh here. So I'll run this query. Uh and the playground is really neat because it's like a neat UI where like any uh user can come and use this page. Uh but this is the same thing that you would do if you were to embed this somewhere else. Okay, let's take a look. It says what are my total sales? I don't have access to your sales data. That's that's not true.
It does have access to it. Uh, so we'll look at the trace here. It said, uh, all right. Well, it got the right answer, but I think in the end it just said that, uh, it doesn't have the right access. I don't know what's wrong with that. Let's actually just rerun that. Hopefully, it'll get it right. Let me zoom in a little bit. Um, so hopefully this will get the right answer. But the other really cool piece I want to show you is how when you serve this agent, it still respects all the same permissions that uh that we have in our system.
Um so if we go back to this customer uh if we go back to this opportunities, the customer profile space, uh we have this accounts table that we're using in this space. And so if we go ahead and open this accounts table, uh here's what it looks like in Unity catalog. Uh you can see that there's a bunch of uh columns, name, industry, ID, etc. Uh but one of the cool pieces here is that there's also this this piece called a row filter.
Uh and so let's take a look at this row filter. Uh this is something that Hanlin has previously set up. So if we look in here, it says that if the current user is my user, uh and the city name is Singapore, then basically don't let me see that data. Uh so this is just something that we've set up. uh you can imagine that this is much more powerful for an actual use case uh like if you have IPO plans or something like don't let anyone query that data or something like that right uh but just in this example we say we can't find out information about Singapore and so if you run this in the notebook obviously this will respect my permissions but if you run this in a model serving endpoint it'll also respect my permissions uh so that's something that's really cool if we'll jump back into the playground uh we'll start a brand new chat here and I will ask this question about how much sales do we make from accounts in Singapore.
Um, and so it would be really bad if I was able to see this data. Uh, but hopefully that's not what happens here. Okay. And this is also not a great outcome. So let's rerun that. This is exactly what I expected. So, uh the agent responds with insufficient permission to access the accounts table. Uh and if we look at the trace here, we can see this is exactly what happened. uh we basically got to the Genie uh customer profiles agent and it said you cannot access this accounts table.
Uh so the first time obviously it had some other issue uh but it never leaked the data from Singapore. Uh and this is just our example of what rowle filtering can look like. Uh you can imagine that you have much more complicated filtering expressions. Uh they're all defined as UC functions. So kind of the sky is the limit in terms of how complicated you want those to be. Um, and that's really the power of building these permissionaware systems.
Uh, so such that no matter how you compose these multi- aent systems, you're still going to respect all the permissions uh, from the UC tables. Awesome. Cool. Perfect. Awesome. So today you were able to see an effective SQL agent, a multi-agent framework that was able to direct questions to multiple places and always respect role level security. Well, we are super excited about what's to come as well. There are three key investment themes.

32:48 Future roadmap and Q&A

First is to continue making Genie the most accurate SQL agent that you have. We plan on making it easier for authors to add context by suggesting instructions and adding more primitive types for authors to add. We also plan on improving the base text of SQL with better clarification questions and reduced errors. Next, we want to continue improving each Genie agents functionality as well. So with the wrapper, we want to allow you to also retrieve visualizations, give back feedback via API, and also make it easier to build spaces with create and update APIs as well.
And finally, we want to make it easier to build with agent frameworks. As you saw, as you saw today, all we did was take a standard notebook that you can download from data bricks public documentation already, but we want to make it easier to set up with the agent bricks low code builder experience. We also plan on supporting MCP for all of our native apps and continue support for long running queries for your agents.
Awesome. Uh so yeah, I know we're at time. Thank you guys all for taking some time and staying pretty late today for this session. Thanks.

Learn more about the Databricks Data and AI platform.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.