Docs Guides
Rules and actions
Phigon gives you three ways to control what AI agents do: rules that block or pause a step before it runs, actions you take on an agent or a computer, and "whenever" rules that Phigon AI follows for you.
Rules
On the Rules page, choose New rule and fill in one sentence:
| Part | Choices |
|---|---|
| What the agent does | Run a command, delete a file, change a file, read a file, connect to a server, open a web page, use a password or key, start a program, use an AI model, or start at all |
| Matching | A pattern, such as rm -rf *, /etc/**, **/.env, https://*.example.com/** or gpt-* |
| Where | Every computer, or one |
| Which agent | Any agent, or one |
| Then | Block that step, Ask me first, Block and stop the agent, or Block and force-stop the agent |
Add a reason, such as "deleting outside the project is not allowed". Each rule has an on/off switch.
Where rules apply. Phigon applies rules to each step an agent asks it to check, and to the agents it finds running on each computer. Agents ask when they are started through Phigon's Guardian (below) or use a tool that asks before each action. Steps an agent takes without asking appear in Activity but are not blocked. The page lists Where rules apply for each computer.
- Ask me first pauses the step. It appears under Waiting for your answer until you allow or refuse it.
- Rules are matched exactly and need no AI model.
- Phigon fails closed: when a computer can't get a verified answer, the step does not run.
Guardian on a computer
Guardian is the part of the observer that asks your rules before an agent acts. Nothing on the computer can loosen your rules. Start an agent through it:
phigon-observer guardian launch --agent claude-code:worker-1 --model anthropic:claude-opus-5-5 -- claude
Or run one command through it, recorded with its output and exit code:
phigon-observer guardian exec --agent codex:worker-1 -- npm test
Tools that manage agents can ask about one action at a time with phigon-observer authorize-action. Each of these exits with code 77 when the step is blocked or Guardian can't give a verified answer; nothing runs then.
From observer 8.12.0:
- Commands get a minimal environment: paths, locale, terminal, proxy and certificate settings. Name any other variable a command needs, comma separated, in
PHIGON_GUARDIAN_ENV_ALLOW. Variables that make a program load other code, such asLD_PRELOADorNODE_OPTIONS, are never passed. - Runtime limits on Linux need kernel 6.12 or newer, or a separate
run_asaccount for the agent. Otherwise the launch is blocked, because the agent could pause Guardian so the limit never fires. - When a run ends, every process the agent started is stopped.
- Everything after
--belongs to the program, never to the observer.
Actions
On the Actions page, choose what to do, where, and to which agent, add a reason, and choose Do it:
| Action | What happens on the computer |
|---|---|
| Stop | Asks one running agent to stop, with the processes it started. |
| Force-stop | Ends the agent at once. |
| Block | Stops the agent on that computer whenever it starts, for the time you choose or until you unblock it. |
| Run a command | Runs a program with its arguments, without a shell, for up to 120 seconds, and returns up to 32 KB of output with secrets removed. |
| Check the computer | Reports the operating system, memory, uptime, CPU load, disk space and each running agent. Never file contents, environment values or command lines. |
| Restart or Shut down the computer | Scheduled, and announced to the person a minute ahead. |
When an agent runs more than once, such as Claude Code in two terminals, you can stop all its copies at once, on one computer or on every computer. History shows each action and what the computer reported: Done, Failed, The computer refused it or Expired before it ran.
A stop acts on one exact process: its process ID and start time, checked again just before anything is sent. If the agent had already stopped, nothing else is touched.
What each computer allows
Whoever connects a computer decides what you may do on it:
| How the computer was connected | Stop agents | Commands, checks and restarts |
|---|---|---|
| The person paired it at the prompt | Yes | Yes |
The person paired it with --accept-consent |
Only with --remote-actions stop-agents or all |
Only with --remote-actions all |
| Your company enrolled it with a code | Yes | Yes |
--remote-actions stop-agents or none on the pair command allows less. On the computer, PHIGON_REMOTE_ACTIONS_ENABLED=false and PHIGON_REMOTE_COMMANDS_ENABLED=false take it back; they never allow more than the consent. Computers paired by an observer older than 8.8.0 allow neither until they pair again.
The person at the computer sees a system notification each time Phigon stops or blocks an agent, as a command starts and when it ends, and before a restart, with your reason.
"Whenever" rules
To act every time, choose Stop, Force-stop or Block on the Actions page, then Whenever it…, and describe what the agent does in your own words, for example:
- "pushes to main"
- "deletes files outside its project"
- "reads .env files or keys"
- "installs unknown software"
Phigon AI then reviews the steps of the agents the rule covers. When it is sure enough that a step matches, it raises an alert and stops, force-stops or blocks the agent as the rule says; otherwise it does nothing. These rules need an AI model: choose one in Settings › AI. Each rule has an on/off switch.
How Phigon AI decides
Phigon AI answers typed questions; Phigon's server alone decides what happens. Your rules, limits and "never allow" choices are enforced in code whatever the model answers, and checked again against the current rules right before anything is applied. When Phigon AI reviews a request and can't decide, it leaves the request to you.
- It sees the steps of the agents a rule covers: commands, file paths, web addresses, and prompts and replies, each cut to 500 characters. Anything the observer withheld stays withheld.
- It makes at most 60 reviews an hour for your company, and never reviews history a computer is catching up on.
- It uses the AI you chose in Settings › AI: Phigon AI (included with your license) or your own provider.