<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vivek Shetye</title>
    <description>The latest articles on DEV Community by Vivek Shetye (@vivek_shetye).</description>
    <link>https://dev.to/vivek_shetye</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3879444%2F8f338ec8-c7f4-48e9-b8cf-3898bccbb1e8.jpg</url>
      <title>DEV Community: Vivek Shetye</title>
      <link>https://dev.to/vivek_shetye</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vivek_shetye"/>
    <language>en</language>
    <item>
      <title>🚀 I Built a Fully Local AI Agent for $0 (No Cloud, No API Costs)</title>
      <dc:creator>Vivek Shetye</dc:creator>
      <pubDate>Wed, 15 Apr 2026 13:18:51 +0000</pubDate>
      <link>https://dev.to/vivek_shetye/i-built-a-fully-local-ai-agent-for-0-no-cloud-no-api-costs-58og</link>
      <guid>https://dev.to/vivek_shetye/i-built-a-fully-local-ai-agent-for-0-no-cloud-no-api-costs-58og</guid>
      <description>&lt;p&gt;Everyone is talking about AI agents right now.&lt;/p&gt;

&lt;p&gt;But most tutorials fall into one of two categories:&lt;/p&gt;

&lt;p&gt;💸 You’re expected to spend $100–$200/month on APIs/LLM subscriptions&lt;br&gt;
🖥️ Or you need a powerful GPU setup to run local models&lt;/p&gt;

&lt;p&gt;I wanted something different.&lt;/p&gt;

&lt;p&gt;👉 Could I build a fully working AI agent that runs locally on just a laptop — for $0?&lt;/p&gt;

&lt;p&gt;So I tried.&lt;/p&gt;

&lt;p&gt;And what I ended up building was more powerful than I expected.&lt;/p&gt;
&lt;h2&gt;
  
  
  🧠 What I Built
&lt;/h2&gt;

&lt;p&gt;I built a proactive AI agent that runs entirely on my laptop inside a VM.&lt;/p&gt;

&lt;p&gt;It can:&lt;br&gt;
    • 💬 Talk to me on Telegram&lt;br&gt;
    • 🔎 Search the web privately&lt;br&gt;
    • 📁 Write and manage files&lt;br&gt;
    • 🧠 Maintain memory across conversations&lt;br&gt;
    • 🤖 Execute multi-step research tasks&lt;/p&gt;

&lt;p&gt;And the best part?&lt;/p&gt;

&lt;p&gt;💰 Total cost: $0&lt;/p&gt;

&lt;p&gt;No subscriptions. No API bills. No cloud infrastructure.&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚙️ The Stack Behind It
&lt;/h2&gt;

&lt;p&gt;This system is built using three core components:&lt;/p&gt;
&lt;h3&gt;
  
  
  🧩 OpenClaw — The Agent Framework
&lt;/h3&gt;

&lt;p&gt;Think of this as the nervous system.&lt;/p&gt;

&lt;p&gt;It handles:&lt;br&gt;
    • Tool usage&lt;br&gt;
    • Memory management&lt;br&gt;
    • Decision-making flow&lt;br&gt;
    • Message routing between components&lt;/p&gt;

&lt;p&gt;⚠️ It’s still in beta, so expect some rough edges, but the architecture is powerful.&lt;/p&gt;
&lt;h3&gt;
  
  
  ⚡ Gemini 3.1 Flash Lite — The Brain
&lt;/h3&gt;

&lt;p&gt;This powers the reasoning layer.&lt;/p&gt;

&lt;p&gt;Free tier includes:&lt;br&gt;
    • 15 requests/min&lt;br&gt;
    • 500 requests/day&lt;br&gt;
    • 250K tokens/min&lt;/p&gt;

&lt;p&gt;Perfect for:&lt;br&gt;
    • Learning agent workflows&lt;br&gt;
    • Multi-step tasks&lt;br&gt;
    • Rapid experimentation&lt;/p&gt;

&lt;p&gt;It’s surprisingly fast, which matters a lot in agent loops.&lt;/p&gt;
&lt;h3&gt;
  
  
  🔍 SearXNG — Private Web Search
