This example demonstrates how to add location context to agent instructions, enabling the agent to provide location-specific responses and search for local news.
from agno.agent import Agentfrom agno.models.openai import OpenAIChatfrom agno.tools.duckduckgo import DuckDuckGoToolsagent = Agent( model=OpenAIChat(id="gpt-5-mini"), add_location_to_context=True, tools=[DuckDuckGoTools(cache_results=True)],)agent.print_response("What city am I in?")agent.print_response("What is current news about my city?")