|
| 1 | +--- |
| 2 | +slug: echokit-30-days-day-12-grok |
| 3 | +title: "Day 12 — Switching EchoKit to Grok (with Built-in Web Search) | The First 30 Days with EchoKit" |
| 4 | +tags: [echokit30days] |
| 5 | +--- |
| 6 | + |
| 7 | + |
| 8 | +# Day 12 — Switching EchoKit to Grok (with Built-in Web Search) |
| 9 | + |
| 10 | +Over the past days, we’ve been exploring how EchoKit’s **ASR → LLM → TTS** pipeline works. We learned how to replace different ASR providers, and this week we shifted our focus to the **LLM** — the part that thinks, reasons, and decides how EchoKit should reply. |
| 11 | + |
| 12 | +We have connected EchoKit to [OpenAI](https://echokit.dev/docs/dev/echokit-30-days-day-9-chatgpt) and [OpenRouter](https://echokit.dev/docs/dev/echokit-30-days-day-10-openrouter). |
| 13 | +**Today, we’re trying something different: Grok — a super-fast LLM with built-in web search.** |
| 14 | + |
| 15 | + |
| 16 | +## Why Grok? |
| 17 | + |
| 18 | +Grok, developed by X, stands out for a few practical reasons: |
| 19 | + |
| 20 | +* **⚡ Extremely fast inference** |
| 21 | + Great for voice AI agents like EchoKit. |
| 22 | + |
| 23 | +* **🔍 Built-in web search** |
| 24 | + Your device can answer questions using fresh information from the internet. |
| 25 | + |
| 26 | +* **🔌 OpenAI-compatible API** |
| 27 | + Minimizes changes — EchoKit can talk to it just like it talks to OpenAI. |
| 28 | + |
| 29 | +For a small device that depends on fast responses, Grok is an excellent option. |
| 30 | + |
| 31 | +## How to Use Grok as Your LLM in EchoKit |
| 32 | + |
| 33 | +All you need to do is update your `config.toml` of your EchoKit Server. |
| 34 | +No code changes, no rewriting your server — just swap URLs and keys. |
| 35 | + |
| 36 | +### **1. Set Grok as the LLM provider** |
| 37 | + |
| 38 | +In your `config.toml`, make sure the `[llm]` section points to Grok: |
| 39 | + |
| 40 | +```toml |
| 41 | +[llm] |
| 42 | +llm_chat_url = "https://api.x.ai/v1/chat/completions" |
| 43 | +api_key = "YOUR_API_KEY" |
| 44 | +model = "grok-4-1-fast-non-reasoning" |
| 45 | +history = 5 |
| 46 | +``` |
| 47 | + |
| 48 | +You can find your Grok API key in your **[xAI account dashboard](https://console.x.ai/)**. You will need to buy credits before using the Grok API. |
| 49 | + |
| 50 | +Don't rush to close the `config.toml` window. |
| 51 | + |
| 52 | +### **2. Enable Grok’s Web Search** |
| 53 | + |
| 54 | +This is the special part. |
| 55 | + |
| 56 | +Add the following section in the `config.toml` file: |
| 57 | + |
| 58 | +```toml |
| 59 | +[llm.extra] |
| 60 | +search_parameters = { mode = "auto" } |
| 61 | +``` |
| 62 | + |
| 63 | +`mode = "auto"` allows Grok to decide when it should fetch information from the web. |
| 64 | +Ask anything news-related, trending, or timely — Grok will search when needed. |
| 65 | + |
| 66 | +### Restart the EchoKit server |
| 67 | + |
| 68 | +After that, save these changes, and restart your EchoKit server. |
| 69 | +> If your server is outdated, you'll need to recompile it from source. Support for Grok with built-in web search was added in a commit on December 5, 2025. |
| 70 | +
|
| 71 | +## **Try It Out** |
| 72 | + |
| 73 | +Press the K0 button to chat with EchoKit and try these prompts: |
| 74 | + |
| 75 | +* “What’s the latest news in AI today?” |
| 76 | +* “How’s the Bitcoin price right now?” |
| 77 | +* “What's the current time in San Francisco?” |
| 78 | + |
| 79 | +If everything is configured correctly, you’ll notice Grok pulling fresh information in its responses. |
| 80 | +It feels different — the answers are more grounded in what’s happening *right now*. |
| 81 | + |
| 82 | + |
| 83 | +Switching EchoKit to Grok was surprisingly simple — just a few lines in a config file. |
| 84 | +Now my device can do real-time search when a question needs up-to-date info. |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +If you want to share your experience or see what others are building with EchoKit + Grok: |
| 89 | + |
| 90 | +* Join the **[EchoKit Discord](https://discord.gg/Fwe3zsT5g3)** |
| 91 | +* Or share your latency tests, setups, and experiments — we love seeing them |
| 92 | + |
| 93 | +Want to get your own EchoKit device? |
| 94 | + |
| 95 | +* [EchoKit Box](https://echokit.dev/echokit_box.html) |
| 96 | +* [EchoKit DIY Kit](https://echokit.dev/echokit_diy.html) |
| 97 | + |
| 98 | + |
0 commit comments