My solution to this is two laptops. No SSH between them, just a custom http API. Agents can run amok on the laptop without the secrets, but if they want to act as me, they have to use the API. If they need to do something not already in the API, they can add commits to the server, but I'm going to review those before I deploy that server on the laptop with the keys. This way I don't have to rely on the downstream services to have sufficiently granular permissions.
I guess I could do the same thing with VM's, but for reasons I can't fully explain it's just easier to stay vigilant with separate hardware.
Docker sandboxes support secret injection. https://docs.docker.com/reference/cli/sbx/secret/set/
They seem oblivious to secret replacement via TLS interception which are auto-supported in multiple existing microvm frameworks. These give you a straightforward way to not only shield the token but also limit the scope of the requests (eg: only particular projects on github rather than all of them, etc).
This is a fun problem! I'm checking lend out now to see if it can replace parts of a stack that I built for myself to work with both sandboxed local agents (Qwen 3.8 27B etc.), sandboxed "cheap" agents running Deepseek as well as full fledged Claude / Codex etc. I really like that it can front a SSH socket (and might solve something I'm struggling with).
It's actually a pretty interesting problem and I'm hoping to share what I've thrown together this week.
Basically you want to be able to limit access to a bunch of resources to stuff you authorize (from your phone or inside Herdr etc.) - everything from access to specific websites, search APIs, keys to your Home Assistant config ("Claude make an automation to turn off the lights when blah" is magic), to github tokens and wifi passwords etc. so that the agents themselves never see the actual key (ok not quite possible with wifi passwords but everything else is possible!).
At the same time your setup has to be simple enough that fairly dumb agents can figure it out without burning a billion tokens on every call.
For bash and python scripting I just use keepassxc-cli.
Tokens in general is "never exposed":
keepassxc-cli show --no-password -k $KEEPASS_KEY $KEEPASS_DB "GROUP_GOES_HERE/SECRET_NAME_HERE" --attributes Password
When dealing with agents, they access the tokens the same way, it is the best balance I found between keeping things safe without adding too much complexity making my life harder.
It can save tho, have the code to also save access_token to the vault the same way, so no log/execution will ever show the secrets.
Tokens the agents use, are read-only with the minimalist access.
Never ever ever grant an agent access to any token with destructive access, unless you accepted the risks.
https://imbue.com/product/latchkey is similar/related. Maybe a bit more focused on giving agents access to external services vs your own laptop.
> I often have them review each other's work too. None of them run on my laptop. They run on VMs I can throw away,
Good approach. I myself found issues with a VM approach such as latency (if the VM is in the cloud), efficiency (if the VM is local) and laziness to automate the VM creation & setup. So instead I just hand the agent an unprivileged user account in my system and stop worrying. I built a little tool to setup this: https://github.com/tarsgate/skynot
Nono does that.
Smolvm does that.
I make use of that feature which is super neat.
One problem with that though is when you need to use such a credential on a tailscale node. It bypasses the proxy of those tools.
fnox (https://fnox.jdx.dev/) is another solution which is also fantastic for day-to-day human use in the cli. It works a bit like sops but can also chain multiple encryption providers, so for example you can use an encrypted age key with a fido2 provider (a yubikey for example) as the main provider of all the secrets on your computer.
If you run for example `fnox exec gh`, fnox will ask you to touch the yubikey to decrypt the age key and decode the github token env var for the gh cli (fnox can also cache the decoded value for a bit, like gpg agent). You can tell the AI agent to use `fnox exec gh` to access gh without seeing the gh token. Or create a shell alias so it's transparent. It also has an MCP server and proxy server to filter API calls to remote APIs (I haven't tried that yet)
it supports quite a few providers (https://fnox.jdx.dev/providers/overview.html): age, fido2, AWS, Azure, Google, kubernetes secrets, vault/openbao, 1password, bitwarden, keepassxc, etc.
A lot of them are read/write so you can also use fnox to sync secrets across different systems.
Neat! Can this work with any http request as well? Being able to have all http requests route through lend and automatically inject secrets could be useful.
You’re not handing them your credentials, but you are handing them something that your credentials can do.
Too many people, including "CEO"s, are giving everything to every LLM and its just not a serious position to take - you wouldn't volunteer your teenage child's camera roll or their psychiatry notes and that's the level of intimacy full computer access exposes.
Thank you for posting and sharing this OP, its one small step in the direction of professional development with LLMs.
I let gpt run wide open on my machine with elevated permissions and unfiltered powershell access. I've been through tens of billions of tokens by now. Not once has something even remotely nefarious occurred.
Perhaps my prompts are extremely low risk and I've been incredibly lucky. What are the statistics on 100k+ powershell invokes without a single attempt to delete system32? Perhaps I'm overdue for a black swan event? In any case, I'm looking forward to it because it would finally make all this discussion seem rational rather than completely unhinged.
I was originally using Agent Vault (https://github.com/Infisical/agent-vault), but it looks like the company behind it is putting it on end of life and SasSifying it. Will give lend a try, great timing!
This is pretty interesting. I’ve been using pass and some helper scripts, but that’s local machine only.
too complex , need to ake it simple to use
Now ask the agents to get your credentials anyway and see if they succeed so you know if you have security or security theatre.
[flagged]
[flagged]
[dead]
[flagged]
[dead]
[flagged]
[flagged]
[dead]
I am all in, 100% AI psychosis. Claude cli can control a browser instance and can read/write anything from it and execute JS in it. I don’t need any mcp and I don’t need to care about authntication. Claude can just freely run JS in any tab I am authenticated in and execute, instrument JS to turn any tab into a usable API. I have automated 100% of every predictable interaction I have with the browser.
All it needs me for is to pass two factor gates. It can pull aws-cli secrets and whatever else it needs from our SSO portal after I signed in in the morning.
The desire to maintain an illusion of control over AI which is already much faster and smarter than you is hilarious to me.
Just tell it to confirm before doing writing/destroying operations (send money, send email, create kubernetes cluster, destroy sns/sqs, etc.) and you are good.
I just don’t think I agree with these designs at all. Everyone seems to be super laser focused on “not allowing their AI to have keys” when basically giving their AI direct access to what the keys enable, optionally adding a layer of ceremony in front where you tap “approve”. I’m looking at the alert that is shown there and I don’t see anything that makes me feel like it allows for an informed choice at the time of it popping up. So then, what’s the benefit?