Duco cuts agent context by 90% and onboards bank reconciliations 10x faster
Duco's bank agent had 300–400 tools, and their descriptions took up about 200,000 tokens of model memory before the user asked a single question. The team built "skills" that load on demand, and the context shrank by 90%, to 20,000 tokens. Together with the move to Amazon Bedrock AgentCore, this made onboarding new reconciliations 10 times faster. If your agent has dozens of tools, don't load all their schemas up front.
AI-processed from AWS Machine Learning Blog; edited by Hamidun News
A bank's AI agent has to reconcile data across systems, meaning it checks that records of the same deals match. For this, the Duco platform opens 300–400 tools per client, and the descriptions of all those tools (about 200,000 tokens) were loaded into the model's memory, its context, before the first question. It's like handing an employee a printout of instructions for every program in the company before each task: the more pages, the sooner they lose the thread.
Duco moved the descriptions into "skills" that load only on request. The context shrank by 90%, from 200,000 to roughly 20,000 tokens. Together with the move to Amazon Bedrock AgentCore, this made onboarding new client reconciliations onto the platform 10 times faster.
If your agent has dozens of tools, the technique is worth adopting.
Duco processes 20 billion transactions a month for 200+ clients, including 7 of the 20 largest banks and 10 of the 20 largest asset managers.
Why classic ML wasn't enough
Duco used to rely on traditional machine learning models. They suggested mappings and found patterns, and banks used them to automate more than 20,000 processes. This approach has limits. The models need a large history of data, handle new situations poorly, and have to be retrained for each scenario. Banks' data formats and business rules change constantly, and classic models couldn't keep up.
The company then rebuilt its stack on Amazon Bedrock (access to models through a single API) and Bedrock AgentCore (a managed runtime for agents). The LangChain and LangGraph code that was already running in production needed almost no rewriting. Duco assigned the models different roles. Claude Opus builds a plan for the other agents. Claude Sonnet handles exceptions and interprets rules. Claude Haiku quickly decides which tool to call. Amazon Nova 2 Pro condenses tool outputs into readable summaries for analysts. Swapping a model comes down to changing one parameter in the configuration.
How the context was cut by 90%
Each client has 300–400 tools open through AgentCore Gateway, with one MCP server for each Duco service. Their descriptions took up about 200,000 tokens before the user's first message. Answer quality dropped as the conversation grew, and the model forgot early conclusions. The team stresses that a feeling that the agent is "getting dumber" is not enough. You should run evaluation tests first and only then make engineering decisions.
The solution is on-demand loading. The team moved tool descriptions out of the static context and into MCP resources of the skill:// type. The system prompt is assembled from parts at startup (system://), and interface resources (ui://) are kept separate from working tools. Instead of hundreds of schemas, the agent got three meta-tools: load_skill loads a skill's description, find_tool finds a suitable tool without loading all the schemas, and invoke_tool calls the selected tool.
The result: the main context shrank from 200,000 to roughly 20,000 tokens. Capping the size of tool responses helped as well. The models, tools and tasks stayed the same, while answer quality by internal evaluations went up. There is also an economic benefit: the static prefix (the system prompt and the three meta-tools) is stable, and skills land in the conversation rather than in the tool list, so the prompt cache is not invalidated.
At startup, the agent receives only a list of tool names. A new microservice is registered as a target on the Gateway at deploy time, and the agent can work with it immediately, with no reconfiguration or downtime. The services themselves check permissions: the user's identity is passed along the entire chain, and every call is made on the user's behalf.
Bank isolation and results
Each client has its own set of resources: an Aurora MySQL database, an S3 bucket, KMS keys, SQS queues, a cache, a Cognito user pool, plus a separate AgentCore runtime and Gateway. Banks share no memory or context. Requests are authenticated with a JWT token from the client's pool, and traffic goes through private endpoints in a VPC.
Agents are used in two scenarios. The first is onboarding new reconciliations. Banks used to migrate thousands of processes over years, at roughly one per week. Now agents read different file formats, translate old configurations into Duco processes, and parse spreadsheet macros written decades ago. Onboarding got 10 times faster. One global bank cut its onboarding cost by 70% and raised its share of operations with no manual intervention by more than 20%. The second scenario is first-pass triage of discrepancies. The agent groups similar cases, checks whether they are already known, gathers evidence and proposes a resolution. The analyst makes the final decision, and every action goes into an audit log.
What to take away and the caveats
The practical takeaway: if an agent has more than a few dozen tools, separate tool discovery from tool invocation. The agent needs only a list of names and loads the details when necessary. The "one client, one runtime and one gateway" principle is also useful for SaaS with strict requirements.
There are caveats, too. The text was published on the AWS blog and is written as a case study: the figures come without measurement methodology and without the names of the banks. There is no data on overall token costs or on how answer quality was scored numerically. The architecture is tightly tied to AWS services, although compatibility with LangGraph and open frameworks lowers the lock-in risk. The example still shows how agents work in one of the most regulated industries.
- Nov 18, 2026Devin Bot built an Android app on its own in 44 days: 1 134 PRs from 183 messages
- Nov 18, 2026ElevenLabs Teaches Voice Agents to Hear Drug Names More Accurately: 17% Fewer Errors
- Nov 18, 2026Epic to remove Blueprints from Unreal Engine 6: AI works with code, not diagrams
- Nov 18, 2026rust-anything teaches AI agents to rewrite apps in Rust module by module
Key Questions Answered
Why classic ML wasn't enough?
Duco used to rely on traditional machine learning models. They suggested mappings and found patterns, and banks used them to automate more than 20,000 processes. This approach has limits. The models need a large history of data, handle new situations poorly, and have to be retrained for each scenario. Banks' data formats and business rules change constantly, and classic models couldn't keep up.
How the context was cut by 90%?
Each client has 300–400 tools open through AgentCore Gateway, with one MCP server for each Duco service. Their descriptions took up about 200,000 tokens before the user's first message. Answer quality dropped as the conversation grew, and the model forgot early conclusions. The team stresses that a feeling that the agent is "getting dumber" is not enough. You should run evaluation tests first and only then make engineering decisions. The solution is on-demand loading.
What are the key details on Bank isolation and results?
Each client has its own set of resources: an Aurora MySQL database, an S3 bucket, KMS keys, SQS queues, a cache, a Cognito user pool, plus a separate AgentCore runtime and Gateway. Banks share no memory or context. Requests are authenticated with a JWT token from the client's pool, and traffic goes through private endpoints in a VPC. Agents are used in two scenarios. The first is onboarding new reconciliations. Banks used to migrate thousands of processes over years, at roughly one per week.
Build & Ship Production AI Agents Without Boilerplate Code
Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.