Unlocking Real-Time Intelligence for AI Agents with You.com and Databricks

This blog post is co-authored by You.com Co-Founder and CTO Bryan McCann and Databricks Sr. Solutions Architect Jai Behl
Demo of a real-time agent accessing web search with you.com’s API
As artificial intelligence (AI) agents tackle increasingly sophisticated reasoning tasks, access to real-time external data is essential for delivering timely and accurate insights. In partnership with you.com, Databricks is enabling customers to seamlessly integrate real-time web search into their AI workflows, empowering agents with up-to-date intelligence within a secure and governed environment. Real-time data access is a game-changer for industries that rely on rapid decision-making and dynamic insights.
Here are a few examples of how integrating real-time web search with AI can drive impact:
- Retail and E-commerce: AI agents can adjust pricing based on real-time competitor data or market demand. Personalized product recommendations and promotions can be tailored using real-time search for customer preferences or trending products.
- Manufacturing: Supply chain optimizations based on real-time data on weather, geopolitical events, or supplier issues inform logistics and procurement divisions.
- Travel and Hospitality: Real-time search enables AI agents to find competitor pricing or local events, enabling agents to offer optimized hotel or flight pricing. AI agents can also offer tailored travel recommendations based on real-time destination trends or user preferences.
Empowering AI agents with you.com and Databricks
You.com’s developer-friendly APIs deliver real-time, low-latency web and news data, enabling developers to build applications that seamlessly integrate real-time public data from across the entire web at enterprise scale. Whether you’re enhancing large language models (LLMs) or building custom agents, anyone can have access to the entire web with just a few lines of code.
Through Databricks’ Unity Catalog, customers can now securely integrate you.com’s APIs into their AI agent workflows using Unity Catalog’s external connection framework. This integration offers several key benefits:
- Seamless API Access: Teams can call you.com’s APIs directly within Databricks workflows, enabling real-time data retrieval without leaving the platform.
- Enhanced Security: Unity Catalog Connections and Functions ensure that API credentials are never exposed in code. Databricks’ robust security model governs, audits, and scopes all access, maintaining compliance and data governance.
- Simplified Workflows: Whether augmenting retrieval-augmented generation (RAG) pipelines or providing broader context to AI agents, this integration simplifies the process of incorporating real-time intelligence into existing workflows.
Setting up the you.com API as an external tool for AI agents
Databricks now supports connecting AI agents to external services like Slack, Google Calendar, and any API-enabled application via Unity Catalog Connections and Functions. This capability allows agents to automate tasks, send requests, and retrieve external data using HTTP-based tools — securely and at scale.
To bring real-time web search into the agent loop, customers can register the you.com Search API as a Unity Catalog HTTP connection. This lets agents call the API directly, without exposing sensitive credentials or handling authentication in code, while maintaining robust governance and security.
To procure an API key for the You Search API:
- Navigate to api.you.com
- Click "Sign up"
- Finish creating an account
- Log in with your new credentials
- Click “Plans” near the top of the page and subscribe to the plan of your choosing (Trial plan is free for 60 days)
- After you are logged in and subscribed, click ‘API Key’ near the top of the page
Confirm that your API key is effective (it may take a few minutes):
- Navigate to https://documentation.you.com/api-reference/search?playground=open
- Enter your API key in the Authorization section for X-API-Key
- Enter a query like ‘you.com search api’ in the query field
- Click ‘Send’ in the top right corner of the page
You can review documentation.you.com for additional quick start and reference materials.
To get started with Databricks, you’ll first create a connection object in Unity Catalog that securely stores the you.com API key and base path. This can be done through the Catalog Explorer UI, SQL, or REST API. Below is an example of setting this up using the UI:
Next, reference the API for authentication:
Once created, this connection can be referenced in a SQL function — turning the API into a reusable, governed tool for your AI agents.
Creating a Unity Catalog Function to call the you.com API
With your connection to the you.com API established, the next step is to wrap it in a Unity Catalog SQL function. This function acts as the interface your AI agents will call—turning a prompt or query into a secure, auditable web search request.
Using the built-in http_request function, you can define a simple SQL function that performs a GET request to you.com’s search endpoint. Here’s an example:
This function:
- Takes in a user-defined query string
- Uses the pre-registered you_com connection to send a GET request
Retrieves web search results in a secure and auditable way - Reads the API key from Unity Catalog Connection to avoid hardcoding credentials
Making the function available to AI agents
Once the function is created in Unity Catalog, it’s automatically registered as a callable tool for AI agents. No additional configuration is required—any agent running in the same workspace with appropriate permissions can invoke it directly.
This means your agents can now issue live web search queries by calling the search_sql function, with all security and access controls managed through Unity Catalog. The API key remains hidden, requests are auditable, and access is governed by Databricks’ built-in privileges (USE FUNCTION, USE CONNECTION, etc.).
This setup allows you to treat web search like any other agent tool—except it’s powered by real-time data from you.com.
To further enhance observability and evaluation, Databricks offers MLflow Tracing, which provides end-to-end visibility into how your Agent is actually invoking tools. This feature captures detailed insights across development and production, enabling streamlined debugging, offline evaluation, and comprehensive audit logs of agent actions.
Additionally, Mosaic AI Agent Evaluation includes built-in AI judges that assess various aspects of your agent’s responses, such as correctness, relevance, and safety. These judges provide qualitative evaluations, offering a more nuanced understanding of agent performance.
By combining secure external data integration with robust observability and evaluation tools, you can confidently deploy intelligent and trustworthy AI agents.