算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
design-a2a-agent-card【设计与创意】Design an A2A Agent Card (.well-known/agent.json) manifest describing agent capabilities, skills, authentication requirements, and supported content types. Use when building an agent that must be discoverable by other A2A-compliant agents, exposing capabilities for multi-agent orchestration, migrating an existing agent to the A2A protocol, defining t…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
建合標之 A2A Agent Card,告代理之身、技、認證、能,供他代理發現。
none、oauth2、oidc、api-key)text/plain 外之內容型(如 image/png、application/json)1.1. 擇代理身字段:
{
"name": "data-analysis-agent",
"description": "Performs statistical analysis, data visualization, and report generation on tabular datasets.",
"url": "https://agent.example.com",
"provider": {
"organization": "Example Corp",
"url": "https://example.com"
},
"version": "1.0.0"
}
1.2. 書明可行之述,答:
1.3. 設規範 URL,Agent Card 於 /.well-known/agent.json 服。
得: 全身塊,含名、述、URL、供應、版。
敗則: 若代理服多域,思宜為一代理多技,或多代理聚範。A2A 偏範清之聚焦代理。
2.1. 定代理可行諸技:
{
"skills": [
{
"id": "analyze-dataset",
"name": "Analyze Dataset",
"description": "Run descriptive statistics, correlation analysis, or hypothesis tests on a CSV dataset.",
"tags": ["statistics", "data-analysis", "csv"],
"examples": [
"Analyze the correlation between columns A and B in my dataset",
"Run a t-test comparing group 1 and group 2"
],
"inputModes": ["text/plain", "application/json"],
"outputModes": ["text/plain", "application/json", "image/png"]
},
{
"id": "generate-chart",
"name": "Generate Chart",
"description": "Create bar, line, scatter, or histogram charts from tabular data.",
"tags": ["visualization", "charts"],
"examples": [
"Create a scatter plot of height vs weight",
"Generate a histogram of the age column"
],
"inputModes": ["text/plain", "application/json"],
"outputModes": ["image/png", "image/svg+xml"]
}
]
}
2.2. 每技宜供:
2.3. 確技界清無疊。各任宜映唯一技。
得: 技陣,每項有 id、name、description、tags、examples 及 I/O 型。
敗則: 若技顯疊,合為一更廣技附多例。若技過廣,分為聚焦子技。
3.1. 依部署境定認證方案:
無認證(本地/信網):
{
"authentication": {
"schemes": []
}
}
OAuth 2.0(產宜):
{
"authentication": {
"schemes": ["oauth2"],
"credentials": {
"oauth2": {
"authorizationUrl": "https://auth.example.com/authorize",
"tokenUrl": "https://auth.example.com/token",
"scopes": {
"agent:invoke": "Invoke agent skills",
"agent:read": "Read task status"
}
}
}
}
}
API Key(簡共秘):
{
"authentication": {
"schemes": ["apiKey"],
"credentials": {
"apiKey": {
"headerName": "X-API-Key"
}
}
}
}
3.2. 擇合部署境最低可行認證:
noneapiKeyoauth2 或 oidc3.3. 將令牌/鑰發程記於 Agent Card 之 provider 段或外文檔。
得: 認證塊合部署安要。
敗則: 若無 OAuth 2.0 設施,由 API key 認證始,謀遷。勿以 none 認證部公代理。
4.1. 宣代理所支之協議特:
{
"capabilities": {
"streaming": true,
"pushNotifications": false,
"stateTransitionHistory": true
}
}
4.2. 依實裝備度設各能旗:
tasks/sendSubscribe 之 SSE 流,則 true。啟實時進度更供久任。true。代理宜存並呼 webhook URL。true。審計有用。4.3. 實裝全支乃設 true。告未支之能破互操。
得: 能塊含布爾旗合實實裝。
敗則: 若不定某能將實裝,設 false。能可後版加。移能為破壞之變。
5.1. 集全 Agent Card:
{
"name": "data-analysis-agent",
"description": "Performs statistical analysis and visualization on tabular datasets.",
"url": "https://agent.example.com",
"version": "1.0.0",
"provider": {
"organization": "Example Corp",
"url": "https://example.com"
},
"authentication": {
"schemes": ["oauth2"],
"credentials": { ... }
},
"capabilities": {
"streaming": true,
"pushNotifications": false,
"stateTransitionHistory": true
},
"skills": [ ... ],
"defaultInputModes": ["text/plain"],
"defaultOutputModes": ["text/plain"]
}
5.2. 驗 Agent Card:
/.well-known/agent.json 服卡5.3. 發布 Agent Card:
https://<agent-url>/.well-known/agent.json 服Content-Type: application/json5.4. 以取卡測發現:
curl -s https://agent.example.com/.well-known/agent.json | python3 -m json.tool
得: 有效 JSON Agent Card 於 well-known URL 服,諸 A2A 客可解。
敗則: 若 JSON 驗敗,以 linter 尋法錯。若 URL 不達,察 DNS、SSL 證書、web 伺配。若需 CORS,加 Access-Control-Allow-Origin 頭。
/.well-known/agent.json 以正 Content-Type 服streaming: true 或 pushNotifications: true 致客用時敗。宜保守。defaultInputModes 與 defaultOutputModes 略,客或不知送何內容型。implement-a2a-server - 實 Agent Card 後之服test-a2a-interop - 驗 Agent Card 合規與互操build-custom-mcp-server - MCP 伺為 A2A 之替/補configure-mcp-server - MCP 配模式可施 A2A 設