For the complete documentation index, see llms.txt. This page is also available as Markdown.

Agent-to-Agent (A2A)

Agent-to-Agent (A2A) communication enables autonomous AI agents to interact, delegate tasks, and exchange data programmatically without human intervention. To resolve interoperability limitations between disparate AI frameworks (such as LangChain, CrewAI, or custom scripts), BlueRock implements a standardized communication layer comprising three core components:

  • Standardized Protocol: Uniform routing and endpoints that allow agents to exchange structured data reliably regardless of their underlying frameworks.

  • AgentCard: A discoverable configuration profile defining an agent's identity, supported skills, capabilities, and required input/output formats.

  • Telemetry and Security: Native tracking of inter-agent prompts and generated artifacts to monitor system behavior, audit workflows, and intercept potentially malicious payloads.

lightbulb-exclamation-on

Core Architecture

  • Agent Execution Space: The isolated environment hosting the A2A server or client program alongside the embedded bluerock sensor.

  • Customer-Managed A2A Program: Application code built using the Python A2A SDK or sample scripts from the public repository that handles agent tasks, resolves AgentCards, and constructs prompt payloads.

  • BlueRock Sensor (bluerock): The runtime hook library is deployed inside the virtual environment that transparently intercepts A2A card requests, responses, and task executions.

  • BlueRock Control Plane (bluerockd): The background service dispatches policy rules to the sensor, receives intercepted telemetry events via socket, and exports OpenTelemetry (OTEL) logs.

  • CloudWatch or External Event Collector: The final storage and monitoring target for compliance audits and security dashboards.

Environment Setup

Prerequisites

  • Package Manager: Install uv for dependency management and execution.

Clone the Repository

Build custom A2A scripts using the Python A2A SDK or leverage pre-built sample scripts from the A2A samples repository: https://github.com/a2aproject/a2a-samples

Clone the public A2A sample repository and navigate to the desired agent directory:

Install BlueRock Sensor & Load Sensor

Install the custom BlueRock sensor module and then load the sensor into memory using the installation flag.

Policy Configuration

Policies are defined in the policy template that resides at /opt/bluerock/trex/. The a2a policy block within the agentic sensor manages pattern matching, remediation controls, and transport-level enforcement for Agent-to-Agent interactions. To learn more about the policy changes and building it, refer to the Policy Configuration section.

Default Policy Template (a2a)

Policy Configuration Parameters

Parameter

Type

Default

Description

a2a.enable

boolean

false

Main toggle to enable or disable the entire A2A sensor inspection block.

a2a.remediate

boolean

false

Main toggle to activate mitigation or blocking actions for detected A2A policy violations.

a2a.card_name_filter.enable

boolean

true

Enables pattern inspection specifically on the Agent Card name field.

a2a.card_name_filter.remediate

boolean

true

Triggers remediation/blocking when a forbidden pattern is matched in the card name.

a2a.card_name_filter.forbidden_card_name_patterns

array[string]

(RegEx List)

Array of regex patterns used to flag unsafe commands or terms in the Agent Card name.

a2a.card_description_filter.enable

boolean

true

Enables pattern inspection on the Agent Card description field.

a2a.card_description_filter.remediate

boolean

true

Triggers remediation/blocking when a forbidden pattern is matched in the card description.

a2a.card_description_filter.forbidden_card_description_patterns

array[string]

(RegEx List)

Array of regex patterns used to flag unsafe commands or credentials in the card description.

a2a.skills_description_filter.enable

boolean

true

Enables pattern inspection on skill descriptions (skills[].description) advertised by the agent.

a2a.skills_description_filter.remediate

boolean

true

Triggers remediation/blocking when a forbidden pattern is matched in any skill description.

a2a.skills_description_filter.forbidden_skills_description_patterns

array[string]

(RegEx List)

Array of regex patterns used to flag dangerous binary or shell command usage within advertised skills.

a2a.http_servers.enable

boolean

true

Activates transport-level inspection and policy rules for HTTP-based A2A endpoints.

a2a.http_servers.remediate

boolean

true

Enforces active transport remediation when policy rules are violated.

a2a.http_servers.deny_http

boolean

false

When set to true, blocks unencrypted HTTP traffic for A2A communications.

a2a.http_servers.deny_websocket

boolean

false

When set to true, blocks WebSocket connections used by A2A streaming channels.

a2a.http_servers.exception_list

array[string]

[]

List of excluded URLs or hosts exempt from transport-level restrictions.

a2a.http_servers.force_authentication

boolean

false

When set to true, enforces strict authentication requirements on incoming A2A card requests.

Execution

Running an A2A Program Natively on a BlueRock Instance

Running the A2A Python program directly/natively on the BlueRock VM shell prompt.

  1. Start the Server. Run the A2A agent server locally on port 9999:

    Expected output:

  2. Run the Test Client. In a separate host terminal session, execute the test client to verify communication:

    Expected Output:

Running an A2A Program as a Container (Docker) with BlueRock Sensor

Running the A2A Python program as a container with BlueRock Sensor.

  1. Create a Dockerfile. In the root directory of your A2A agent application, ensure you have a Dockerfile that installs dependencies and copies the BlueRock Sensor

  2. Build the Container Image

    Navigate to the directory containing your application files and build the Docker image:

    Expected Output:

  3. Run the Container Image.

    Expected output:

  4. Run the Test Client In a separate host terminal session, execute the test client to communicate with the containerized agent:

    Expected Output:

Example OTEL Event

Below is an example of the OpenTelemetry event captured by the BlueRock sensor daemon during an A2A task invocation and exported to CloudWatch:

Last updated