Cloud Platform as a Service

Cloud Platform as a Service

Join us to learn more from a community of collaborative experts and IBM Cloud product users to share advice and best practices with peers and stay up to date regarding product enhancements, regional user group meetings, webinars, how-to blogs, and other helpful materials.

 View Only

Building a Multi-Agent Travel Agency on IBM Code Engine with ACP

By Kai Wedekind posted 3 days ago

  

Written by

Kai Wedekind (kai.wedekind@de.ibm.com)

Software Developer

Jeremias Werner (jerewern@de.ibm.com)

STSM @ IBM Cloud Code Engine 

Introduction

As AI agents grow in complexity, the need for interoperable, scalable, and modular communication protocols becomes essential. The Agent Communication Protocol (ACP), a Linux Foundation-backed standard, provides a robust framework for how AI agents, humans, and tools communicate over HTTP. When paired with a cloud-native platform like IBM Cloud Code Engine, ACP enables seamless and scalable deployment of intelligent, multi-agent systems.

In this article, we explore how ACP and IBM Cloud Code Engine work together to unlock the potential of scalable, multi-agent AI applications. ACP streamlines communication between AI agents, making it easy to orchestrate complex workflows. Whether you're building chatbots, automation tools, or sophisticated agent-based applications, this combination simplifies both development and deployment.

As a practical example, we highlight a travel agency system that coordinates with specialized agents—such as those for city recommendations, hotel search, flight planning, and budget management. The ACP framework ensures each agent communicates effectively, while IBM Cloud Code Engine handles the deployment of the entire system, including the front-end interface and backend services. With just a few commands, developers can launch a fully operational application without worrying about infrastructure.

Ultimately, the real power of ACP and IBM Cloud Code Engine lies in their general applicability. From intelligent assistants to enterprise automation, this stack provides a scalable, modular, and developer-friendly foundation for the future of agent-based AI systems.

What is ACP?

ACP is an open, standardized protocol—developed under the Linux Foundation—for interoperable AI agent communication, allowing agents, applications, and humans to interact through a unified RESTful interface that supports multi-modal messaging, both synchronous and asynchronous flows, streaming interfaces, and stateful or stateless execution patterns—all agnostic to internal agent implementations

  • Standardized REST Interface: ACP uses familiar HTTP methods (POST, GET, /runs, /agents, etc.) for all communication between agents and clients. This avoids custom transport layers or bespoke messaging systems, making integration easier and more predictable.

  • Unified Message Format: Messages have a structured schema

    • A message consists of ordered parts (MessagePart), each labeled with a MIME content type.

    • Supports rich modalities—text, JSON, images, files, etc.—without special protocol extensions

  • Agent Manifests & Discovery: Agents declare metadata (name, capabilities, supported modalities, languages, dependencies) via a manifest. Clients can discover agents via a /agents endpoint or offline via embedded metadata—supporting modular, decoupled systems without needing centralized registries.

  • Composable Agent Workflows: ACP supports composition patterns such as:

    • Prompt chaining (agents invoke other agents sequentially),

    • Routing (a router agent distributes sub‑tasks to specialists),

    • Parallel processing across agents,

    • Hierarchical orchestration, where higher-level agents coordinate workflows

Why Code Engine?

IBM Cloud Code Engine is a fully managed, general-purpose compute service on IBM Cloud that enables developers to easily deploy applications, jobs, and functions in a serverless fashion. It is designed to run containerized workloads with minimal operational overhead, letting developers focus on what matters most: writing code that drives business value.

With built-in auto-scaling capabilities—including scaling down to zero when no requests are incoming—Code Engine ensures optimal resource usage and cost efficiency. Its pay-as-you-go pricing model means you're only charged for the actual compute resources consumed, aligning infrastructure costs directly with workload demand.

Key features of IBM Cloud Code Engine include:

  • Auto-scaling (including scale-to-zero)

  • Secure, multi-tenant architecture

  • Event-driven integrations via HTTP or webhooks

  • Simplified deployment of RESTful APIs and services

  • Support for both apps and batch jobs in containerized formats

By handling infrastructure setup, scaling, and management automatically, IBM Cloud Code Engine empowers developers to rapidly build, deploy, and run modern cloud-native workloads with ease and efficiency.

Use Case: A Travel Agency

Scenario

Want to orchestrate multiple AI-powered agents to build a complete travel plan — and deploy them serverlessly?

This project shows how to do just that using ACP (Agent Communication Protocol) and IBM Code Engine.

What This Project Does

This example repository demonstrates a travel agency powered by multiple agents, each handling a specific part of the trip planning pipeline. Together, they take user input (dates, preferences, budget) and deliver a fully detailed travel plan.