&lt;/h3&gt;

&lt;p&gt;This is the agent’s ability to “browse the internet”.&lt;br&gt;
    • Self-hosted meta-search engine&lt;br&gt;
    • No API key required&lt;br&gt;
    • No rate limits&lt;br&gt;
    • Privacy-friendly&lt;/p&gt;

&lt;p&gt;Now the agent isn’t guessing, it can actually search.&lt;/p&gt;


&lt;h2&gt;
  
  
  🎥 Demo
&lt;/h2&gt;

&lt;p&gt;Full video walkthrough:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/xPCuuikdu8g"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  🖥️ Step 1 — Running Everything in a VM
&lt;/h2&gt;

&lt;p&gt;To keep things safe and isolated, I ran everything inside a VM.&lt;/p&gt;

&lt;p&gt;Setup:&lt;br&gt;
    • Ubuntu Server 24.04 LTS&lt;br&gt;
    • 4–6 GB RAM&lt;br&gt;
    • 4 CPU cores&lt;br&gt;
    • 40 GB storage&lt;/p&gt;

&lt;p&gt;On Mac, I used UTM (works great for Apple Silicon).&lt;/p&gt;

&lt;p&gt;After the initial install, I also threw on the desktop environment just to have a GUI available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;ubuntu-desktop &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify systemctl (Service Manager):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check version&lt;/span&gt;
systemctl &lt;span class="nt"&gt;--version&lt;/span&gt;

&lt;span class="c"&gt;# If not found:&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;systemd &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧠 Step 2: Get Your API Key from Google AI Studio
&lt;/h2&gt;

&lt;p&gt;Head to &lt;a href="//aistudio.google.com"&gt;aistudio.google.com&lt;/a&gt;, create a project under free tier, click Get API Key, and create one. Takes about 30 seconds.&lt;/p&gt;

&lt;p&gt;Copy it somewhere safe. You’ll paste it during the OpenClaw onboarding in a few minutes.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔎 Step 3 — Installing Private Search (SearXNG)
&lt;/h2&gt;

&lt;p&gt;First, install Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://get.docker.com &lt;span class="nt"&gt;-o&lt;/span&gt; get-docker.sh
&lt;span class="nb"&gt;sudo &lt;/span&gt;sh get-docker.sh
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; docker
&lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; docker &lt;span class="nv"&gt;$USER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then set up SearXNG:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ./searxng/core-config/
&lt;span class="nb"&gt;cd&lt;/span&gt; ./searxng/

curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; &lt;span class="nt"&gt;-O&lt;/span&gt; https://raw.githubusercontent.com/searxng/searxng/master/container/docker-compose.yml &lt;span class="se"&gt;\&lt;/span&gt;
             &lt;span class="nt"&gt;-O&lt;/span&gt; https://raw.githubusercontent.com/searxng/searxng/master/container/.env.example

&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generate secret:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;openssl rand &lt;span class="nt"&gt;-hex&lt;/span&gt; 32&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"s/^SEARXNG_SECRET=.*/SEARXNG_SECRET=&lt;/span&gt;&lt;span class="nv"&gt;$KEY&lt;/span&gt;&lt;span class="s2"&gt;/"&lt;/span&gt; .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable JSON output (important for agents):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s1"&gt;'/formats:/,/^[^ ]/ { /- html/a\
    - json
}'&lt;/span&gt; ./core-config/settings.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This runs on port 8080&lt;/p&gt;




&lt;h2&gt;
  
  
  🤖 Step 4 — Installing OpenClaw
