What to Think About When Running an AI Agent 24 Hours a Day
Design for keeping something running when you can't fully predict what it will do next. It covers how to narrow its permissions, how to put a brake on runaway costs, and why you should decide how to stop it before you start it.

Ren

Procura

Procura
What to prepare
- Set limits on the number of runs and the run time, and stop when they're exceeded
- Narrow what it can do. Don't easily allow things like "delete files" or "send email"
- Limit where it can connect to outside to what's necessary
- Put human approval before important operations
- Always log what it did. If you can't trace it afterward, you can't find the cause

Ren

Procura
Watch out for runaway costs too
Procura

Wilson

Procura
Decide how to stop it first
Something that runs autonomously also keeps going autonomously when it does something unexpected. You need a means to stop it right away when you notice something wrong. Killing the process, disabling the API key, cutting the network. Decide which you'll use before you start running it. If you look for it after it starts moving, you won't make it in time.

Procura
- A mechanism to stop it immediately by hand (a state where one setting stops it)
- Set a time limit on a single run. Cut it off when exceeded
- A cap on runs per day. If exceeded, don't run it until the next day
- Make it stop automatically after consecutive failures
- A notification so you can tell that it stopped
The VPS as the place to run it

Procura
- Use a process manager to restart it automatically if it goes down
- But set a limit on the number of restarts so it doesn't restart forever
- Keep the log of what it did outside the server as well
- Narrow the permissions of the user it runs as. Don't run it as root

Ren
This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.