Where does an AI agent run?
When people say an AI agent is "running", it is fair to ask: running where? The answer decides whether your agent keeps answering when you close your laptop, what happens during a power cut, and who looks after it. Here is a plain guide to the places an agent can run, what each means day to day, and which parts of your set-up keep going no matter what.
In one sentence
An AI agent runs wherever its program is kept going: inside a chat app on the company's own servers while you have a conversation open, on your own computer, or on a small server that stays on all the time. The place matters because the agent only works while that machine is on and the agent is running there.
In more detail
It helps to separate two things: where the AI model does its thinking, and where the agent that uses it is kept running. The model behind Claude, ChatGPT or Grok runs in the AI company's data centres, and you reach it over the internet. The agent is the program that decides what to do next: read this message, look at the notes, send that reply. That program needs a home.
With a chat app, the home is the chat itself. When you open Claude or ChatGPT and ask it to deal with your messages, the agent works for as long as that request takes, then stops and waits for you. Nothing runs between your requests. That is why a chat app does not answer customers while you sleep.
With an always-on agent, such as Claude Code, Codex, OpenClaw or Hermes, the home is a computer you choose. It might be the laptop on your desk, a small computer in the shop that never sleeps, or a server you rent from a hosting company. The agent keeps running there, waiting for new messages and dealing with them, for as long as that machine is on and the agent has not been stopped.
This is where the word "machine" comes in. If the laptop goes to sleep, the agent sleeps. If the shop computer restarts for an update, the agent stops until someone starts it again, unless it has been set up to start by itself. A rented server avoids most of this, because it is built to stay on, but someone has to set it up and keep an eye on it.
The good news is that your connected accounts and the messages themselves do not live on that machine. The example below shows a night when the shop computer running an always-on agent switched off. Names and details are examples.
An example
| Time | What happened |
|---|---|
| 22:10 | A power cut at the bakery turns off the back-office computer running the always-on agent. |
| 22:30 | Two customers send WhatsApp messages. They arrive in the account as normal and wait. Nobody replies yet. |
| 06:00 | A scheduled message reminding a café customer about their order pick-up goes out on time, because scheduled messages are kept and sent by Spaces, not by the shop computer. |
| 07:15 | The owner arrives, sees the computer is off and turns it on. She starts the agent again. |
| 07:16 | The agent reads what came in overnight and answers the two waiting messages, apologising for the slow reply. |
The main places an agent can run
| Where | Example | Keeps going when you are away? | Who looks after it |
|---|---|---|---|
| A chat app in the browser or desktop app | Claude, ChatGPT, Grok | No, it acts when you ask in a chat | The AI company runs it; you start each job |
| Your own laptop | Claude Code or Codex in the terminal | Only while the laptop is on, awake and the agent is running | You |
| A computer in the shop that stays on | An always-on agent left running | Yes, until it sleeps, restarts or loses power | You or whoever helps with your IT |
| A small rented server | OpenClaw or Hermes on a server | Yes, it is built to stay on | Whoever set it up, such as a freelancer or agency |
There is no single right answer. A café owner who checks messages at the counter may be perfectly served by a chat app. A guest house that gets late-night booking questions may want an always-on agent on a server.
What keeps running even when your agent stops
It is easy to assume everything stops when the agent stops. Most of it does not.
- Your connected accounts stay connected. Messages keep arriving in WhatsApp, Instagram, LinkedIn, Messenger, X and email as normal.
- Scheduled messages and routines are kept and run by Spaces, so they go out on time without your agent's machine.
- The account limits and pacing stay in force, whichever agent sends next and whenever it starts.
- New events wait to be picked up. When the agent starts again, it can catch up on what arrived.
What stops is the thinking: reading new messages and writing fresh replies. That is the part that needs the agent running.
Questions to ask before you choose a machine
- Do customers write at times when nobody is around, and does a quick answer then actually help?
- Is there a computer that can stay on, awake and connected all the time, and is it safe from being switched off by accident?
- Who will notice if the agent stops, and how quickly?
- Who will update the agent and restart it after a change?
- Is the machine locked and private? An agent on it can read and answer your customer messages.
If you cannot answer the second and third questions yet, a chat app plus routines for simple after-hours replies is a sensible start.
Sample notes for a person setting up a server
If a freelancer or agency is setting up an always-on agent for you, a short written brief avoids surprises. Names and details are examples.
Please set up our always-on AI agent on a small server.
- It should start by itself after a restart or update.
- It answers WhatsApp and Instagram for Harbour View Guest House.
- Connect it to Spaces with its own sign-in or key, not mine.
- If it stops for more than 15 minutes, email me at owner@example.com.
- Keep the server locked down: no other software, no shared logins.
- Write down how to stop it and how to start it again, in plain words.Common mistakes
- Running an always-on agent on a laptop that goes to sleep when the lid closes, then wondering why nothing was answered overnight.
- Forgetting that updates restart computers. Set the agent to start again by itself.
- Having nobody responsible for noticing when it stops.
- Sharing one login between the agent and a person. Give the agent its own access so you can see and pause it separately.
- Leaving the machine open to anyone in the shop. It holds access to your customer conversations.
Why it matters for your business
- Where the agent runs decides when your customers get answers, not just how good the answers are.
- Knowing what keeps running without the agent stops you panicking when it goes quiet.
- A machine that sleeps or restarts quietly is the most common reason an always-on agent stops replying.
- Choosing the right home early saves paying someone to rebuild the set-up later.
- The machine holds access to your messages, so keeping it secure is part of keeping customers' trust.
How Spaces handles it
Spaces itself runs in the cloud and keeps your accounts connected whether or not your agent is running. Your AI agent reaches it through the MCP server from wherever the agent lives: a chat app, your laptop or a server. The agents page has setup steps for Claude, ChatGPT, Grok, Cursor, Codex, Claude Code, OpenClaw and Hermes.
For an always-on agent, Spaces offers a way to wait for new messages without checking the platforms over and over. The agent asks Spaces to wait for the next event and gets an answer the moment something new arrives. An agent on a server can instead have each event sent to its own web address. When an agent comes back after being off, it can read what arrived in the meantime.
Scheduled messages and routines are kept and run by Spaces, so they carry on when your agent's machine is off. Every send, from any agent or routine, is paced and counted against the account limits. If you need everything to stop, Pause everything in Settings stops every send at once, wherever your agents run.
In short
The model thinks in the AI company's data centres. The agent runs wherever you keep it going: a chat you open, your own computer, or a server that stays on.
Pick the home that matches when your customers write and who can look after it. Your accounts, scheduled messages and routines keep going either way.
FAQ
Does my AI agent run on my phone?
A chat app on your phone can do work while you have a conversation open, then stops. An always-on agent usually needs a computer or server that stays on. The phone is a fine place to read summaries and approve drafts.
What happens to messages when my agent's computer is off?
They arrive in your accounts as normal and wait. When the agent starts again, it can read what came in and reply. Nothing is lost, but customers wait until it is running again.
Do scheduled messages need my computer to be on?
No. Scheduled messages and routines are kept and run by Spaces, so they go out on time whether or not your agent is running.
Should I rent a server for my agent?
Only if you want an always-on agent and have someone to set it up and keep an eye on it. Many small businesses do well with a chat app plus routines for simple out-of-hours replies.
Is it safe to run an agent on the shop computer?
It can be, if the computer is locked, used by few people and kept up to date. Remember that the agent can read and answer customer messages, so treat the computer like a till.
How do I know if my always-on agent has stopped?
Ask whoever set it up to send you an alert if it stops. You can also check whether the latest messages have been answered, for example by asking a chat app connected to Spaces to list unanswered conversations.
Can I move my agent from my laptop to a server later?
Yes. The agent connects to Spaces the same way from either place. Give the new copy its own sign-in or key, check it works, then remove the old one.
Where do my messages live?
In your own accounts on WhatsApp, Instagram and the rest. Spaces keeps an up-to-date copy so reading puts little pressure on the platforms. The agent's machine does not need to hold them.