Meet the Agents

The system is built around six specialized agents, plus a concierge agent that orchestrates the flow:

  • City Selection Agent – Picks the best destination cities based on preferences.

  • City Expert Agent – Fetches local insights: attractions, restaurants, hidden gems.

  • Budget Planner Agent – Ensures the plan stays within the traveler’s budget.

  • Flight Planner Agent – Suggests and organizes flight options.

  • Hotel Planner Agent – Recommends accommodations.

  • Itinerary Planner Agent – Combines everything into a day-by-day schedule.

  • Travel Concierge Agent – Acts as the conductor, calling each agent in sequence and compiling the final result.

How It Works

The Travel Concierge Agent coordinates all agents using sequential chaining:

  1. Receives user input (destination type, budget, duration, preferences).

  2. Calls the City Selection Agent to determine where to go.

  3. Passes the city choice to the City Expert, Flight Planner, Hotel Planner, and Budget Planner agents in sequence.

  4. Finally, sends all results to the Itinerary Planner Agent to build the final day-by-day travel plan.

  5. Returns the full plan to the user.

Architecture Overview

  • User Request (trip details)
  • Chat UI
  • Travel Concierge Agent
    • City Selection Agent
    • Budget Planner Agent
    • City Expert Agent
    • Hotel Planner Agent
    • Flight Planner Agent
    • Itinerary Planner Agent
  • Final Travel Plan (returned to user)

Lessons Learned & Observations

Modularity pays off.
Each agent can evolve independently. We swapped out the Budget Planner logic twice without impacting the rest of the system.

ACP simplifies orchestration.
By using a standardized protocol, we avoided writing brittle API contracts between agents. Adding new agents is plug-and-play.

Serverless scaling matters.
With Code Engine, agents that handle workloads (like City Expert, which queries APIs) can scale up without bloating the system.

Key Decisions

  • Use ACP for all agents: Lightweight, async-friendly, and easy to containerize.

  • Containerize each agent separately: Simplifies deployment, scaling, and debugging.

  • Adopt ACP over direct REST contracts: Prevents tight coupling and lets agents evolve independently.

  • Sequential orchestration over parallel calls (for now): Easier error handling and ordering guarantees.

  • Enforce structured inputs and outputs for all agents: Each agent exchanges data using standardized schemas (via ACP), making orchestration predictable and integration less error-prone.

Known Limitations

  • Sequential chaining adds latency.
    If a trip involves many destinations, the end-to-end response time can grow significantly.

  • Error handling is basic.
    A failure in one agent can cascade unless wrapped in retries or fallbacks.

  • State persistence is minimal.
    The current system doesn’t maintain long-lived state across requests; if the user restarts, the plan rebuilds from scratch.

  • Limited optimization logic.
    The Budget Planner and Itinerary Planner use simple heuristics — they’re good enough for this demo, but not production-level optimization. They mostly rely on
    basic rules, estimates, or fixed strategies instead of:

    • Dynamic pricing lookups (e.g., fetching real-time flight/hotel data).

    • Constraint-based optimization (e.g., minimizing travel time vs. cost).

    • Multi-variable trade-offs (balancing budget, travel convenience, and user preferences).

    • Smarter budget allocation (e.g., prioritizing categories the user values most).

    • Itinerary optimization (e.g., clustering attractions by location to minimize transit).

    • Error handling for unavailable flights/hotels or conflicting schedules.

Deploy your ACP agents as applications in Code Engine

Let’s deploy the ACP agents on IBM Cloud Code Engine. As prerequisites, please make sure to

Checkout the repository and create the .env file as follows

git clone https://github.com/IBM/CodeEngine
cd acp-agents

Create an file with the Environment variables

vim .env

Configure the following environment variable to use watsonx.ai or alternatively use the OpenAI endpoint and api-key

INFERENCE_BASE_URL=https://us-south.ml.cloud.ibm.com
INFERENCE_API_KEY=<YOUR-API-KEY>
INFERENCE_MODEL_NAME=watsonx/meta-llama/llama-3-3-70b-instruct
INFERENCE_PROJECT_ID=<YOUR-PROJECT-ID>

# Alternative for Open AI
#INFERENCE_BASE_URL=https://api.openai.com/v1
#INFERENCE_API_KEY=<YOUR-API-KEY>
#INFERENCE_MODEL_NAME=openai/gpt-4o
#INFERENCE_PROJECT_ID=""

Login using the IBM Cloud CLI

REGION=eu-es
ibmcloud login -r $REGION --sso

Deploy to Code Engine

make deploy-codeengine

The script will create a new Code Engine project in the selected region and deploy the the agent and chat applications. You can see the applications being deployed in the Code Engine User Interface.

