Code
cookbook/agent_concepts/other/location_instructions.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
Add the current location to the instructions of an agent.
from agno.agent import Agent
from agno.models.openai import OpenAIChat
agent = Agent(
model=OpenAIChat(id="gpt-4o"),
tools=[DuckDuckGoTools()],
add_location_to_instructions=True,
)
agent.print_response(
"What is current news about my city?"
)
Was this page helpful?