| Example | Description |
|---|---|
| xAI Basic | Run a Grok agent in sync, async, and streaming modes with xAI. |
| Finance Agent | Use YFinanceTools with Grok to report stock prices, analyst recommendations, company data, and news. |
| xAI Image Agent | Describe an image URL with Grok 4.5 and search for related news. |
| xAI Image Agent Bytes | Analyze downloaded image bytes with Grok 4.5. |
| xAI Image Agent With Memory | Analyze an image with Grok 4.5 and retain history for follow-up questions. |
| xAI Live Search Agent | Enable xAI Live Search on Grok with search parameters and citations for a news digest. |
| xAI Live Search Agent Stream | Stream a world news digest from Grok using xAI Live Search with citations. |
| xAI Reasoning Agent | Combine ReasoningTools and YFinance on Grok 4.3 to write a stock report with visible reasoning. |
| Retry | Review retry settings and why invalid model IDs cannot reliably exercise the retry path. |
| xAI Structured Output | Get a typed MovieScript object back from Grok with a Pydantic output schema. |
| Build a Web Search Agent using xAI | Build a web search agent on Grok and run it sync, streaming, and async. |
xAI
xAI
xAI model examples for building agents with Grok, including vision, web search, and financial analysis.