1"""Combine URL context with Google Search for comprehensive web analysis.
2
3"""
4
5from kern.agent import Agent
6from kern.models.google import Gemini
7
8# Create agent with both Google Search and URL context enabled
9agent = Agent(
10 model=Gemini(id="gemini-2.5-flash", search=True, url_context=True),
11 markdown=True,
12)
13
14# The agent will first search for relevant URLs, then analyze their content in detail
15agent.print_response(
16 "Analyze the content of the following URL: https://kern.ndx.rocks/introduction and also give me latest updates on AI agents"
17)