kya_create_card
Create identity cards for AI agents to document their purpose, capabilities, and ownership within safety frameworks.
Instructions
Create a KYA (Know Your Agent) identity card for an agent.
Args: agent_id: Unique ID in format "org/agent-name" (e.g. "luciferforge/research-bot"). name: Human-readable agent name. purpose: What this agent does (min 10 chars for validity). capabilities: Comma-separated list of capabilities (e.g. "text_generation,web_search"). owner_name: Owner/organization name. version: Agent version string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | ||
| name | No | ||
| purpose | No | ||
| capabilities | No | ||
| owner_name | No | ||
| version | No | 0.1.0 |
Implementation Reference
- src/agent_safety_mcp/server.py:390-429 (handler)The actual implementation of the kya_create_card tool which creates a KYA (Know Your Agent) identity card for an agent.
def kya_create_card( agent_id: str, name: str = "", purpose: str = "", capabilities: str = "", owner_name: str = "", version: str = "0.1.0", ) -> dict: """Create a KYA (Know Your Agent) identity card for an agent. Args: agent_id: Unique ID in format "org/agent-name" (e.g. "luciferforge/research-bot"). name: Human-readable agent name. purpose: What this agent does (min 10 chars for validity). capabilities: Comma-separated list of capabilities (e.g. "text_generation,web_search"). owner_name: Owner/organization name. version: Agent version string. """ caps_list = [c.strip() for c in capabilities.split(",") if c.strip()] if capabilities else [] caps_obj = {c: {"description": c, "risk_level": "low"} for c in caps_list} card = { "kya_version": "0.2", "agent_id": agent_id, "name": name or agent_id.split("/")[-1], "version": version, "purpose": purpose, "capabilities": caps_obj, "owner": {"name": owner_name or "unknown"}, } _kya_cards[agent_id] = card score = compute_completeness_score(card) return { "status": "created", "agent_id": agent_id, "completeness_score": score, "card": card, } - src/agent_safety_mcp/server.py:389-389 (registration)Registration of the kya_create_card function as an MCP tool using the @mcp.tool decorator.
@mcp.tool()