# Build your first AI agent — Optimus
By Arshman Khalid · checked October 30, 2026
Full guide: https://arshmankhalid.com/how-to-build-your-first-ai-agent/

1. Install and open Ollama: https://ollama.com/download
2. Before starting the model, set context in Ollama's app settings. 64K is recommended for agents if memory allows; OpenClaw automatic discovery needs at least 16K. A smaller qwen3.5:4b is an option.
   Run: ollama run qwen3.5:9b
   The download is roughly 7 GB, with additional memory needed to run it. Check the loaded model with ollama ps and keep it loaded during connection.
3. Review official installer: https://docs.openclaw.ai/install
   Mac: curl -fsSL https://openclaw.ai/install.sh | bash
   Windows PowerShell: iwr -useb https://openclaw.ai/install.ps1 | iex
   If onboarding doesn't start: openclaw onboard
   Choose One agent if asked, and skip optional cloud memory embeddings.
4. Choose Ollama > Local only. Host: http://127.0.0.1:11434
   Model: qwen3.5:9b (not a cloud model).
   Run: openclaw dashboard
5. Edit the brackets in optimus-personality.txt, paste into chat, and confirm the preferences are saved.
6. Add free web search in a new terminal if the Gateway occupies the current one. Run one command at a time:
   openclaw plugins install @openclaw/parallel-plugin
   openclaw configure --section web
   Select Parallel Search (Free), provider parallel-free. Test Settings > Search. Start a new chat.
   Source: https://docs.openclaw.ai/tools/parallel-search
7. Edit lead-criteria.md and copy it into your configured workspace (default ~/.openclaw/workspace, or %USERPROFILE%\.openclaw\workspace on native Windows).
8. Paste first-research-task.txt into chat. Verify sources, approve the table, and export.

No paid model API is required. Setup is roughly 15 minutes plus downloads; hardware and internet speed affect timing. Local model processing stays local. Search queries and connected tools can send data externally. Free services may have limits. Keep the Gateway local and review permissions. The workspace folder is not itself a hard security boundary.
