Configure Agent-to-Agent (A2A) Communication

Pega Agentic AI enables multiple agents to collaborate to complete an outcome, not just answer a question. Using the Agent-to-Agent (A2A) protocol, one Pega agent can securely invoke another agent’s capabilities, exchange context, and return results—while still maintaining enterprise-grade governance, authentication, and auditability.

Demo:

https://players.brightcove.net/1519050010001/default_default/index.html?videoId=6390512523112

https://players.brightcove.net/1519050010001/default_default/index.html?videoId=6390511951112

Configurations:

Expose an Agent (Agent1) for external access (so other agents can call it)
Configure another agent to connect to it via Connect Agent (A2A connector)
Validate the setup through a simple demo invocation
Prerequisites / Assumptions

· You have access to Dev Studio and the required privileges to edit Agent rules and Integration rules.

· Agent1 is already created and has the capabilities/actions you want to expose.

· You can access the Agent Card URL for Agent1 (typically ends with:
/.well-known/agent.json) Authentication mechanism is available (OAuth2 / token-based profiles depending on your environment).

Agent1 – Expose the Agent to Other Agents
To allow another agent to call Agent1 over A2A, you must enable External access on the Agent rule.

· Steps: Enable External Access

· In Dev Studio, click Records.

· Expand Generative AI and click Agent.

· Open the Agent instance you want to expose (Agent1).

· Go to the Settings tab.

· Enable External access.

· Click Save.

Enabling external access allows Pega to publish the agent’s metadata through an Agent Card, which other agents can discover and use to invoke supported capabilities.

Agent2 – Configure A2A Connectivity from Another Agent (Connect Agent)
Now configure the calling system (Agent2 or another Pega application) to connect to Agent1 using Connect Agent.

Steps:

· Create a Connect Agent Rule

· In the header, click Create > Integration-Connectors > Connect Agent.

· On the Create Connect Agent form:

· Configure the Agent URL (Agent Card). In the URL configuration section, provide Agent1’s Agent Card URL:

· Agent Card URL (Note: Agent card URLs typically end with: /.well-known/agent.json)

o Provide URL (same across environments) Enter the full URL to Agent1’s agent card. Example: https:///prweb/.well-known/agent.json

o OR

o Use application setting (recommended for multi-env deployments)
Select an application setting that stores environment-specific URLs

· Configure AuthenticationA2A typically involves two authentication points:

o Authentication for the Agent Card (Discovery)
In the Authentication section, under Agent card, select an authentication profile: OR

o Use application setting (recommended)
Point to an application setting that stores auth details
This profile contains credentials/token configuration needed to retrieve the agent card.

· Authentication for Execution (Invoking Agent Features). In the Execution section, provide an authentication profile used to run agent actions/capabilities exposed by Agent1.

o Use authentication profile (same across environments)
Use application setting (recommended across dev/test/prod)
This may be the same profile as “Agent card”, but in many enterprise setups it differs (discovery might be open internally, execution secured more strictly).

· Save the Connector
Click Save.

·

Pega GenAI Cookbook - Recipes series

Enjoyed this article? See more similar articles in Pega Cookbook - Recipes :fire::fire::fire: series.