In this next installment of our secret agent series, our agents are doing reconnaissance on the competition.
An AI agent on its own can think and plan, but it won’t work correctly until it’s integrated into your systems, your data, and your tools. Integration is the spy network. Without it, your agent is a brilliant mind talking to itself and burning tokens.
Their mission: Win back your market share.
Arch-Nemesis Inc. is the competitor quietly cornering your market. They’re undercutting your pricing, winning your accounts, closing the funding rounds you wanted. They’re always one step ahead.
To begin your mission, you decide to build a team of agents. Some agents run recon on Arch-Nemesis Inc.; others keep tabs on your own operation.
One agent shadows Arch-Nemesis filings and flags every capital raise or M&A signal the moment it happens. Another scrapes competitive intel and tracks their announcements. A third models their pricing before your salesperson walks into a deal.
The agents watching your operation handle the internal intelligence, tracking the pipeline, how deals move, and where they stall.
Every one of them reports back so you finally see the big picture and can accomplish the mission. But something's gone wrong. The connections aren't being made, and the token bill keeps climbing. Your mission intelligence isn't working.
Every agent needs a quartermaster
In the field, there's a quartermaster, Q. He knows every gadget on the shelf, issues the right one for the mission, logs what went out, and makes sure it comes back.
In this case, your agents have no Q.
Picture a spy operation where the agent has to recite the entire mission on every phone call. Disconnected AI agents can work the same way.
As an example, if you have a 50,000-tokens, the user's question takes about 300 tokens, under 1% of the request. The rest is context potentially re-sent each time one of the agents needs information, and the percentage breakdown should look similar to this:
- Retrieved documents: roughly 40%
- Conversation history: roughly 30%
- System prompt: roughly 20%
- Tool definitions: roughly 10%
The mix varies by workload, and tool-heavy setups tend to cost more. Multiply that across a fleet of agents and costs climb, while tracing the bill to a specific agent, team, or model gets difficult.

Google’s Apigee AI Gateway plays Q for your agents
Every request to a model, a tool, or a system goes through the Apigee AI Gateway, which comes equipped with:
- API Hub. The catalog of every tool and system an agent is cleared to use. An agent requests the one it needs, and only that one.
- Application Integration connectors. More than 150 connectors wire your agents into the real systems, across SaaS, on-premises, and legacy.
- Apigee security, with Model Armor. Enforces identity, threat protection, PII masking, and prompt-injection defense with every call.
- Apigee tracking and token quotas. Per-agent, per-team, and per-model tracking shows who spent what, how often, and what it cost. Quotas cap the spend.
- Apigee caching. Enables LLM context caching for repetitive instructions and tool descriptions, while reusing saved answers to skip the model entirely via semantic caching.
Now picture the agent team you built taking on Arch-Nemesis Inc. with the Apigee AI Gateway in place:
- The agent shadowing their filings stops paying to resend the same instructions each time.
- The competitor-scraping agent can't run up the bill in an endless loop.
- The agent modeling their pricing can only reach the systems it's approved to use.
- The agents watching your operation are wired into the systems where your deals live.
Now that every agent can reach what it needs, only what it's cleared for, and answers for what it spends, the mission can begin.
After the Apigee Gateway is in place, next comes the orchestration layer on Gemini Enterprise, where every agent is briefed, in contact with the others, and running the mission together. We tackle this in our next article: Your Agents Started Running Their Own Operations and Now You're Losing Deals.
SoftServe is a Premier Google Cloud Services Partner.
Previous: Your Agent Just Lied to the Board and You Don't Even Know It Yet





