What's Missing From Your AI Agent Stack
Auth, retries, and telemetry are not the finish line. Twelve gaps enterprise teams keep discovering after the stitching layer is supposedly done, and what closes each one.
Key takeaways
- -Auth, durable execution, telemetry, trigger management, usage logs, and retries are the six items most teams build first in the stitching layer, and they are necessary but not sufficient.
- -Twelve further gaps surface once an agent runs against real production traffic: schema drift, mid-run secrets rotation, per-tenant credential selection, quota contention, spend caps, sandbox separation, data residency, approval gates, rollback, write safety, response validation, and an audit trail that survives a fix.
- -Most of these gaps are invisible in a demo because a demo runs once, against one tenant, with no shared quota and nothing expensive at stake.
- -Per-tenant credential selection is not an error case. A call can use the wrong customer's token and still look completely correct.
- -You can roll back an allow list. You cannot roll back the calls an agent already made, which is why approval gates matter before execution, not after.
Auth is connected. Retries have backoff. Telemetry is flowing into a dashboard someone actually looks at. By most teams' own definition, the stitching layer is done. Then the agent goes to real production traffic and a different list of problems shows up, one that none of those six items was built to catch. This is that list: twelve gaps we keep seeing enterprise teams discover only after the first six are already working.
The six items most teams build first
Auth, durable execution, telemetry, trigger management, usage logs, and retries. These are necessary, and teams generally do get to them. None of the twelve gaps below are solved by having them in place, which is exactly why they go unnoticed until something expensive happens.
Twelve things teams forget
- Schema and version drift. The agent was built and tested against API version one. The provider ships version two, the agent keeps calling version one until it 404s. A human reads a changelog. An agent does not, unless something is watching the spec on its behalf.
- Secrets rotation mid-run. Rotating a credential while a long-running agent is mid-flight, without the run failing partway through on the old key.
- Per-tenant credential selection. Not an error case. One customer's token used for another customer's request produces a call that looks completely correct, right up until someone notices whose data came back.
- Rate-limit and quota contention. A fleet of agents sharing one provider quota. One agent's backlog starves every other agent calling the same API, and the first symptom is unrelated agents failing for no visible reason.
- API spend caps. Enforced at execution time, or discovered on next month's invoice. Those are very different outcomes for the same missing control.
- Sandbox and production separation. Test and live keys that differ by a handful of characters in the middle of a long string, with nothing stopping a sandbox agent from reaching a live endpoint by accident.
- Data residency and PII. Which fields are allowed to leave which region, and whether putting a value into a model's context counts as a transfer for that purpose.
- Approval gates for irreversible operations. The difference between a reversible write and a permanent one is not visible to the model from the tool call alone. Something outside the model has to know which operations need a human before they run.
- Rollback. You can roll back an allow list in seconds. You cannot roll back the calls an agent already made before the list changed. This is the gap least often planned for, and the one that turns a bug into an incident.
- Write safety on retries. A retry is not the same thing as an idempotent retry. A write retried without an idempotency key is a second refund, not a second attempt at the same one.
- Response validation. A 200 status code is not proof the action happened. Plenty of APIs return success at the transport level while the body reports a failure the caller never checks.
- An audit trail that survives a fix. Stage six of the build journey means re-verifying stage three after every change. That re-verification needs a record of what the old pipeline actually did, not just a memory of what it was supposed to do.
Why none of this shows up in a demo
A demo runs once, against one tenant, with no other agent sharing the same provider quota, and usually against test data where a duplicate write costs nothing. Every one of the twelve gaps above needs scale, time, or multiple tenants to surface. That is exactly the condition enterprise production traffic creates and a demo never does.
Where each gap gets closed
| Gap | Closed by |
|---|---|
| Schema and version drift | Schema validation against the live API on every call, not just at build time |
| Secrets rotation, per-tenant credentials | Credential brokering resolved at execution time, never baked into the agent's context |
| Quota contention, spend caps | Argument-level policy that can read the call and hold or deny it before it runs |
| Sandbox and production separation | Mode set once at the project level, not passed around as a variable the agent could get wrong |
| Approval gates, rollback | Fail-closed human approval on specific operations, enforced before execution |
| Write safety, response validation | Idempotency keys on writes and response checks that look past the status code |
| Audit that survives a fix | A local, append-only record of every call and every policy decision, independent of application code |
FAQ
We already have retries and telemetry. Why isn't that enough?
Retries and telemetry tell you that something ran and whether it failed. They don't tell you whether a retried write duplicated a charge, whether the call used the right tenant's credential, or whether an irreversible operation should have been held for a human first. Those are different problems with different fixes.
Which of these twelve gaps matters most first?
Write safety and approval gates on irreversible operations tend to be the ones that turn into real incidents fastest, because they are the two where a missing control cannot be undone after the fact. Start there, then work outward to quota and schema drift.
Do we have to rebuild our stitching layer to close these gaps?
Not necessarily. A runtime that sits underneath your existing framework, catalog, or MCP server can add allowlisting, policy, credential brokering, and audit without you rewriting the agent's reasoning or the connectors you already built.
Related reading
- How enterprises actually build AI agents in 2026, the full seven-stage path: swytchcode.com/content/how-enterprises-build-ai-agents-2026
- API governance tools for AI agents: swytchcode.com/content/api-governance-tools-ai-agents
- Idempotency explained, how duplicate charges and duplicate emails actually get prevented: swytchcode.com/blogs/idempotency-explained-how-swytchcode-prevents-duplicate-charges-and-duplicate-emails
- How to set up policy guardrails for AI agents: swytchcode.com/blogs/how-to-set-up-policy-guardrails-for-ai-agents-with-swytchcode
More content
How to Log Every API Call an AI Agent Makes
Log the call where it is sent, not where it is described. Record the operation, the actor, the idempotency key, the policy decision and the outcome. Never record the credential. If the agent writes its own log, the calls that were blocked quietly disappear.
How to Connect GitHub to an AI Agent (2026)
Most of what you want an agent to do on GitHub needs no push access at all. Working that out first is the difference between a useful teammate and a token that can rewrite your main branch.
Composio Pricing Compared with Nango, Arcade, Pipedream, and Swytchcode
Composio is free for 100,000 tool calls a month, then $29. Nango is $50 pay-as-you-go. Arcade Team is $25 plus a cent a call. Pipedream Startup is $99 billed annually. Swytchcode is $149 for a million. The headline prices are the least useful part, so here is the arithmetic.
