Learn
Managing API keys across many agent workspaces
Last updated:
In short
When agents run for many clients, credentials sprawl: the same key is copied into folder after folder, .env after .env, skill after skill.
Operators often end up with keys spread across dozens of separate folders — every copy a place to leak, a file to rotate, and a chance to act on the wrong client. Tenant-aware runtime access replaces the copies: connect each project once, and agents request approved actions instead of holding keys.
See access resolved inside one client workspace.
The walkthrough shows how a worker requests an action in its workspace and receives a recorded outcome. Use it alongside the multi-workspace setup guidance below.
- Workspace-scoped action requests
- Labeled dashboard views and recorded denials
- Redacted API evidence
Create your trial, then install on your company-controlled Mac. Set up your first workspace.
56 seconds · One request, the right client · No form required
The opening is an architecture illustration. Dashboard views and recorded denials are labeled in the video; API evidence is redacted. Shown campaign execution stays PAUSED.
One agent, one key is easy. The pain shows up when you run agents for ten, twenty, thirty clients — and the same credential management approach that felt fine at one client quietly turns into a sprawl you cannot keep track of.
Credential sprawl across client workspaces, concretely
A client workspace is not a folder — it is an agent operating environment, with its own instructions, skills, scheduled tasks, sandbox limits, and access rules. Multiply that by every client and the credential picture looks like this:
- •The same API key copied into
.envfiles across dozens of client folders. - •Keys also living in Docker configs, local notes, and setup docs you forgot existed.
- •Skills copied from one client that still point at the previous client's account.
- •Separate OAuth identities and refresh tokens per client, each its own re-auth flow.
- •The same sprawl repeated across every agent runtime the team uses — Claude Code, Cowork-style sandboxes, n8n — each with its own copy of the same credentials.
- •API services and media/file access (Drive, Shared Drives, ad platforms, CRMs) all sprawling the same way, not just one credential type.
- •No single answer to "which agent used which service for which client?"
Every copy is another surface to leak from, another file to rotate when a key changes, and another chance an agent reaches for the wrong client's credential.
Three risks that stack up with scale
Sprawl
Keys end up spread across folders, Docker configs, local notes, and project files — too many to track.
Humans pulled back in
Agents stop and ask for credentials, turning the operator into the runtime access person for every client.
No clean audit
When something goes wrong, it is hard to know which agent used which service for which client.
Replace the copies with tenant-aware runtime access
The fix is to stop distributing the credential at all. Keep secrets in a secure local backend, connect each client project once, and let agents request approved actions:
- ✓One tenant-safe access layer per workspace — no per-folder key copies.
- ✓Wrong-client access is blocked by policy before any backend call runs.
- ✓A redacted per-client audit of what ran for whom.
- ✓Onboarding a new client connects a project — it does not hand out a new key.
The agency-global credential model
Some credentials genuinely belong at the agency level, not the client level — a shared tool the whole team uses across every account. The fix for sprawl is not to fragment those into per-client copies either. Instead, one agency-global credential is stored once and pinned to the right downstream account per client workspace: the login is shared, but each workspace only ever resolves to its own client's account. This is the same credential broker pattern applied to the agency's own shared tools, not just per-client ones.
This is exactly the agency case — see Outloop for AI agencies, the broader guide to AI agent API key management, or why .env files break down in the first place. Outloop is available with setup guides and product support for agency teams; the Mac app is signed with a Developer ID and notarized by Apple, and two-Mac reproduction was first verified with release v1.1.6 on 24 July 2026 (a historical milestone, not a statement about the current release).
Real execution: approved requests run, the wrong resource is refused
One demo workspace, one set of agency credentials for Google Ads and Meta Ads. Requests for the workspace’s approved accounts execute; a request for another account or campaign is refused. The credential stays in Outloop throughout.
Swipe sideways to read the log · open full size
Allowed: approved API work executes
- Demo Workspace 018 · Google Ads and Meta Ads requests
- Every row: Allow · OK — including grouped batches of 10 and 14 requests
- The approved requests returned results in this client Workspace
Swipe sideways to read the log · open full size
Refused: these wrong-resource requests did not run
- Deny ·
RESOURCE_ID_NOT_ALLOWED(google_ads and meta_ads) — the request named an account outside this Workspace’s approved resources; the requested action was refused - Deny ·
META_OBJECT_NOT_APPROVED(meta_ads) — a campaign, ad set or ad that does not belong to the approved ad account; the requested action is not sent to Meta - Approved requests in the same workspace keep executing around the refusals — Allow · OK
Real execution in an Outloop demo workspace (workspace 018), published in the September 26, 2026 proof pack — not a customer case study, and not evidence of ad spend, delivery or performance. Enforcement covers requests routed through Outloop. See the runtime access walkthrough for the recorded flow.
What Outloop enforces — and where the boundary is
What Outloop enforces
- Every request routed through Outloop is matched to its workspace’s tenant and approved services before the credential is read.
- Where a resource binding is configured — a Google Ads customer ID, a GA4 property, an ad account — a request for any other account is refused with
RESOURCE_ID_NOT_ALLOWEDbefore any backend call. - The agent receives a redacted result, never the credential (
secret_exposed: false). - Every allow and every denial is written to a redacted local audit.
What it does not guarantee
- It cannot police a key, tool or connector the agent reaches outside Outloop — remove those routes from client folders.
- It enforces what you configured: if a workspace is granted the wrong account, Outloop enforces that grant.
- It does not judge whether an allowed action is a good idea — strategy, content and spend decisions stay with your team and your review rules.
- It is not a certification or a guarantee against every possible mistake. See the security model.
What you still configure
- Once, for the agency: add each credential to Outloop (stored in macOS Keychain on your Mac) and connect your approved agent runtimes.
- Per client: a workspace, its approved services, the resource binding for any shared credential, and the client’s Context.
- Per client, before real work: one test request that is allowed and one that is refused.
- Reusing a workflow does not skip that onboarding — a new client never inherits another client’s access.
Is this for you?
A good fit if…
- You run AI agents for several clients, and at least one credential can reach more than one client.
- Agents run in loops or on schedules where nobody watches each call.
- You want to show a client exactly which requests touched their account.
You may not need Outloop if…
- You serve one client, or every client already has fully separate credentials, machines and agents.
- Your agents only draft text and never call a client system.
- You need a hosted, cloud-only service with no company-controlled Mac.
- You need a compliance certification on file before you start.
Stop copying keys into every client folder.
Outloop is available with setup guides and product support for AI agencies, operators, and dev shops.
Start 14-day trial