Self-hosted AI agents: the open source ones you can run yourself
By Pull This RepoPosted 5 min read
Short answer
A self-hosted AI agent is an assistant whose software, memory and tools run on your own computer or server. The model can be local through Ollama or a cloud model with your API key. The main open source options are OpenClaw for a personal assistant, OpenHands for coding agents, and n8n's starter kit for workflow agents.
A self-hosted AI agent is an AI assistant that does things, not just chats, with the agent software running on your own computer or server. It keeps its memory, credentials and tools on your hardware, and you choose the model: a local one through Ollama, or a cloud model reached with your own API key. Below are the open source self-hosted AI agents people actually mean by the term, with stars, licences and install commands read from each project's GitHub page on 22 November 2026.
Which self-hosted AI agents are worth running?
| Project | What it is | Licence | Stars on 22 Nov 2026 | Latest release |
|---|---|---|---|---|
| OpenClaw | personal assistant that works through chat apps | MIT | 395,031 | v2026.11.6 (19 Nov 2026) |
| OpenHands | coding agents with a web control center | MIT | 94,035 | v1.43.0 (20 Nov 2026) |
| n8n self-hosted AI starter kit | Docker bundle for workflow agents | Apache-2.0 (the kit); n8n itself is Sustainable Use License | 15,383 | no tagged releases |
| Open WebUI | chat interface that can grow into an agent harness | Open WebUI License (BSD-3 based, with a branding clause) | 159,258 | v0.13.4 (17 Nov 2026) |
None of the four repos is archived, and all were updated this week. Pick by job: OpenClaw if you want an assistant you message from your phone, OpenHands if you want agents writing code, n8n if you want agents inside scheduled automations, and Open WebUI if you mainly want a private ChatGPT-style chat with some tools.
What is OpenClaw?
OpenClaw has far more GitHub stars than the other three projects here. Its README says state, memory and credentials live on your hardware, that models and agent harnesses are plugins you can swap, and that it works with hosted and local model providers. It is run by the OpenClaw Foundation, a 501(c)(3), and the README states it has no paid tier, hosted service or token.
Install it with the official script:
curl -fsSL https://openclaw.ai/install.sh | bashOn Windows PowerShell:
iwr -useb https://openclaw.ai/install.ps1 | iexThe installer supports macOS, Linux and Windows and sets up a supported Node.js runtime if you need one. If you already manage Node.js yourself, the README lists Node 24.16.0 or newer on the 24 line, or 26.1.0 or newer, and installs the package with:
npm install -g openclaw@latest --allow-scripts=openclaw
openclaw onboard --install-daemonOnboarding checks model access, creates the workspace and configures the Gateway, then opens a Control UI where you send a first message. If you already use Ollama, its README shows a shortcut: ollama launch openclaw connects the two so a local model powers the assistant across WhatsApp, Telegram, Slack and Discord.
On privacy, the README says OpenClaw itself sends only a daily version check by default, anonymous feature statistics are opt-in, and update.checkOnStart: false turns both off. Your prompts still go to whichever model provider and chat platforms you configure.
What is OpenHands?
OpenHands is an open source platform for AI coding agents. Its current front end, Agent Canvas, is described in the README as a developer control center for starting conversations and automating tasks, such as reports published to Slack or GitHub issues split into tasks. It runs the open source OpenHands agent by default and works with any LLM you configure.
The quickest install needs Node.js 24 or later and uv:
npm install -g @openhands/agent-canvas
agent-canvasThe README marks that option with a warning: it runs the agent server directly on your machine, and the agent has full access to your filesystem. The safer route runs conversations in Docker. With Docker running and your user able to run docker commands:
npm install -g @openhands/agent-canvas
OH_CONVERSATION_RUNTIME=docker agent-canvasThere is also a fully containerised Agent Canvas image (ghcr.io/openhands/agent-canvas), opened at http://localhost:8000/canvas. The project recommends a cloud server for always-on agents and points to its SELF_HOSTING.md guide for security hardening. Need Docker first? Follow our guide to installing Docker on Ubuntu.
How does the n8n self-hosted AI starter kit work?
The n8n kit is a Docker Compose template that starts four pieces together: self-hosted n8n (the workflow builder with over 400 integrations), Ollama for local models, Qdrant as a vector store, and PostgreSQL. You build agents as visual workflows that run on a schedule or a trigger.
From the README, for a machine without a supported GPU:
git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env
docker compose --profile cpu upEdit the secrets and passwords in .env before you start. Nvidia users swap in --profile gpu-nvidia, AMD users on Linux use --profile gpu-amd, and Mac users can run plain docker compose up with Ollama installed on the Mac itself for faster inference. Then open http://localhost:5678/ to set up n8n. The first run waits while Ollama downloads a Llama 3.2 model.
Two honest notes. The README says the kit is not ready for production as it stands and is aimed at proof-of-concept projects. And the kit's Apache-2.0 licence covers the template, not n8n: n8n uses its own Sustainable Use License, which allows internal business, non-commercial and personal use but is not an OSI open source licence.
Can Open WebUI act as a self-hosted AI assistant?
Open WebUI is mainly a chat interface for local and cloud models, and many people start there. Its README lists companion projects, Open Terminal and Open WebUI Computer, that add a terminal, files and optional agents on your real machine. If you want a chat window first and actions later, it is a sensible base.
The Docker command from the official quick start:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data -e WEBUI_SECRET_KEY=your-secret-key --name open-webui --restart always ghcr.io/open-webui/open-webui:mainReplace your-secret-key with the output of openssl rand -hex 32, open http://localhost:3000, and create the first account, which becomes the administrator. Its licence is BSD-3 based but adds a clause that forbids removing the Open WebUI branding for deployments with more than 50 users in a 30 day period, unless you have permission or an enterprise licence.
Do you need a local model for a self-hosted AI agent?
No. All four projects can call a cloud model with your API key, which is the easiest way to get strong results. Running the model locally keeps your prompts off third-party servers, but agent work leans hard on the model, and small models make more mistakes with tools. Our guide to running a self-hosted LLM covers Ollama, llama.cpp and which open-weight models fit on normal hardware. If you only want a private chat app rather than an agent, see our list of free ChatGPT alternatives.
What is the catch?
Agents that can act can also do damage.
- Shell access is real access. OpenClaw runs tools on the host for the main session unless you configure sandboxing. OpenHands' no-sandbox mode has full access to your files. Use the Docker options, a separate user account, or a spare machine.
- Exposing it is the risky step. OpenClaw's README tells you to read its security guide and exposure runbook before connecting other users or opening the Gateway remotely. OpenHands binds its local mode to 127.0.0.1 by default for the same reason. Reach it over a VPN such as Tailscale rather than an open port.
- Prompts still travel if the model is in the cloud. Self-hosting the agent does not make a hosted model private.
- Not everything is OSI open source. n8n is fair-code, and Open WebUI has a branding clause. Read the licence if you plan to build a business on it.
- Local models need hardware. A big model on a weak machine is slow, and agents make many model calls per task.
Pull it. Stash it.
Questions people ask
What is a self-hosted AI agent?
It is an AI assistant that can take actions, such as running commands, editing files or calling other apps, where the agent software runs on hardware you control. The language model it talks to can run on the same machine, for example through Ollama, or be a hosted model you reach with your own API key.
Can a self-hosted AI assistant run without the internet?
Only if the model is local too. Pair the agent with Ollama or llama.cpp and a downloaded open-weight model, and the reasoning stays on your machine. Many agent tasks still reach out on purpose, such as web search or messaging apps, so check which tools you turn on.
Is OpenClaw free?
Yes. OpenClaw is MIT licensed, and its README says it has no paid tier, hosted service or token. You still pay for any cloud model you connect, or you run a local model through a provider such as Ollama.
Is it safe to let an AI agent run shell commands?
Only with limits. OpenClaw's README says tools run on the host for the main session unless you configure sandboxing, and OpenHands warns that its no-sandbox mode gives the agent full access to your filesystem. Use the Docker sandbox options, a separate user or a spare machine.
Sources
More repos like this
Get tomorrow's repo in your feed
One free, open source repo a day as a short video, shown working, with the catch named. Pull it. Stash it.







