Skip to content

Agent-to-Agent (A2A)

The Agent-to-Agent (A2A) page allows you to configure interactions between different AI agents. This enables agents to share capabilities, hand off conversations to specialized experts, or trigger processes managed by other agents within the PinionAI ecosystem.

Prerequisites

Before you can manage A2A interactions, ensure the following:

  1. You are logged into the application.
  2. Your user role has the necessary permissions (owner, admin, or a2a).
  3. You have an Account and an Agent selected from the sidebar.

Page Overview

The page provides functionalities to:

  • Add new A2A configurations.
  • Use an AI assistant to suggest interaction structures and variable mappings.
  • List existing A2A configurations associated with the selected agent.
  • Edit, duplicate, or delete existing configurations.
  • Configure target agents, even across different accounts or instances.

Creating a New A2A Interaction

To create a new A2A interaction, click on the "New A2A" expander.

Helper Buttons

  • AI Suggest Configuration: Opens a dialog where you can describe your goal (e.g., "Call the Sales agent to check product availability"), and the AI will architect the interaction method, variables, and parameters for you.
  • Add Variable: Opens a dialog to create a new variable directly on this page.
  • Lookup Names: Opens a lookup dialog to find exact names of existing Agents, Variables, and Connectors.

Configuration Fields

1. General Info

  • A2A Config Name: A unique identifier for this interaction.
  • Status: A toggle to enable or disable the A2A config.
  • Agent(s): Select which agents are permitted to trigger this interaction.
  • Description: Optional notes about the interaction's purpose.

2. Target Agent Configuration

  • Target Agent: Select the destination agent from the list of all agents in the system.
  • Version: (Optional) Specify a target version (e.g., v2.1). Defaults to latest.
  • Target Agent Name: The name stored locally for this interaction.
  • Target Agent URL: (Optional) Required if the target agent is hosted on a different instance or is an external endpoint.

3. Interaction Configuration

  • Method:
    • internal: Merges the target agent's configuration (intents, prompts, scripts) directly into the current session. Best for sharing capabilities within the same instance.
    • rest: Performs an HTTP POST request to the target agent's processing API. Used for decoupled or cross-instance communication.
    • grpc: Initiates a real-time gRPC sub-session with the target agent for low-latency, streaming interactions.
  • Input Variable: The variable containing the primary message to send to the target agent.
  • Result Variable: The variable where the target agent's response will be stored.
  • Parameters Map (JSON): A mapping to pass additional context variables.
    • Example: {"customer_tier": "{var['tier']}", "locale": "en-US"}

4. Connectivity & Auth

  • Connector: Select an authentication connector if the interaction requires specific credentials (especially for rest or cross-account internal calls).

Managing Existing A2As

Existing configurations are listed in expanders. - Edit (:material/edit:): Modify the connection or interaction logic. - Duplicate (:material/content_copy:): Create a copy of the configuration to quickly set up a similar interaction. - Delete (:material/delete:): Permanently remove the A2A configuration.

Configuration Examples

Example 1: Internal Capability Sharing

Allows a "Receptionist Agent" to use the specialized search tools of a "Knowledge Agent".

  • Method: internal
  • Target Agent: Knowledge_Base_Agent
  • Description: Merge knowledge base capabilities into the current receptionist session.

Example 2: REST Call for Translation

Sends a user's input to a dedicated "Translation Agent" and retrieves the translated result.

  • Method: rest
  • Target Agent: Global_Translator
  • Input Variable: last_user_message
  • Result Variable: translated_message
  • Parameters Map: {"target_lang": "es-ES"}

Example 3: gRPC Technical Support Handoff

Hands off a complex technical query from a "General Support" agent to a "Tier 2 Specialist".

  • Method: grpc
  • Target Agent: Tech_Lead_Agent
  • Input Variable: issue_description
  • Result Variable: specialist_response
  • Connector: internal_secure_grpc