&lt;/h2&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://openclaw.ai/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manual Setup: Select Manual.&lt;/li&gt;
&lt;li&gt;Local Gateway: Select Yes.&lt;/li&gt;
&lt;li&gt;AI Provider: Select Google.&lt;/li&gt;
&lt;li&gt;API Key: Paste your Gemini API Key.&lt;/li&gt;
&lt;li&gt;Model: Select gemini-3.1-flash-lite.&lt;/li&gt;
&lt;li&gt;Gateway Port: Keep default 18789.&lt;/li&gt;
&lt;li&gt;Gateway Bind: Select Loopback.&lt;/li&gt;
&lt;li&gt;Gateway Auth: Select Token&lt;/li&gt;
&lt;li&gt;Tailscale Exposure: Select Off&lt;/li&gt;
&lt;li&gt;How do you want to provide the gateway token: Select Generate/Store plaintext token&lt;/li&gt;
&lt;li&gt;Configure Chat Channels: Select Yes&lt;/li&gt;
&lt;li&gt;Select Chat Channels: Select Telegram&lt;/li&gt;
&lt;li&gt;Telegram Bot:
Find &lt;a class="mentioned-user" href="https://dev.to/botfather"&gt;@botfather&lt;/a&gt; on Telegram.
Type /newbot, name it, and get your API Token.
Paste the token into the OpenClaw prompt.&lt;/li&gt;
&lt;li&gt;DM Access: * Find @userinfobot on Telegram. * Get your User ID and paste it into the allowlist.&lt;/li&gt;
&lt;li&gt;Web Search: Select SearXNG Search&lt;/li&gt;
&lt;li&gt;SearXNG Base URL: * URL: &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt; (Ensure the port is 8080).&lt;/li&gt;
&lt;li&gt;Skills: Skip it you can add later.&lt;/li&gt;
&lt;li&gt;Select No for api keys for all other services.&lt;/li&gt;
&lt;li&gt;Configure Plugins: Select &lt;a class="mentioned-user" href="https://dev.to/openclaw"&gt;@openclaw&lt;/a&gt;/searxng-plugin&lt;/li&gt;
&lt;li&gt;Enable Hooks: Hit Enter to enable all hooks and services.&lt;/li&gt;
&lt;li&gt;Install Gateway Service: Select Yes&lt;/li&gt;
&lt;li&gt;Gateway Service Runtime: Select Node&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once Gateway is started Open using Web UI&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Step 4 — Giving the Agent Personality
&lt;/h2&gt;

&lt;p&gt;When you first interact with the agent, it asks for instructions.&lt;/p&gt;

&lt;p&gt;This defines how it behaves long-term.&lt;/p&gt;

&lt;p&gt;I used:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I am [YOUR_NAME]. You will be my personal AI assistant called Claw-AI. You need to be concise, direct and always do thorough research and also criticize my thoughts while doing research and not be always agreeable to everything&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This updates OpenClaw's core files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;soul.md and identity.md → the agent’s fundamental values and personality&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;agents.md → your agents rulebook. This is where you write things like “always prefer scraping full content over snippets” and the agent follows them on every request&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;tools.md → a map of what the agent can actually do (web search, file operations, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;user.md —→learns about you over time. Preferences, workflows, how you like things formatted&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;memory/ → long-term storage. This is what makes the assistant actually get smarter the more you use it&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is what makes it feel like a real system instead of a chatbot.&lt;/p&gt;

&lt;p&gt;Then I added memory behavior rules:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Maintain a clear separation between short-term and long-term memory (e.g., distinct memory/ structures). For each request, load memory selectively and efficiently—only retrieve information that is directly relevant to the current context. Prioritize cost efficiency by minimizing unnecessary memory access and avoiding redundant data loading.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Strictly adhere to all security instructions at all times, these must never be ignored or bypassed.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🧪 The Moment It Clicked
&lt;/h2&gt;

&lt;p&gt;To test it, I gave it a real research task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;I want you to act as an autonomous research agent and build me a structured knowledge base.
Topic: “How AI Agents are transforming software development in 2026”

Your job is to:
&lt;span class="p"&gt;
1.&lt;/span&gt; Search the web for high-quality and recent sources (blogs, articles, research, discussions).
&lt;span class="p"&gt;2.&lt;/span&gt; For each useful result, scrape the FULL content (not just snippets).
&lt;span class="p"&gt;3.&lt;/span&gt; Extract and synthesize insights across sources:
&lt;span class="p"&gt;
-&lt;/span&gt; Key trends
&lt;span class="p"&gt;-&lt;/span&gt; Popular tools/frameworks
&lt;span class="p"&gt;-&lt;/span&gt; Real-world use cases
&lt;span class="p"&gt;-&lt;/span&gt; Developer pain points
&lt;span class="p"&gt;-&lt;/span&gt; Challenges and limitations

