AI agents are at their best when you stop babysitting them. Anyone who has used one for real work knows the shape: approve every command one at a time and you've bought a very slow autocomplete. Let it run and it reads the logs, chases a hypothesis, tries three things, hits a dead end, tries a fourth, and comes back with an answer while you were in a meeting.
That freedom also lets mistakes reach further. An agent with production access can delete a database, wipe a volume, or "clean up" the wrong directory.
For coding, a sandbox limits what the agent can reach. Tools like co:op (our founder built it, so we're biased) run the agent inside a container with limited access to files and services. It can still change the project you share and send files it can read to its model provider. Keep secrets out of reach and review the changes before using them.
A sandbox around the agent won't undo a DROP TABLE
it runs against your production database. To work on live infrastructure, the agent needs
limits on which actions it can run there.
You start by copy-pasting
The first version of "AI for ops" at most teams involves no access at all: you paste a log or a screenshot into the chat, the model suggests a command, you copy it into a terminal, run it, and paste the result back. The model never touches your servers this way, and nothing runs unless you run it. For one-off troubleshooting, it's fine.
But you are the whole loop. You carry the context one way and the commands the other, and the model only knows what you remembered to paste. You are also the only check, and that check decays: the first unfamiliar command gets read carefully, the tenth gets skimmed, and eventually "review" is just paste-and-Enter on a script you didn't really read. By then, generated code reaches your shell through a reflex. The copy-paste AI ops comparison looks at when this approach is enough and when it gets in the way.
Give the AI agent direct SSH access
The obvious upgrade is a shell. And when agents run without a sandbox, sometimes you grant it
without knowing: the agent finds your gcloud
already authenticated, or finds your SSH keys, and connects to production. The agent already
knows how to use SSH, so there's little setup. The risk is how much that connection lets it do.
With unrestricted production access, the model can do anything your account can do. It decides whether to tail the logs or delete the data directory. A prompt-injected log line can steer that decision. Without separate session recording, the shell history may be your only record of the commands. See the comparison with unrestricted SSH access.
SSH access brokers can limit commands, require approval, record sessions and issue short-lived credentials. Keeping the private key away from the agent prevents it from copying the key. You still need to limit what it can do through the connection, including command arguments and whether it can start another shell.
An MCP server per tool (better, until you count them)
The better instinct is MCP: give the agent tools with defined inputs instead of a shell. There's an MCP server for Postgres, one for Kubernetes, and one for your cloud. Choose tools that limit which actions and arguments the agent can request. An MCP server that exposes an unrestricted shell gives you the same problem through a different interface.
Each server brings its own setup, credentials and upgrades. Access controls and audit logs vary too. You have to bring them together to answer two questions: what can the agent do right now, and what did it do last Tuesday? MCP defines how tools are called, but each server decides how to control access.
Coverage matters too. A server for your database may be easy to find, while a safe tool for your RAID controller or the vendor appliance in rack 4 takes work. You need to review what each tool can run and which credentials it holds. Leaving unrestricted SSH available "just for the rest" gives the agent a way around the limits you set elsewhere.
Where emisar fits
emisar gives the agent one catalog of actions. Each action defines a command and the arguments it accepts. Actions can read service logs, check replication lag or restart a unit. The pack catalog covers databases, queues, proxies and containers, along with host tasks such as checking ZFS pools, WireGuard tunnels and clock sync. You can add your own host commands as actions.
Your access-control rules decide which actions run, which wait for approval and which are denied. One audit log keeps every request with its inputs, the decision and who asked, including denied requests. For actions that ran, it also keeps the redacted output.
The agent can use the same actions through the CLI or MCP. Use the CLI from a terminal or script, or connect an AI client that supports MCP tools. A runner on each host connects out to the control plane, checks every argument again and applies your redaction rules before returning the output. The security model explains why the host, not the cloud, gets the last word.
When a storage driver wiped 33 hours of metrics, the agent traced the loss and prepared a Terraform fix. Follow the investigation to see what the agent ran and where an operator stepped in.
Read production, write code
If you manage infrastructure as code, the agent can investigate production and prepare the fix in a pull request. We use Terraform a lot, and this is our preferred workflow.
Let the agent run the diagnostic actions it needs without waiting for you. Choose those actions for the information they expose: logs and query results can contain credentials or customer data. Reading is most of the job: tail the logs, check the failing unit, compare replication lag across replicas, watch the error rate move. The agent keeps its eyes on real production while it investigates, so it doesn't work from stale dashboards or ask you to paste the output.
The agent writes the Terraform diff or the Ansible change back in its own sandbox and opens a pull request. The fix then ships through review and your pipeline like any other change. Production stays declarative and reproducible, so you don't wake up to a prod that an agent hand-patched into a snowflake nobody can rebuild.
Some incidents need an immediate change: restart a stuck service, fail over or stop a runaway query. Set those actions to require approval. You review the command and its target, then approve it without having to type it yourself. Use staging to test risky changes before they reach production.
Try it on a dev host
Run your coding agent in a sandbox such as co:op. Use the quickstart to connect it to emisar. Then follow the nginx walkthrough with a disposable container. Give the agent permission to read the logs and set restarts to require your approval.
Ask the agent to find your request in the access log. Then ask it to restart the container. You should see the log entry right away and a restart waiting for you in Approvals. After you approve it, check that nginx responds again and open the run to see which command the agent ran on which host.