One Reschedule Touching Four Systems: Consistency Design for Cross-System Agent Calls
"Nobody's home this Friday—change it to Saturday morning." This single sentence, for an agent, touches far more than one system: the order system reschedules, the warehouse re-picks and re-plans, transportation adjusts the delivery route, and if the reschedule fails, after-sales has to catch it. The most embarrassing failure: the order system returns "rescheduled", transportation times out without confirmation, the agent keeps retrying, and the transportation system ends up with two Saturday delivery tasks while the original Friday task is never cancelled—the user asked to "change once", the system delivered "double coverage". This is not the model being dumb; it is cross-system invocation missing a consistency design.
This post is part of the "AI Customer Service Product and Engineering Practices" experience-sharing series, drawn from a practice review of an AI customer service product at a leading logistics company. In this post I want to share a multi-system tool invocation architecture for an AI Agent that calls the order, warehouse, transportation, and after-sales systems at the same time, and how it solves interface timeouts, duplicate execution, state inconsistency, and cross-system transaction failures. This is the engineering gate a logistics agent must pass on the way from "can query" to "can get things done".

Five Key Design Points in Cross-System Consistency
- Architecture layering: the three layers—agent, tool gateway, business systems—each with cleanly separated responsibilities.
- Stability design: combining timeouts, rate limiting, degradation, and asynchronization.
- Idempotency and deduplication: idempotency keys, dedup tables, session locks, pre-execution state checks.
- Consistency design: state machines, state queries, scheduled reconciliation—accepting eventual consistency rather than forcing strong consistency.
- Distributed transaction understanding: the applicable boundaries of Saga / TCC, compensating transactions, and human fallbacks.
The Overall Design
In this effort, I would first cut responsibilities cleanly, then talk consistency—jumping into distributed transactions with muddy layering only stirs the problem further. The overall approach in one sentence: three layers with clear duties, tiered timeouts with fast failure, idempotency against replay, reconciliation for consistency, and compensation as the cross-system safety net.
Step 1: Slice the architecture into three layers
The agent layer only understands and orchestrates, never touching business state; a middle tool gateway unifies protocol, authentication, rate limiting, routing, logging, and error codes; the order, warehouse, transportation, and after-sales systems are the single source of truth. The core principle: the agent does not cache or re-process business data on its own, avoiding manufacturing state inconsistency itself.
Step 2: Tiered timeouts, slow operations go async
Set tiered timeout budgets for every tool, covering both a single call and the whole task chain; fail fast on timeout instead of retrying without bound. Slow operations become async tasks + callbacks or polling, querying real state by task ID, paired with degradation strategies—so one slow interface never hangs an entire conversation.
Step 3: Idempotency keys plus dedup tables against duplicate execution
Build the idempotency key from "business order number + operation type + logical request identifier": a retry of the same request reuses the same key, while a new legitimate reschedule from the user gets a new key—using only "waybill number + operation type" would wrongly block later operations. Persist a dedup table on the server side, paired with parameter fingerprints and result lookup; check the current state before executing—already done, return the result directly. Idempotency solves replay; cross-channel concurrent updates still need object-version checks or equivalent concurrency control.
