live_search_agent.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your xAI API key
4
Run the example
Save the code above as
live_search_agent.py, then run:Enable xAI Live Search on Grok with search parameters and citations for a news digest.
Set up your virtual environment
Install dependencies
Export your xAI API key
Run the example
live_search_agent.py, then run: