Orchardcore ai a2a host

From CrestApps/CrestApps.AgentSkills · View interactive version

Orchardcore ai a2a host is an AI agent skill from the GitHub repository CrestApps/CrestApps.AgentSkills. Skill for the CrestApps Orchard Core A2A Host feature (CrestApps.OrchardCore.AI.A2A.Host), which exposes AI profiles of type Agent through the Agent-to-Agent protocol. Covers the public /.well-known/agent-card.json discovery endpoint, A2A 1.0 agent cards that publish their endpoint in supportedInter

How to use this skill

Skill file

Orchard Core A2A Host

The A2A Host feature makes every AI profile of type Agent discoverable and callable by external A2A clients, including another Orchard Core site running the A2A Client feature (orchardcore-ai-a2a-client).

Guidelines

Enable the feature

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

Create agent profiles

Create an AI profile with Profile type set to Agent in the admin, or import one. Bind deployments by technical name; see orchardcore-ai for the full profile contract.

{
  "steps": [
    {
      "name": "AIProfile",
      "profiles": [
        {
          "Name": "research-agent",
          "DisplayText": "Research Agent",
          "Description": "Researches topics and returns sourced summaries.",
          "Type": "Agent",
          "ChatDeploymentName": "research-chat",
          "Properties": {
            "AIProfileMetadata": {
              "SystemMessage": "You are a research assistant.",
              "Temperature": 0.2,
              "MaxTokens": 4096
            },
            "AgentMetadata": {
              "Availability": "OnDemand"
            }
          }
        }
      ]
    }
  ]
}

Endpoints

| Endpoint | Purpose |

|---|---|

| GET /.well-known/agent-card.json | Discovery. A JSON array of cards in multi-agent mode, one combined card in skill mode. |

| /a2a | A2A JSON-RPC endpoint. |

| /a2a?agent={agentName} | Targets one agent in multi-agent mode. |

Messages are routed by the agent query parameter first, then by an agentName entry in the message metadata, and otherwise to the first agent profile. The host supports streaming; task subscription and push notifications are not supported.

Exposure modes

| Mode | Setting | Card shape |

|---|---|---|

| Multi-agent (default) | ExposeAgentsAsSkill: false | One card per agent; each supportedInterfaces entry points to /a2a?agent={agentName} |

| Skill | ExposeAgentsAsSkill: true | One card whose skills are the agents; clients route with agentName metadata |

A multi-agent card looks like this (trimmed):

[
  {
    "name": "Research Agent",
    "description": "Researches topics and returns sourced summaries.",
    "supportedInterfaces": [
      { "url": "https://example.com/a2a?agent=research-agent", "protocolBinding": "JSONRPC" }
    ],
    "capabilities": { "streaming": true }
  }
]

Configuration

{
  "OrchardCore": {
    "CrestApps": {
      "AI": {
        "A2AHost": {
          "AuthenticationType": "ApiKey",
          "ApiKey": "{{A2AHostApiKey}}",
          "RequireAccessPermission": true,
          "ExposeAgentsAsSkill": false
        }
      }
    }
  }
}

| Setting | Default | Description |

|---|---|---|

| AuthenticationType | OpenId | OpenId, ApiKey, or None |

| ApiKey | | Key required in ApiKey mode |

| RequireAccessPermission | true | Authenticated callers also need AccessA2AHost |

| ExposeAgentsAsSkill | false | Combine all agents into one card |

The older OrchardCore:CrestApps:A2AHost section is still read first for backward compatibility; prefer OrchardCore:CrestApps:AI:A2AHost. Configuration changes need an app restart.

Authentication on the card

| Mode | Advertised security scheme | Client sends |

|---|---|---|

| OpenId | openId, with {host}/.well-known/openid-configuration | Authorization: Bearer <token> from the Orchard Core OpenID server (Api scheme) |

| ApiKey | apiKey in the Authorization header | Authorization: Bearer <key> or Authorization: ApiKey <key> |

| None | none | nothing |

AccessA2AHost is security critical and is not granted to any role by default; grant it to the role or OpenID application that calls the host.

Usage analytics

Completions run for A2A requests are labelled with the A2A usage category, so they appear under that category in AI Usage Analytics (orchardcore-ai-usage-analytics).

Upgrading from 2.x

Troubleshooting

| Symptom | Check |

|---|---|

| The card array is empty | No AI profile has type Agent. |

| A client reports a missing endpoint | It still reads url; update it to A2A 1.0 supportedInterfaces. |

| 401 or 403 on /a2a | Credentials do not match AuthenticationType, or the caller lacks AccessA2AHost. |

| Card URLs miss the tenant prefix | Card URLs are built from the request scheme and host. Verify the advertised interface URL on prefixed tenants and behind reverse proxies. |

| The wrong agent answers | Send ?agent={name} (multi-agent) or agentName metadata (skill mode); otherwise the first agent answers. |

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.