Solace Agent Mesh (SAM) Documentation

repository·main·Indexed 26 days ago

https://github.com/solacelabs/solace-agent-mesh

An open-source framework for building event-driven, multi-agent AI systems where specialized agents collaborate on complex tasks. It leverages the Solace Platform's event messaging for scalability and integrates Google's Agent Development Kit (ADK) for AI logic. The project includes a SAM REST API Gateway, a Python client library (sam-rest-client), a CLI tool (sam-rest-cli), and a React-based Frontend Web UI.

Tokens
200.4K
Snippets
397
Records
1K
Agent score
90%

What's inside Solace Agent Mesh

  1. Overview of Connector Types in Agent Mesh Enterprise

    main

    Connectors enable agents to access external data sources and services. They allow agents to retrieve information, execute queries, and interact with external platforms via natural language.

    Supported connector types include:

    • Knowledge Base Connectors: Retrieve context from cloud-based repositories containing unstructured documents or structured data.
    • MCP Connectors: Communicate with Model Context Protocol (MCP) compliant servers to access tools and data.
    • OpenAPI Connectors: Interact with REST APIs using OpenAPI specifications; tools are automatically generated from endpoints.
    • SQL Connectors: Query relational databases (MySQL, PostgreSQL, MariaDB, Microsoft SQL Server, or Oracle) using natural language.
  2. Overview of OpenTelemetry Metrics in Agent Mesh Enterprise

    main

    Agent Mesh Enterprise provides application metrics instrumentation using OpenTelemetry. This feature allows you to monitor system health, performance trends, and resource utilization via a standard Prometheus-compatible /metrics endpoint.

    Metrics are designed to complement request-level tools like the Activity Viewer and Stimulus Logs by providing aggregated, time-series data. This enables proactive health monitoring, SLO definition, capacity planning, and cost visibility (such as tracking LLM token consumption).

  3. Overview of Agent Mesh

    main

    Agent Mesh is an open-source integration framework designed to connect AI models with isolated data silos (databases, SaaS platforms, APIs, and legacy systems). It uses an event-driven architecture to enable specialized agents to collaborate via standardized A2A (Agent-to-Agent) communication.

    Key Technical Concepts

    • Event-Driven Architecture: Uses an event mesh to create an asynchronous communication layer between agents, gateways, and external systems, decoupling senders from receivers.
    • Unified AI Collaboration: Enables diverse AI models, custom tools (Python functions, MCP tools), and enterprise data sources to work in a cohesive ecosystem.
    • Workflow Orchestration: Supports complex multi-agent processes where tasks execute in sequence or parallel.
    • System Integration: Uses purpose-built gateways to bridge the mesh with web interfaces, Slack, APIs, and event streams.
    • Configuration: Uses YAML-based configuration for precise control without requiring code changes.
    • Extensibility: Features a plugin architecture for adding custom agents and gateways.
  4. Overview of Agent Mesh Core Components

    main

    Agent Mesh systems are composed of the following fundamental components:

    • Agents: Intelligent workers powered by AI models equipped with specialized tools.
    • Gateways: Bridges that translate external requests into the standardized communication protocol used by agents.
    • Orchestrator: The coordination system that breaks down complex requests into tasks and manages multiple agents.
    • Plugins: An extension mechanism to add new capabilities without modifying core components.
    • CLI: Command-line tools for project management, setup, deployment, and maintenance.
  5. Understand the Agent Mesh Architecture

    main

    Agent Mesh is an event-driven framework for building distributed, collaborative AI agent systems. It decouples agent logic from communication and orchestration using three core technologies:

    • Solace Event Broker: The messaging fabric that uses topic-based routing for the Agent-to-Agent (A2A) protocol.
    • Solace AI Connector (SAC): The runtime environment for hosting and managing system components.
    • Google Agent Development Kit (ADK): The core logic for individual agents (LLM interaction, tool execution, and state management).

    The architecture relies on Event-Driven Architecture (EDA), where components like Gateways, Agent Hosts, and services communicate asynchronously via the Solace broker, ensuring scalability and resilience.

  6. Developer Advantages of Agent Mesh

    main

    For developers building on Agent Mesh, the framework provides several core technical capabilities:

    • Complete Observability: Real-time monitoring and debugging of the entire system is possible because all communication flows through the event broker.
    • Flexible Integration: Built-in support for common enterprise systems and various AI frameworks.
    • Plugin Architecture: The system is designed to be easily extended with custom agents and gateways.
    • Developer Tools: Access to comprehensive CLI and debugging utilities.
  7. SSO Architecture Overview

    main

    Agent Mesh Enterprise utilizes a two-component architecture to handle authentication:

    1. Main UI Server (Port 8000): Handles user interactions and serves the web interface.
    2. OAuth2 Authentication Service (Port 8080): Manages the authentication flow with the external identity provider.

    Authentication Flow:

    • User accesses the UI.
    • User is redirected to the OAuth2 provider.
    • Upon successful authentication, the provider redirects back to Agent Mesh with an authorization code.
    • The application exchanges the authorization code for access tokens.
  8. Understand Authentication and Authorization in Agent Mesh Enterprise

    main

    Agent Mesh Enterprise uses a two-layer security model:

    1. Authentication: Validates identity using either OAuth2 or SAM Access Tokens.
    2. Authorization: Determines permissions via RBAC (Role-Based Access Control) scopes.

    The system is secure by default: if no authorization configuration is provided, all access is denied. Both the WebUI Gateway and the Platform Service share the same authentication middleware and configuration resolver to ensure consistent security across the mesh.

  9. New Features in Chart 1.500.0

    main

    Chart 1.500.0 introduces several new capabilities for deployment and validation:

    FeatureDescriptionConfiguration Key
    GCR Pull Secret AutomationAutomatically creates image pull secrets from a dockerconfigjson file via --set-file. Mutually exclusive with global.imagePullSecrets.global.imagePullKey
    Custom CA CertificatesInjects custom/self-signed CA certificates (for broker, OIDC, or LLM) via a Kubernetes ConfigMap.samDeployment.customCA
    Embedded Solace BrokerDeploys a single-node Solace PubSub+ broker in-cluster for evaluation.global.broker.embedded
    Agent Mesh Pre-flight Validation (sam-doctor)A Helm hook that validates configuration before workload pods are created to prevent CrashLoopBackOff. Requires enterprise image with sam_doctor.samDoctor.enabled
    JSON Schema ValidationBuilt-in validation that rejects invalid configurations during helm lint, install, upgrade, or template commands.Built-in
    Cluster Resource ChecksValidates that referenced Secrets, ConfigMaps, StorageClass, and IngressClass exist in the cluster during install/upgrade.validations.clusterResourceChecks
  10. Understand the role of Gateways in Agent Mesh

    main

    Gateways are the external interfaces that connect various systems to the A2A agent mesh through standardized protocols. They serve as the primary interface between the Agent Mesh and the outside world, managing information flow via the A2A protocol.

    Key responsibilities include:

    • Entry Points: Translating external requests into A2A protocol messages and routing them through the Solace event mesh.
    • Authentication & Authorization: Handling identity and user enrichment via pluggable providers.
    • System Purpose: Applying a configurable context to all incoming stimuli.
    • Output Formatting: Using configurable output descriptions to format responses for the receiving system.
  11. Understand Session Storage Architecture

    main

    Agent Mesh uses a distributed session architecture where the WebUI Gateway and agents maintain separate but coordinated session storage systems connected via session IDs.

    Workflow

    1. The WebUI Gateway generates a session ID (web-session-<UUID>).
    2. The WebUI Gateway sends the session ID to the agent with each message.
    3. The agent uses the ID to look up or store its own session context.

    Data Distribution

    • WebUI Gateway Database: Stores session metadata (ID, user ID, timestamps), chat history for UI display, message bubbles, and task metadata.
    • Agent Database: Stores the agent's conversation context/memory, message history from the agent's perspective, internal state, tool execution history, and session events.

    Each agent has its own independent database and credentials. Coordination is achieved via the shared session ID.

  12. Integrate Agent Mesh Enterprise metrics with observability platforms

    main
    Agent Mesh Enterprise supports exporting metrics via the OpenTelemetry Protocol (OTLP) or via a Prometheus-compatible /metrics endpoint. You can integrate with any OTLP-compatible platform (e.g., DataDog, Grafana, New Relic) by configuring OTLP exporters or by using pull-based collection from the /metrics endpoint.