Dev builds a web-searching AI agent from scratch in JavaScript, no frameworks
amitmerchant · reddit · 2026-08-15
A Reddit developer shares how, to understand what actually makes an AI system an "agent", they built a small web-searching agent from scratch in JavaScript — without LangChain or any agent framework.
- Core loop: The LLM's tool-calling capability decides when fresh information is needed, calls a web-search tool (SearchApi), feeds results back to the model, and repeats until it can produce an answer.
- Open source: The full demo is available on GitHub.
- Feedback wanted: The author is particularly interested in thoughts on the agent loop design and how to extend it beyond a single search tool.
More from coding & agent
- GitHub Copilot adds Grok 4.6, Kimi K3, and other new models — film_girl · 2026-08-15
- Developer confirms hiding data in code comments works to fool models — suchenzang · 2026-08-15
- Comic 4 render speedup test: significantly faster than legacy tools — andrew_n_carr · 2026-08-15
- WebMCP demo: Agents can call website tools directly via URL — jasonkneen · 2026-08-15
- Hermes Agents Integrates @skills Hub for Direct Skill Addition — Teknium · 2026-08-15
- Tutorial: Building MCP servers for databases — adnan_hashmi · 2026-08-15