latest refactoring
Some checks failed
validation / verify (push) Failing after 10s

This commit is contained in:
2026-10-06 20:22:37 +01:00
parent e94b2493e7
commit 7ee49ab352
414 changed files with 15768 additions and 3896 deletions

View File

@@ -1,40 +1,66 @@
"""AgentCard + skill declarations for GCP Solution Architecture Agent."""
"""The A2A agent card, derived from the dependency graph and settings."""
from typing import Any, Dict
from __future__ import annotations
AGENT_CARD: Dict[str, Any] = {
"name": "gcp_solution_architecture_agent",
"version": "1.0.0",
"description": (
"Automated Google Cloud Solution Architecture Agent executing an end-to-end "
"migration workflow: Pre-emptive Source Environment Discovery -> Requirements Discovery -> "
"Product Selection & Architecture Design -> Pre-deployment Validation -> Guide Packaging."
),
"capabilities": {
"phases": ["source_discover", "discover", "design", "validate", "package"],
"streaming": False,
"async": True,
"local_skills": [
"source_discovery",
"requirements_discovery",
"architecture_design",
"validation_rules",
"packaging_guide",
from a2a.types import (
AgentCapabilities,
AgentCard,
AgentInterface,
AgentProvider,
AgentSkill,
)
from app.config import Settings
from app.workflows.deliverables import PHASE_ORDER, deliverables_in
A2A_PATH = "/a2a"
def build_agent_card(settings: Settings) -> AgentCard:
base_url = (
settings.A2A_PUBLIC_URL or f"http://{settings.A2A_HOST}:{settings.A2A_PORT}"
).rstrip("/")
phases = "; ".join(
f"{phase.value}: {', '.join(kind.value for kind in deliverables_in(phase))}"
for phase in PHASE_ORDER
)
return AgentCard(
name=settings.AGENT_NAME,
description=(
"Designs a cloud solution architecture with you: requirements discovery, "
"grounded product selection, diagram, design recommendations, "
"infrastructure-as-code and dry-run validation, packaged as a solution "
f"guide. Cloud provider: {settings.CLOUD_PROVIDER}."
),
version=settings.AGENT_VERSION,
provider=AgentProvider(
organization="Kyndryl Agent Builder", url="https://www.kyndryl.com"
),
supported_interfaces=[
AgentInterface(
url=f"{base_url}{A2A_PATH}",
protocol_binding="JSONRPC",
protocol_version="1.0",
)
],
},
"metadata": {
"cloud_provider": "gcp",
"supported_outputs": [
"deliverables/as-is/source-architecture.md",
"deliverables/as-is/source-architecture.mmd",
"deliverables/target/requirements.md",
"deliverables/target/architecture.md",
"deliverables/target/architecture.mmd",
"deliverables/validation/validation-results.md",
"deliverables/guides/solution-architecture-guide.md",
"deliverables/executions/{execution_id}/*",
"terraform/main.tf",
capabilities=AgentCapabilities(streaming=True, push_notifications=False),
default_input_modes=["text/plain", "application/json"],
default_output_modes=["text/plain", "text/markdown", "application/json"],
skills=[
AgentSkill(
id="solution-architecture",
name="Cloud solution architecture",
description=(
"Interactive, multi-turn engagement. Phases and their Deliverables: "
f"{phases}. Each Phase needs your approval, sent as data."
),
tags=["architecture", "cloud", settings.CLOUD_PROVIDER, "terraform"],
examples=[
"Design a regional event ingestion platform on Google Cloud.",
"Migrate our on-premises order service to managed services.",
],
input_modes=["text/plain", "application/json"],
output_modes=["text/plain", "text/markdown", "application/json"],
)
],
},
}
)