Orchardcore ai a2a client

From CrestApps/CrestApps.AgentSkills · View interactive version

Orchardcore ai a2a client is an AI agent skill from the GitHub repository CrestApps/CrestApps.AgentSkills. Skill for the CrestApps Orchard Core A2A Client feature (CrestApps.OrchardCore.AI.A2A), which connects AI profiles to remote Agent-to-Agent hosts. Covers the Agent to Agent Hosts admin screen, endpoint and agent-card discovery at /.well-known/agent-card.json with A2A 1.0 supportedInterfaces, A2AConn

How to use this skill

Skill file

Orchard Core A2A Client

The A2A Client feature lets Orchard Core AI experiences call agents hosted on other A2A servers, including other Orchard Core sites running the A2A Host feature (orchardcore-ai-a2a-host).

Guidelines

Enable the feature

{
  "steps": [
    {
      "name": "Feature",
      "enable": [
        "CrestApps.OrchardCore.AI",
        "CrestApps.OrchardCore.AI.A2A"
      ],
      "disable": []
    }
  ]
}

Add a connection

  1. Open Artificial Intelligence → Agent to Agent Hosts and click Add Connection.
  2. Enter a Title, the host Endpoint (for example https://agents.example.com), and an Authentication method.
  3. Save. The list (AdminList name A2AConnections, see orchardcore-admin-lists) shows each connection with its endpoint.

The client posts messages to the Endpoint itself and registers the agent card's skills as tools. For

the A2A host of another CrestApps site, enter that site's address followed by /a2a, and set

ExposeAgentsAsSkill to true on the host so its agents are listed as skills (orchardcore-ai-a2a-host).

Authentication types (`A2AConnectionMetadata.AuthenticationType`)

| Value | Fields |

|---|---|

| Anonymous | None (default) |

| ApiKey | ApiKey, ApiKeyHeaderName, optional ApiKeyPrefix such as Bearer |

| Basic | BasicUsername, BasicPassword |

| OAuth2ClientCredentials | OAuth2TokenEndpoint, OAuth2ClientId, OAuth2ClientSecret, OAuth2Scopes |

| OAuth2PrivateKeyJwt | OAuth2TokenEndpoint, OAuth2ClientId, OAuth2PrivateKey (PEM), optional OAuth2KeyId, OAuth2Scopes |

| OAuth2Mtls | OAuth2TokenEndpoint, OAuth2ClientId, OAuth2ClientCertificate (Base64 PFX), optional OAuth2ClientCertificatePassword, OAuth2Scopes |

| CustomHeaders | AdditionalHeaders as a JSON object |

To call an Orchard Core A2A host in ApiKey mode, use ApiKeyHeaderName Authorization and prefix ApiKey or Bearer.

Recipe step

The A2AConnection step creates connections, or updates the one whose ItemId matches. DisplayText and Endpoint are required, and the endpoint must be an absolute HTTP or HTTPS URL.

{
  "steps": [
    {
      "name": "A2AConnection",
      "Connections": [
        {
          "DisplayText": "Production agent hub",
          "Endpoint": "https://agents.example.com",
          "Properties": {
            "A2AConnectionMetadata": {
              "AuthenticationType": "ApiKey",
              "ApiKeyHeaderName": "Authorization",
              "ApiKeyPrefix": "ApiKey",
              "ApiKey": "{{AgentHubApiKey}}"
            }
          }
        }
      ]
    }
  ]
}

Secrets supplied in the recipe are encrypted on import. The module registers no deployment step for A2A connections, so recreate them per environment with a recipe.

Assign connections

| Surface | Where |

|---|---|

| AI Profile | Capabilities tab, A2A Connections |

| AI Profile Template (Profile source) | Capabilities tab, A2A Connections |

| Chat Interaction | Capabilities tab, A2A Connections |

| AI Completion using Direct Config workflow task | Capabilities tab (needs CrestApps.OrchardCore.AI.Chat.Interactions and OrchardCore.Workflows) |

The section renders only when at least one connection exists.

How remote agents run

  1. The client fetches and caches each selected host's agent card.
  2. Each agent skill on the card is registered as an AI tool.
  3. When the model picks one, A2AAgentProxyTool sends the message to the agent's interface URL with the connection's credentials.
  4. The remote reply is returned to the model as tool output.

The client also contributes system functions the orchestrator can use:

| Function | Purpose |

|---|---|

| listAvailableAgents | Lists local and remote agents |

| findAgentForTask | Finds the best-matching agent for a task |

| findToolsForTask | Finds the best-matching AI tools for a task |

Upgrading from 2.x

Troubleshooting

| Symptom | Check |

|---|---|

| No remote tools appear | The connection is not selected on the profile, the card fetch failed, or the card was cached before the host changed (wait 15 minutes or re-save the connection). |

| 401 from the remote host | Authentication type, header name, or prefix does not match what the host expects. |

| Calls reach the wrong URL | Inspect the host's agent card supportedInterfaces; the client calls the URL the card advertises. |

| Validation error on import | Endpoint is missing or not an absolute HTTP or HTTPS URL. |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.