Set up a self-hosted AI agent, the practical way.
A self-hosted AI agent runs on a machine you control, keeps its files and memory there, and does work for you without you watching. This guide explains the idea, the options, and how to set one up with Harness Maxxing.
What is a self-hosted AI agent?
An AI agent is a model that can act: read files, run commands, browse, call tools, and loop until a job is done. Self-hosted means the program, its memory and its credentials live on a server you own or rent, not in a vendor's app.
Note that the model itself usually still runs at a provider (Anthropic, OpenAI, Google and others), unless you use local models. What you host is the agent, its data and the controls around it.
Why self-host
- It keeps working when your laptop is off.
- Files, memory and keys stay on your server.
- You choose the engine and can switch it.
- You set the rules: budgets, what each agent can reach, approvals if you want any.
- One place for every project, instead of ten apps.
The main open options
All four are free and self-hosted. They differ in shape.
- Hermes Agent (Nous Research, MIT): a self-improving agent with a terminal UI and a gateway to chat apps.
- OpenClaw (MIT): a personal assistant with a gateway to 20+ chat channels and companion apps.
- Mercury Agent (Cosmic Stack, MIT): a lightweight agent with daily token budgets and permission modes.
- Harness Maxxing (fair source): a web app and harness around coding engines such as Claude Code, Codex and OpenCode, with sessions by project, agents, a browser and devices.
What you need
- A Linux VPS with about 2 vCPU, 4 GB of RAM and 40 GB of disk.
- An AI engine: a subscription you already have, an API key, or a local model.
- A domain name for HTTPS, or Tailscale, if you want to reach it from outside.
- Ten minutes.
Set one up with Harness agents
- 1Run the installer on your VPS as root. It prints a sign-in link.
- 2Open the link, set a password and 2FA, and connect your engine.
- 3Create a project and a topic for the job, for example
myshopandorders. - 4Write what the agent is for in the topic's CLAUDE.md, in plain words: its role, what it may do, when to ask you.
- 5Create the agent from the topic and pick what starts it: a schedule, a webhook, an incoming e-mail or a Telegram message.
- 6Set a daily budget. The agent runs alone; add an approval step only where you want one.
- 7Run it once by hand, read what it did, and adjust the instructions.
curl --proto '=https' --tlsv1.2 -fsSL https://get.harness-maxxing.com | bash
Jobs that suit an agent
- Sort a shared mailbox and answer the simple messages.
- Check yesterday's orders for myshop and post a summary to Telegram at 8 a.m.
- Watch a dashboard with no API through the browser and alert you on changes.
- Prepare a weekly report for yourapp.yourdomain.com and commit it to a repository.
Safety checklist
- 1Give each agent its own topic, so it only reaches its own files.
- 2Keep keys in the vault, never in prompts or files.
- 3Give each agent a budget. Approvals are optional, useful for what spends money or deletes.
- 4Back up memory to a private repository.
- 5Treat web pages and e-mails as data, not instructions.
Questions, answered.
What is a self-hosted AI agent?
An AI agent whose program, memory and keys run on a server you control. The model may still be remote unless you use local models.
Do I need a GPU?
No, unless you want to run large local models. With a hosted engine the server stays small.
Is self-hosted AI private?
Your files and memory stay on your server. Prompts go to your model provider, unless you run local models.
Which self-hosted AI agent should I pick?
Hermes Agent or OpenClaw for many chat channels, Mercury Agent for a small agent with budgets, Harness Maxxing for a web workspace with sessions, agents, browser and devices.