DEV Community

Cover image for I Built an Open-Source AI Assistant with 19 Tools That Actually Controls Your Computer
Jaseph
Jaseph

Posted on

I Built an Open-Source AI Assistant with 19 Tools That Actually Controls Your Computer

The Problem

ChatGPT is great for conversation, but it can't do anything on your computer. Cursor and Claude Code are great for coding, but they can't send emails or browse the web. I wanted one AI assistant that could do everything — on my machine, with my API key, under my control.

So I built SelfAgent.

What Is SelfAgent?

SelfAgent is an open-source AI-powered personal assistant that runs locally on your computer. You interact with it through a WhatsApp-style chat interface, and it can:

  • Browse the web and fill forms
  • Read and send emails
  • Write, run, and debug code
  • Build complete websites
  • Manage files and Git repos
  • Analyze data and create charts
  • Download files and YouTube videos
  • Schedule recurring tasks
  • And 11 more tools...

All running locally. Your data never leaves your machine.

The Architecture

User <-> Chat UI (WebSocket) <-> FastAPI Backend
                                      |
                              +-------+--------+
                              |   Agent Core   |
                              |  Think -> Plan |
                              |  Execute ->    |
                              |  Observe       |
                              +-------+--------+
                                      |
                    +-----------------+------------------+
                    |                 |                   |
              Memory System     Tool Registry        Task Manager
Enter fullscreen mode Exit fullscreen mode

The agent follows a simple loop:

  1. Think — understand the user's request
  2. Plan — decide which tools to use
  3. Execute — call the tools
  4. Observe — check the results, iterate if needed

This runs for up to 25 iterations per request, so the agent can handle complex multi-step tasks.

5 AI Providers, 1 Interface

SelfAgent works with:

Provider Cost Best For
Ollama Free (local) Privacy, offline use
OpenRouter Free tier available Free cloud models (Llama 70B, DeepSeek)
Google Free tier available Gemini 2.5 Pro with vision
OpenAI Paid GPT-4o
Anthropic Paid Claude Sonnet/Opus

You can store API keys for all providers and switch between them instantly from the settings panel. No restart needed.

The Ollama Experience

This is where it gets interesting. With Ollama, you get:

  • Status monitoring — green/red dot shows if Ollama is running
  • Dynamic model list — see all installed models
  • Pull from UI — type a model name, click Pull, watch the progress bar
  • Zero configuration — no API key, no account, no internet needed
brew install ollama
ollama pull llama3.2
ollama serve
Enter fullscreen mode Exit fullscreen mode

Select "Ollama (Local)" in SelfAgent settings. You now have a fully local AI assistant.

19 Built-in Tools

Here's every tool and what it does:

  1. Web Browser — Playwright-based. Navigate, click, fill forms, screenshot, run JS. Supports CSS, text, and ARIA selectors.

  2. Web Search — DuckDuckGo. No API key needed.

  3. File Manager — CRUD operations, sandboxed to home directory. Search by filename.

  4. Code Writer — Write and run code in Python, JavaScript, Go, Rust, Java, and more. 7 project templates included.

  5. Website Builder — 8 templates (landing, portfolio, blog, e-commerce, etc.) with local preview server.

  6. Terminal — Persistent shell sessions. Run long processes, manage multiple sessions.

  7. Git — Full Git workflow + GitHub API. Clone, commit, push, create PRs and repos.

  8. Email — IMAP/SMTP. Read inbox, search, send HTML-formatted emails, reply with attachments.

  9. Database — SQLite queries, table inspection, CSV/JSON export/import.

  10. API Tester — Like Postman. Send requests, assert responses, generate docs.

  11. Screenshot — Full screen and window capture.

  12. Clipboard — Read/write system clipboard.

  13. System Control — System info, open apps, manage processes.

  14. Image — Resize, crop, convert, compress, watermark, batch processing.

  15. PDF — Create from markdown, read, merge, split, watermark.

  16. Data Analyzer — Load CSV/JSON/Excel, statistics, 6 chart types, data cleaning.

  17. Downloader — Direct files + YouTube videos/audio via yt-dlp.

  18. Scheduler — One-time and cron-style recurring task automation.

  19. Plugin System — Add custom tools by dropping a Python file in plugins/.

Memory That Actually Works

SelfAgent has a 3-layer memory system:

  • Layer 1: Short-term — in-memory buffer of recent messages
  • Layer 2: Long-term — SQLite for all conversations + ChromaDB for semantic search
  • Layer 3: User Profile — key/value store for name, email, preferences

The agent remembers who you are across sessions. Tell it your email once — it remembers forever.

Getting Started

git clone https://github.com/oezercet/SelfAgent.git
cd SelfAgent
./setup.sh
./run.sh
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:8765. Set your API key or select Ollama. Start chatting.

What's Next?

  • Multi-agent collaboration
  • Voice input
  • Mobile app
  • More community plugins

Links

If you find it useful, a star on GitHub would mean a lot. Contributions and feedback are always welcome!

Top comments (0)