In this codelab, you'll gain a foundational understanding of the Solace Agent Mesh. You'll explore the architecture, key components, and benefits of the Solace Agent Mesh, learning how it enables scalable, event-driven communication between AI agents and services. The introduction covers the evolution of event-driven architectures and highlights real-world use cases where agent mesh technology can be applied.

You'll dive into the details of the A2A Protocol, discovering its design principles, core concepts, and how it standardizes agent communication for interoperability and extensibility. You'll also learn about the Agent Development Kit (ADK) and how it works with A2A to build and deploy advanced AI agents.

You'll then dive into the Solace AI Connector, a powerful tool designed to seamlessly integrate AI capabilities into your event-driven architecture, enabling you to create efficient pipelines that process events from your event mesh using AI and other components.

By the end of this codelab, you'll be equipped to get started with Solace Agent Mesh, including installation prerequisites, running built-in agents, and connecting external services through MCP. You'll understand how to develop custom agents, leverage plugins and tools, and build multi-agent systems that harness the power of event mesh and standardized protocols for robust, collaborative AI solutions.

SAM Arch

Problem statement

Building effective agentic systems presents a complex challenge that extends far beyond simply deploying AI models. AI Agents are siloed that operate in isolation, and are unable to effectively communicate or share capabilities across organizational boundaries. By definition and design, Agents are inherently domain-specific, designed to excel in narrow use cases but struggling to collaborate or leverage expertise from other specialized agents, creating fragmented AI ecosystems that fail to realize their collective potential.

To make intelligent decisions and respond to dynamic conditions, agentic systems must rely on event-driven actions that flow into the organization. While solving the core AI challenge represents only 20% of the effort, the remaining 80% involves the much more complex task of connecting AI models to the disparate data sources, legacy systems, APIs, and organizational knowledge that exist across isolated silos—making data accessibility and integration the true bottleneck in delivering practical AI value

What is Solace Agent Mesh?

Solace Agent Mesh is a comprehensive open-source framework that empowers developers to build sophisticated, distributed AI systems. On a high level, Agent mesh provides developers with the following:

Core Communication & Protocol

Data Integration & Connectivity

Workflow Orchestration & Management

Extensibility & Plugin Architecture

AI Model & Provider Support

Development Tools & Framework

Security & Enterprise Features

Monitoring & Observability

Scalability & Performance

Deployment & Operations

Use Case Enablement

Developer Experience

This comprehensive feature set makes Solace Agent Mesh the ideal choice for developers looking to build production-ready, scalable AI applications that can seamlessly integrate with existing enterprise infrastructure while providing the flexibility to grow and evolve with changing requirements.

Key Components and Architecture

Solace Agent Mesh consists of several interconnected components that work together to create a distributed, event-driven ecosystem of collaborative AI agents.

  1. Solace Event Broker The central messaging backbone that provides intelligent topic-based routing, fault-tolerant delivery, and horizontal scaling for all Agent-to-Agent (A2A) protocol communications across the entire system.
  2. Gateways External interface bridges that translate diverse protocols (HTTP, WebSockets, Slack) into standardized A2A messages while handling authentication, authorization, and session management for outside systems.
  3. Agents Specialized AI processing units built on Google's Agent Development Kit that provide domain-specific intelligence, self-register for dynamic discovery, and access comprehensive tool ecosystems for complex task execution.
  4. Solace AI Connector The universal runtime environment that hosts and manages the complete lifecycle of all system components while bridging Google ADK capabilities with Solace event infrastructure through YAML-driven configuration.
  5. Google Agent Development Kit (ADK) The core AI framework that powers individual agents with LLM interactions, conversation memory management, artifact processing capabilities, and an extensible tool integration system.
  6. A2A Protocol & Agent Registry The standardized communication protocol and service discovery mechanism that enables seamless interaction, dynamic routing, and lifecycle management across all mesh components.
  7. Backend Services & Tools The foundational infrastructure layer providing multi-provider LLM access, extensible integrations for custom tools and APIs, persistent data storage, and cloud-native artifact management services.

This workshop will help you understand how to leverage Solace Agent Mesh for your own AI applications, whether you're an AI enthusiast experimenting with new models or an enterprise developer building production systems.

Resources

For more information and a deep dive on the Solace Agent Mesh, you can check out this video series

Solace Agent Mesh is versatile and can be applied to various domains:

  1. Customer Service Augmentation:
    • Intelligent chatbots that can access multiple backend systems
    • Real-time response generation based on customer data and history
    • Seamless handoff between AI agents and human agents
  2. Supply Chain Optimization:
    • Monitoring and analyzing events across the supply chain
    • Predictive maintenance and inventory management
    • Automated decision-making based on real-time data
  3. Financial Services:
    • Fraud detection through pattern analysis across multiple data streams
    • Personalized financial advice based on customer portfolio and market events
    • Regulatory compliance monitoring and reporting
  4. Healthcare:
    • Patient monitoring and alert generation
    • Clinical decision support by accessing medical records and research data
    • Healthcare workflow optimization
  5. Smart Cities:
    • Traffic management through real-time data analysis
    • Utility optimization based on usage patterns
    • Emergency response coordination

