reasoning_agent.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your xAI API key
4
Use the explicit Grok model
Replace
xAI(id="grok-3-beta") with xAI(id="grok-4.3") in the saved file.5
Run the example
Save the code above as
reasoning_agent.py, then run: