cd /news/ai-agents/how-i-work-with-ai-agents-in-2026 · home › topics › ai-agents › article
[ARTICLE · art-181127] src=vpetersson.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

How I Work with AI Agents in 2026

A practitioner's 2026 workflow account describes running AI coding agents on ephemeral VMs built with Terraform and Ansible that live for one to two weeks before being destroyed, on the premise that agent sandboxes are "basically vaporware." The author registers a dedicated SSH key pair per VM in GitHub as both access and signing key for an audit trail, and routes third-party API and MCP access through a self-built identity-aware proxy called Agent IAP that issues per-agent credentials with time boundaries, such as granting agent5 access to a specific API only between 3 and 4 am. The author plans to shorten VM lifetimes further using ZFS snapshots restored roughly every 24 hours and to add better network tracking.

recommendation

Run agents on ephemeral VMs with per-VM SSH keys and route API/MCP access through a time-scoped identity-aware proxy so credentials never reach the agent.

more in playbook: Securing agents and AI tools
read4 min views9 publishedDec 3, 2026
How I Work with AI Agents in 2026
Image: Vpetersson (auto-discovered)

I’ve written briefly about this before, but my workflow keeps evolving. Here’s an update on how I’m working today and what I am planning next.

Like most people, I started my journey by copying and pasting code snippets into early ChatGPT. It was extremely tedious and produced what I can best describe as mediocre results. It did, however, give a glimpse into the future. Then came Cursor. We were all blown away. But most of us quickly started to realize how much the “approve command” flow slowed us down. Autonomy, or YOLO mode, was the only way to actually unleash the power of this new tool.

Ever since, the tension has been between giving the agents full autonomy and providing enough safeguards to keep them from wreaking havoc.

The utility of an agent is always directly correlated to the context it is given, be it a codebase, API access, or credentials in general.

Fast forward to today. We’ve come a long way from our early ChatGPT days of copy and paste.

Let’s start by thinking about where these agents run. We’ve seen enough evidence by now that the sandboxes in most agents today are basically vaporware. I think it is far better to assume that if you are running, say, Claude Desktop, everything on that machine will be read by Claude. Maybe it isn’t entirely true, but it’s a far better starting position than assuming the harness is working and being surprised.

So how do you solve for this?

My solution to the problem is to only use ephemeral VMs for my agents. They live for maybe a week or two, then get nuked. I’m using Terraform and Ansible to achieve this, but that’s really an implementation detail.

I am then using Multica (other people use Hermes) to schedule my tasks. I like this workflow, as I’m basically managing all my agents on a kanban board and I can use traditional project management to structure my work (such as tasks and sub-tasks). Another nice feature is Autopilot, which gives you the ability to schedule tasks. Nothing new, and there are multiple ways to accomplish this.

This, however, is where it starts to get interesting: giving the agents context without giving away the keys to the kingdom.

The first piece is Git(Hub/Lab). The way I’ve solved this is to set up a dedicated SSH key pair on each ephemeral VM. I manually register this in GitHub as both an access and a signing key. This gives me a paper trail for each agent if it were ever to go rogue. As part of this, I also manually sign into Claude and Codex.

Next is credentials in general. My stance here is that any credential leaked to an agent is compromised. Maybe overly paranoid, but better that than naive. To solve this problem, I created Agent IAP. It’s an identity-aware proxy that can grant a given agent access to a third-party service, such as an API or MCP. Each agent has its own credentials, and you can also give access to a given agent with time boundaries. For instance, you can give agent5 access to a specific API between 3 and 4 am so that it can perform an automated task.

A good example of this is sbomify Insights. Every night the database is rebuilt. The agent that does this only has access to push updates during a short window. If it misses that window, a human needs to approve the request. Again, the credentials are never leaked back to the agent.

So where do we go from here to improve things further?

There are two areas I am going to explore next: shorter lifetimes and better network tracking.

To shorten the lifetime without causing too much overhead, I am looking to leverage ZFS snapshots for the nodes. Then I could have them restore to the last snapshot every 24 hours or so, reducing the state further.

The next part is the network. I am already using an isolated VLAN for my agents. They can really only connect to the internet from there. But the internet is big, and I have no audit trail.

Without having to go down the DPI path, I’m thinking about going old school with a proxy. There are a few ways to do this. A SOCKS5 proxy gives more flexibility but less auditability. A standard HTTP proxy, like Squid, gives a far better audit trail, but comes with the trade-off that we essentially need to inject a CA cert into the workers in order to inspect TLS traffic, which creates its own set of challenges.

However, a proxy combined with Agent IAP brings us far closer to the desired state.

Stay tuned for the next update.

Enjoyed this post? Check out my podcast!

If you found this interesting, you might enjoy "Nerding Out with Viktor" - my podcast where I dive deep into tech, entrepreneurship, and security with industry experts. Found an error or typo? File PR against

── more in #ai-agents 4 stories · sorted by recency
── more on @claude desktop 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-work-with-ai-a…] indexed:0 read:4min 2026-12-03 · —