The Agent-to-Agent (A2A) Protocol is Google's standardized communication protocol designed to enable seamless interaction between AI agents, regardless of their underlying implementation or hosting environment. It provides a common language for agents to discover each other, exchange information, delegate tasks, and collaborate on complex problems. This document explores the A2A protocol in detail, including its design principles, components, and implementation approaches.

Core Concepts

The A2A Protocol is built around several foundational concepts that define its structure and behavior:

Protocol Design Principles

A2A was designed with the following principles in mind:

  1. Standardization: Provide a common interface for agent communication
  2. Interoperability: Enable agents from different systems to work together
  3. Extensibility: Support evolving agent capabilities
  4. Asynchronicity: Handle long-running tasks and parallel operations
  5. Discoverability: Allow agents to find and understand each other's capabilities
  6. Security: Implement robust authentication and authorization

These principles ensure that A2A serves as a reliable foundation for building multi-agent systems.

Agent Cards

Agent Cards are metadata structures that describe an agent's capabilities, allowing other agents and systems to discover and understand how to interact with them. Key components include:

  1. Name: A unique identifier for the agent
  2. Description: A human-readable explanation of the agent's purpose
  3. Capabilities: The specific tasks the agent can perform
  4. Input/Output Formats: The data structures the agent expects and produces
  5. Authentication Requirements: Security information for accessing the agent

Agent Cards are published to discovery endpoints, making them available to other agents in the ecosystem.

Tasks

Tasks represent the work that agents perform. They include:

  1. Task ID: A unique identifier for tracking
  2. Input: The information provided to the agent
  3. Context: Additional information about the task environment
  4. Artifacts: Files or binary data associated with the task
  5. Delegation Path: Information about how the task was routed

Tasks follow a lifecycle from creation through processing to completion or failure.

Events

Events represent the state changes and progress updates that occur during task execution:

  1. Status Updates: Progress information about ongoing tasks
  2. Artifact Updates: Notifications about new or modified files
  3. Error Events: Information about failures or issues
  4. Completion Events: Signals that a task has finished

Events enable asynchronous monitoring of task progress, which is essential for long-running operations.

Artifacts

Artifacts are files or binary data that agents can exchange:

  1. Content: The actual data (text, image, audio, etc.)
  2. Metadata: Information about the artifact (type, creation time, etc.)
  3. Versioning: Tracking changes to artifacts over time
  4. References: Ways to refer to artifacts across the system

Artifacts enable agents to share rich, structured data beyond simple text messages.

Where to learn more

The Agent-to-Agent (A2A) Protocol provides a standardized foundation for building interconnected AI agent systems. By enabling discovery, task delegation, and asynchronous communication, A2A facilitates the creation of sophisticated multi-agent workflows that can tackle complex problems through collaboration.

As the ecosystem of AI agents continues to grow, A2A offers a common language that allows these agents to work together seamlessly, regardless of their underlying implementation or hosting environment. This interoperability is key to unlocking the full potential of agent-based AI systems.

To learn more about A2A, navigate to the A2A Documentation

Google's Agent Development Kit (ADK) offers developers a comprehensive framework to build, evaluate, and deploy sophisticated AI agents with minimal friction. ADK provides the essential building blocks—from LLM integration and tool execution to session management and artifact handling—that enable both conversational and non-conversational agents capable of complex reasoning, planning, and task execution.

The A2A Protocol works seamlessly with Google's Agent Development Kit (ADK):

  1. ADK A2A Tools: Built-in tools for A2A communication
  2. Protocol Translation: Converting between ADK events and A2A messages
  3. Agent Deployment: Exposing ADK agents through A2A endpoints
  4. Multi-Agent Systems: Building networks of ADK agents communicating via A2A

For more information on ADK integration, see the ADK documentation.

Prerequisites

Installation

Install Python 3.11+

To install a specific version of python, we would recommend using brew

brew install python@3.12

Create and activate a Python virtual environment

MacOS/Linux

mkdir solace-agent-mesh-demo
cd solace-agent-mesh-demo
python3 -m venv venv
source venv/bin/activate

Windows

venv/Scripts/activate

After activating the virtual environment you can now simply just use python which will use whatever python version used to initialize the virtual environment.

Install the Solace Agent Mesh Community Edition

pip install solace-agent-mesh

[Optional] Solace Broker

You have two options to run and connect to a Solace Broker

  1. Software: using a docker image to run it locally
  2. Cloud: using self served cloud instance

Follow the steps defined in the getting started with Solace page

