Multi-Agent Architecture Upgrade: Raising Travel Assistant Accuracy from 50% to 90%
A single-agent workflow hit a ceiling on a high-constraint corporate travel assistant. This article covers the bottlenecks, a Python-plus-Java multi-agent redesign, layered context, structured fallbacks, and results that lifted item-collection accuracy from about 50% to around 90%.
Corporate travel is a high-frequency, multi-constraint, process-heavy domain. Given travel dates and a destination, the system must collect requirements, plan itineraries, compare options, and place orders in one flow, while applying policy checks and cost control. An intelligent assistant collapses work that used to span many systems into a single natural-language conversation: collect trip items, plan the trip, and book in one pass.
Background: From process automation to a closed travel loop
Early releases used a workflow plus a single agent: a fixed path, one large model for intent and decisions. That shipped fast and stayed controllable, enough to prove product value. As business logic grew, the architecture hit a hard ceiling and needed a systematic, code-first upgrade.
Three bottlenecks of the single-agent model
1. Prompt bloat and attention decay
Policies, approval rules, transport preferences, and hotel standards all sat in one prompt. Token count exploded. Past a reasonable context load, the model’s attention dropped: mid-prompt instructions were forgotten and constraints were skipped.
- Accuracy: even after hundreds of prompt iterations, “click-to-confirm” item collection stayed around 50%, far below production needs.
- Stability: production saw frequent “item identification failed, retry” and missing collection results. Failure rates of a single oversized call scaled with complexity, without fine-grained fallback or retry.
2. Weak generalization
- No real collaboration: even with modules, there was no standard messaging or result handoff. Capabilities were not reusable; new scenarios meant rebuilding.
- Weak planning: there was no planning hub. The system handled one intent. A user who asked to book flights, change a hotel, and check policy in one sentence could not get intent split, task orchestration, and result merge.
3. Immature context engineering
- Mixed data: chat history and agent decision context were not separated. Idle turns and noise went into the model and raised load.
- No sharing: without layered context, sub-agents could not share state on demand, causing duplicate reasoning or gaps.
Upgrade goals and stack
Goals were fourfold: adopt an AI framework for efficient multi-agent communication, collaboration, and reuse; raise item-collection accuracy via context and prompt engineering; rebuild core flows to fix production stability; and support containerized, code-based deploy across systems and models.
Python and Java split
The design uses Python for core AI (model calls, orchestration, prompts, planning, memory) and Java for the service layer (auth, gateways, MCP-style services, concurrency, long connections, transactions). A clear RPC boundary lets the AI layer iterate and canary without destabilizing services.
# Sketch of multi-agent collaboration (pseudocode)planner = PlannerAgent(llm=main_model) # intent split and task orchestrationcollector = InfoCollectorAgent(llm=main_model, tools=[form_tool])recommender = RoutePlannerAgent(tools=[flight_api, hotel_api])executor = OrderExecutorAgent(tools=[order_api, compliance_check])planner.delegate(collector).then(recommender).then(executor)
Framework selection
Demos are not enough. Evaluate: sync/async and streaming message models; native planner–executor abstractions; persistent, layered memory; observability (traces, token stats, failure replay); community and license. Strong-process travel especially needs a planning hub and structured messages so multi-intent fusion can ship.
Context engineering and collaboration
Layered context
Four layers: global (policy and compliance, retrieved rather than always in the prompt); session (compressed dialogue summary, rewritten past a threshold); task (structured subtask state such as form fields and confirmed options); tool (only the schemas needed for this call). Layered injection cut prompt size by an order of magnitude and focused attention.
Structured state and deterministic fallback
Item-collection results moved from free text to a structured schema. Missing fields or validation failure take a deterministic retry path instead of unconstrained generation. “Identification errors” and empty conclusions are handled by a state machine and explicit checks. The model fills slots; fallback is fully in code.
Planning hub and reuse
A Planner node splits intent and builds a DAG. Sub-agents talk over a standard protocol; capabilities register as tools. Multi-intent work becomes a graph of parallel, rollback-capable subtasks. Node-level retry raises overall success.
Results and lessons
Item-collection accuracy moved from about 50% to around 90%. Core stability issues were largely eliminated, and time to add new scenarios dropped. Takeaways: a single agent is limited by context quality; multi-agent is not a panacea but a way to split complexity. Structured output plus code fallbacks beat endless prompt tuning. Layered context is the highest-ROI accuracy investment. Mixed stacks and containerization belong in the first architecture pass. Teams building complex business agents should put in place a planning hub, structured communication, and layered context before expanding agent capabilities.