Then organize everything into a set of well-structured markdown files.
Create the following files:
&lt;span class="p"&gt;
-&lt;/span&gt; overview.md → high-level summary and why this topic matters
&lt;span class="p"&gt;-&lt;/span&gt; trends.md → top trends with supporting insights
&lt;span class="p"&gt;-&lt;/span&gt; tools.md → important tools/frameworks with descriptions
&lt;span class="p"&gt;-&lt;/span&gt; use_cases.md → real-world applications and examples
&lt;span class="p"&gt;-&lt;/span&gt; challenges.md → risks, limitations, open problems
&lt;span class="p"&gt;-&lt;/span&gt; future_predictions.md → what’s coming next in 2–3 years
&lt;span class="p"&gt;-&lt;/span&gt; README.md → explain the structure of this knowledge base

Important instructions:
&lt;span class="p"&gt;-&lt;/span&gt; Always prefer scraping full content over search snippets
&lt;span class="p"&gt;-&lt;/span&gt; Combine insights across multiple sources (don’t just summarize one page)
&lt;span class="p"&gt;-&lt;/span&gt; Avoid hallucinations — rely only on extracted data
&lt;span class="p"&gt;-&lt;/span&gt; Keep the writing clean, structured, and professional
&lt;span class="p"&gt;-&lt;/span&gt; Use memory to store intermediate findings before writing files
&lt;span class="p"&gt;-&lt;/span&gt; Make sure all files are consistent and well-organized

Final goal:
Produce a mini research repository with multiple markdown files that I can directly use.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It had to:&lt;br&gt;
    • Search multiple sources&lt;br&gt;
    • Extract full content&lt;br&gt;
    • Synthesize insights&lt;br&gt;
    • Organize everything into markdown files&lt;/p&gt;

&lt;p&gt;What it produced:&lt;br&gt;
    • overview.md&lt;br&gt;
    • trends.md&lt;br&gt;
    • tools.md&lt;br&gt;
    • use_cases.md&lt;br&gt;
    • challenges.md&lt;br&gt;
    • future_predictions.md&lt;/p&gt;




&lt;p&gt;And it didn’t just summarize.&lt;/p&gt;

&lt;p&gt;It:&lt;br&gt;
    • Cross-referenced multiple sources&lt;br&gt;
    • Structured information intelligently&lt;br&gt;
    • Generated a full knowledge repository&lt;/p&gt;

&lt;p&gt;That’s when it stopped feeling like a chatbot…&lt;/p&gt;

&lt;p&gt;👉 And started feeling like an autonomous system.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚠️ What Broke (And What I Learned)
&lt;/h2&gt;

&lt;p&gt;The first run failed.&lt;/p&gt;

&lt;p&gt;Reason:&lt;br&gt;
👉 I used the wrong SearXNG port (8888 instead of 8080)&lt;/p&gt;

&lt;p&gt;Once I fixed that and restarted everything, it worked perfectly.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚠️ Limitations
&lt;/h2&gt;

&lt;p&gt;This setup is powerful, but not perfect:&lt;br&gt;
    • Gemini free tier can get exhausted quickly&lt;br&gt;
    • OpenClaw is still in active development&lt;br&gt;
    • Documentation sometimes lags behind behavior&lt;br&gt;
    • SearXNG quality depends on backend configuration&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Why This Matters
&lt;/h2&gt;

&lt;p&gt;We’re shifting from:&lt;/p&gt;

&lt;p&gt;“Ask AI a question”&lt;/p&gt;

&lt;p&gt;to:&lt;/p&gt;

&lt;p&gt;“Give AI a goal and let it execute”&lt;/p&gt;

&lt;p&gt;This setup is a small but real step toward that future.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Final Thought
&lt;/h2&gt;

&lt;p&gt;Agents are cool — until they break.&lt;/p&gt;

&lt;p&gt;👉 What’s been the biggest pain point in your agent setups so far?&lt;/p&gt;

&lt;p&gt;Curious what others are running into 👇&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