Initialize Solace Agent Mesh

In the newly created directory, initialize a new instance of an agent mesh project

sam init --gui

SAM Init

From here, choose "Advanced Setup" to spin up an instance of the Agent Mesh that uses the Solace Broker as the communication backbone.

Choose a namespace for your project

Namespace

Configure connection to the Solace Broker

Broker

Configure your LLM

LLM Endpoint

Configure your main orchestrator

orchestrator

Note: You can explore the other options for configuring the orchestrator agent to see what you have available for fine tuning the behaviour

Configure the WebUI Gateway gateway

Note: Choose any Session Secret Key needed for the WebUI. Keep the remaining configurations as default.

Review and Initialize the final configuration

SAM final

Run Solace Agent Mesh

Now back to your terminal, you will realize the following has been created

.
├── .env
├── .sam
├── configs
│   ├── agents
│   │   └── main_orchestrator.yaml
│   ├── gateways
│   │   └── webui.yaml
│   ├── logging_config.ini
│   └── shared_config.yaml
├── requirements.txt
└── src
    └── __init__.py

Execute the following command to run Solace Agent Mesh

sam run

Access the WebUI Gateway through http://127.0.0.1:8000/

SAM Intro

Viola! You are up and running with the Solace Agent Mesh!

Now run the following prompt in the chat window

What are your capabilities?

and click the "Agent Workflow" icon

flow

Explore the command flow simpleFlow

For the remaining of any prompts you execute to Solace Agent Mesh, you can always click this Agent Workflow icon to get a better understanding on what is happening

Solace Agent Mesh represents a sophisticated enterprise-grade platform that orchestrates AI agents. At its core, the Orchestrator serves as the intelligent brain that decomposes complex tasks and routes them to specialized Agents built using the Agent Development Kit (ADK), while Gateways created with the Gateway Development Kit (GDK) provide secure multi-protocol entry points. The platform's foundation rests on the Solace Broker for enterprise messaging, complemented by essential Services including LLM integration, embeddings management, artifact storage, and conversation history tracking. This unified architecture creates a robust, enterprise-ready platform for deploying and managing AI agent ecosystems at scale.

1. Orchestrator: The planner

The Orchestrator serves as the central intelligence hub of the Solace Agent Mesh, responsible for task analysis, agent coordination, and workflow management across the entire ecosystem.

Key Capabilities:

2. Agents: The Goal Setters

Agents are specialized AI components built using the Agent Development Kit (ADK) that perform specific tasks within the mesh, each designed with focused capabilities and clear operational boundaries.

Agent Development Kit (ADK) Features:

Agent Types:

3. Gateways: Entry and Exit points

Gateways serve as controlled entry points into the Agent Mesh, built using the Gateway Development Kit (GDK) to provide secure, protocol-aware interfaces for external systems and users.

Gateway Development Kit (GDK) Capabilities:

Example Gateways:

4. Services: Modular Components

The Services layer provides essential infrastructure capabilities that support agent operations, data management, and AI model integration across the mesh.

5. LLM Service

Provides centralized access to Large Language Model capabilities with intelligent routing and cost optimization.

Features:

6. Embeddings Service

Manages vector embeddings for semantic search, similarity matching, and knowledge retrieval operations.

Features:

7. Artifact Management Service

Handles storage, versioning, and lifecycle management of files, documents, and data artifacts across agent interactions.

Features:

8. History Management Service

Maintains conversation history, session context, and interaction logs for continuity and analysis.

Features:

9. Solace Broker: Central Nervous System

The Solace Broker serves as the foundational messaging infrastructure, providing enterprise-grade event streaming and messaging capabilities that power all communication within the Agent Mesh.

Core Messaging Capabilities:

Enterprise Features:

Deployment Options:

Advanced Capabilities:

As mentioned earlier, Agents are specialized processing units built around Google's ADK. They provide domain-specific knowledge and capabilities and can operate independently and be deployed separately.

In Solace Agent Mesh, Agents are configuration driven vial YAML files and there are multiple ways to develop an agent:

  1. Using built-in templates,
  2. via MCP, or
  3. custom

Adding new agent could be done in one of the following ways

  1. Using cli command sam add agent
  2. Using the GUI

Lets go ahead and add a general purpose agent

In this tutorial we will be using the GUI. To spin up the agent building interface, execute this command from your terminal

sam add agent --gui

SAM final

Fill in the required fields as per the screenshot below.

Use the following prompt in the Instructions section

✅ < Fill IN TAKEAWAY 1>
✅ < Fill IN TAKEAWAY 2>
✅ < Fill IN TAKEAWAY 3>

Soly Image Caption

Thanks for participating in this codelab! Let us know what you thought in the Solace Community Forum! If you found any issues along the way we'd appreciate it if you'd raise them by clicking the Report a mistake button at the bottom left of this codelab.