You can click the `Open URL` button of the chat application or use the following command will provide the URL for the chat interface to interact with the agents:

ibmcloud ce app get --name travel-concierge-chat -o json | jq -r '.status.url'

Let’s ask the Travel Concierge to plan a trip: 

Plan a trip from Stuttgart to either Paris or Rome from October 10 for 6 days. I'm interested in sightseeing, coffee, family hotel, restaurants, activities with kids and technology trends. My budget is Mid-range (€1000-€1800) and I prefer historical sites, local cuisine, and avoiding crowded tourist traps

Congratulations, you have an agent system running in the cloud. Be curious of what the Travel Concierge suggests :-) 

To teardown the deployment run the following command or delete the Code Engine project from the console.

make undeploy-codeengine

Local deployment with Ollama

https://github.com/IBM/CodeEngine/blob/main/acp-agents/README.md#deploy-on-local-machine

Conclusion

Combining the Agent Communication Protocol (ACP) with IBM Cloud Code Engine empowers developers to build and deploy sophisticated, agent-driven applications with remarkable ease and efficiency. This pairing is especially compelling because both technologies are designed around scalable, stateless, and event-driven principles—making them a natural fit for modern, cloud-native architectures.

While the travel agency example demonstrates the practical benefits—such as seamless agent collaboration and simplified deployment—these advantages extend to a wide range of use cases. By abstracting away the complexities of infrastructure management and agent communication, ACP and Code Engine allow you to focus on crafting innovative AI solutions.

ACP (Agent Communication Protocol) is a great fit for IBM Code Engine because both technologies are designed to support scalable, stateless, and event-driven architectures. Here's why they work so well together:

Both Are Stateless and RESTful

  • ACP defines a stateless HTTP API for agents.

  • IBM Code Engine runs containerized workloads that scale based on HTTP traffic.

This means you can deploy ACP-compliant agents as containers on Code Engine without needing custom servers or persistent infrastructure.

Auto-Scaling Works Seamlessly

  • IBM Code Engine automatically scales workloads to zero when idle, and up when requests arrive.

  • ACP agents, being on-demand and stateless, can fully benefit from this model.

Ideal for cost-efficient and scalable agent systems.

Composable, Containerized Agents

  • ACP supports agent composition via HTTP calls (/runs, await, etc.).

  • Code Engine supports container-to-container communication via HTTPS or IBM Cloud Internal Networking.

You can deploy modular ACP agents as microservices, and compose them into larger multi-agent systems.

Secure, Multi-Tenant Friendly

  • ACP allows hosting agents from different teams or organizations.

  • Code Engine provides namespaces, secrets, and IAM integration, making it easy to manage secure, isolated deployments.

Perfect for enterprise settings where multiple agents must coexist securely.

Cost Optimization

  • You only pay for what you use on Code Engine.

  • Since ACP agents are stateless and invoke each other only as needed, this aligns well with serverless economics.

Great for cost-sensitive workloads with bursty traffic.

Open Standard + Cloud-Native Platform

  • ACP is an open Linux Foundation standard.

  • Code Engine supports any OCI-compliant image, making it easy to deploy open agents in an open cloud environment.

Avoids vendor lock-in while benefiting from cloud-native scalability.

Our travel agency example showcases how complex workflows can be decomposed into specialized agents that communicate predictably and effectively.

Whether you’re designing customer service bots, RAG pipelines, or collaborative assistants, ACP and Code Engine offer a production-ready path to robust agent ecosystems.

Extending the Travel Agency Example

The travel concierge example provides a solid foundation for building intelligent, multi-agent applications—but it doesn't stop there. Thanks to the modular nature of the Agent Communication Protocol (ACP) and the flexibility of IBM Cloud Code Engine, this system can be easily extended to handle real-world tasks by integrating Model Context Protocol (MCP) servers and external APIs.

For example:

  • Automated Itinerary Delivery: Integrate an email agent to send personalized itineraries, confirmations, or updates to users automatically.

  • Enhanced Hotel Search: Use APIs from providers like Booking.com or Expedia to offer richer hotel data, including reviews, dynamic pricing, and availability.

  • Real-World Booking Actions: Empower agents to book flights and accommodations directly through trusted travel APIs, turning recommendations into fully executed plans.

This extension transforms the system from a passive recommender into a proactive digital travel assistant capable of completing tasks end-to-end.

Whether you’re designing chatbots, automating workflows, or building collaborative agent-based systems, the ACP + Code Engine stack provides a flexible, production-ready path. With just a few commands, you can deploy scalable applications that communicate, coordinate, and act—without the burden of managing infrastructure.

Resources

0 comments
6 views

Permalink