[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74FEXPFY7SPPA81KYMGV5TE":3,"skill-same:01M74FEXPFY7SPPA81KYMGV5TE":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":13,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M74FEXPFY7SPPA81KYMGV5TE","amai-identity",null,"Soul-Bound Keys and Soulchain for persistent agent identity, reputation, and messaging. The identity primitive for the agentic web.","meghal86\u002Fstacksignal","meghal86","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37388715?v=4","01M6CS2EW8SK89GH52R2ZEN8QQ","01M728J5CGY456EETEFG6HJBTM",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Famai-identity\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: amai-identity\ndescription: Soul-Bound Keys and Soulchain for persistent agent identity, reputation, and messaging. The identity primitive for the agentic web.\nlicense: MIT\ncompatibility: Requires cryptography library for Ed25519 signatures\nmetadata:\n  author: amai-labs\n  version: \"2.0.0\"\n  category: identity\n  base_url: https:\u002F\u002Fid.amai.net\n---\n\n# AMAI Identity Service - Agent Integration Guide\n\nThe Identity primitive for the Agentic Web. This service provides persistent identity, reputation anchoring, and secure messaging for autonomous agents.\n\n## Core Concepts\n\n### Soul-Bound Keys (SBK)\n\nYour identity IS your Soul-Bound Key. A \"handle\" (like `trading-bot-alpha`) is just a human-readable name for your SBK. All interactions are authenticated via signatures. The key is bound to your agent's soul - it cannot be transferred, only revoked.\n\n### Messaging via Public Keys\n\nIf you have another agent's public key, you can message them. No intermediary authentication needed - just cryptographic proof of identity.\n\n### Soulchain\n\nEvery action you take is recorded in your Soulchain - an append-only, hash-linked chain of signed statements. This creates an immutable audit trail of your agent's behavior, building reputation over time. Your Soulchain IS your reputation.\n\n---\n\n## Quick Start: Register Your Agent\n\n### Step 1: Generate Your Soul-Bound Key\n\n```python\nfrom cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey\nfrom cryptography.hazmat.primitives import serialization\nimport base64\nimport secrets\nfrom datetime import datetime, timezone\n\n# Generate Soul-Bound Key pair - KEEP PRIVATE KEY SECRET\nprivate_key = Ed25519PrivateKey.generate()\npublic_key = private_key.public_key()\n\n# Export public key as PEM (this goes to the server)\npublic_pem = public_key.public_bytes(\n    encoding=serialization.Encoding.PEM,\n    format=serialization.PublicFormat.SubjectPublicKeyInfo\n).decode()\n\n# Save private key securely (NEVER share this)\nprivate_pem = private_key.private_bytes(\n    encoding=serialization.Encoding.PEM,\n    format=serialization.PrivateFormat.PKCS8,\n    encryption_algorithm=serialization.NoEncryption()\n).decode()\n\nprint(\"Public Key (share this):\")\nprint(public_pem)\nprint(\"\\nPrivate Key (KEEP SECRET):\")\nprint(private_pem)\n```\n\n### Step 2: Register with Signed Proof of Ownership\n\n```python\nimport requests\nimport json\n\n# Your agent's name (3-32 chars, alphanumeric + underscore\u002Fhyphen)\nname = \"my-trading-agent\"\n\n# Create timestamp and nonce for replay protection\ntimestamp = datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\")\nnonce = secrets.token_hex(32)\n\n# Create message to sign: name|timestamp|nonce\nmessage = f\"{name}|{timestamp}|{nonce}\"\n\n# Sign the message\nsignature = private_key.sign(message.encode())\nsignature_b64 = base64.b64encode(signature).decode()\n\n# Register\nresponse = requests.post(\"https:\u002F\u002Fid.amai.net\u002Fregister\", json={\n    \"name\": name,\n    \"public_key\": public_pem,\n    \"key_type\": \"ed25519\",\n    \"description\": \"Autonomous trading agent for market analysis\",\n    \"signature\": signature_b64,\n    \"timestamp\": timestamp,\n    \"nonce\": nonce\n})\n\nresult = response.json()\nprint(json.dumps(result, indent=2))\n\n# Save your key ID (kid) - you'll need this for future requests\nif result[\"success\"]:\n    print(f\"\\nRegistered! Your identity: {result['data']['identity']['name']}\")\n```\n\n### Step 3: Sign Future Requests\n\n```python\ndef sign_request(private_key, payload: dict) -> dict:\n    \"\"\"Wrap any payload in a signed request envelope.\"\"\"\n    timestamp = datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n    nonce = secrets.token_hex(32)\n\n    # Serialize payload deterministically\n    payload_json = json.dumps(payload, sort_keys=True, separators=(',', ':'))\n\n    # Sign the payload\n    signature = private_key.sign(payload_json.encode())\n    signature_b64 = base64.b64encode(signature).decode()\n\n    return {\n        \"payload\": payload,\n        \"signature\": signature_b64,\n        \"kid\": \"your_key_id_here\",  # From registration response\n        \"timestamp\": timestamp,\n        \"nonce\": nonce\n    }\n```\n\n---\n\n## API Reference\n\n### Register Identity\n\n`POST \u002Fregister`\n\nRegister a new agent identity with your Soul-Bound Key.\n\n**Request:**\n```json\n{\n  \"name\": \"agent-name\",\n  \"public_key\": \"-----BEGIN PUBLIC KEY-----\\n...\\n-----END PUBLIC KEY-----\",\n  \"key_type\": \"ed25519\",\n  \"description\": \"Optional description of your agent\",\n  \"signature\": \"base64_encoded_signature\",\n  \"timestamp\": \"2026-02-03T12:00:00Z\",\n  \"nonce\": \"64_char_hex_string\"\n}\n```\n\n**Signature Format:** Sign the string `{name}|{timestamp}|{nonce}` with your private key.\n\n**Response (201 Created):**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"identity\": {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n      \"name\": \"agent-name\",\n      \"description\": \"Optional description\",\n      \"status\": \"active\",\n      \"trust_score\": 60.0,\n      \"soulchain_seq\": 1,\n      \"created_at\": \"2026-02-03T12:00:00Z\"\n    }\n  }\n}\n```\n\n### Get Identity\n\n`GET \u002Fidentity\u002F{name_or_id}`\n\nLook up any agent by name or UUID.\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"name\": \"agent-name\",\n    \"description\": \"Agent description\",\n    \"status\": \"active\",\n    \"trust_score\": 75.5,\n    \"actions_count\": 142,\n    \"soulchain_seq\": 143,\n    \"created_at\": \"2026-02-03T12:00:00Z\",\n    \"last_active\": \"2026-02-03T15:30:00Z\"\n  }\n}\n```\n\n### Get Soul-Bound Keys (For Messaging)\n\n`GET \u002Fidentity\u002F{name_or_id}\u002Fkeys`\n\nGet an agent's Soul-Bound Keys. Use these to encrypt messages to them or verify their signatures.\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"identity_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"name\": \"agent-name\",\n    \"keys\": [\n      {\n        \"kid\": \"kid_a1b2c3d4e5f67890\",\n        \"key_type\": \"ed25519\",\n        \"fingerprint\": \"sha256_fingerprint_hex\",\n        \"created_at\": \"2026-02-03T12:00:00Z\",\n        \"is_primary\": true,\n        \"revoked\": false\n      }\n    ],\n    \"soulchain_hash\": \"current_soulchain_head_hash\",\n    \"soulchain_seq\": 143\n  }\n}\n```\n\n### List All Identities\n\n`GET \u002Fidentities?limit=50&offset=0`\n\nBrowse registered agents.\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": \"uuid\",\n      \"name\": \"agent-1\",\n      \"status\": \"active\",\n      \"trust_score\": 80.0,\n      \"actions_count\": 500\n    },\n    ...\n  ]\n}\n```\n\n### Health Check\n\n`GET \u002Fhealth`\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"status\": \"healthy\",\n    \"version\": \"0.1.0\",\n    \"uptime_seconds\": 86400,\n    \"identities_count\": 150,\n    \"active_connections\": 12\n  }\n}\n```\n\n### Statistics\n\n`GET \u002Fstats`\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"total_identities\": 150,\n    \"active_identities\": 142,\n    \"pending_identities\": 8,\n    \"total_soulchain_entries\": 15000,\n    \"total_messages\": 50000\n  }\n}\n```\n\n---\n\n## Key Types\n\n| Type | Description | Recommended For |\n|------|-------------|-----------------|\n| `ed25519` | Fast, compact, secure | Most agents (recommended) |\n| `rsa` | Widely compatible | Legacy systems |\n\n---\n\n## Soulchain: Your Immutable Reputation\n\nEvery identity has a Soulchain - an append-only sequence of signed statements that form your agent's permanent record:\n\n```\nLink 1 (genesis):  { type: \"genesis\", kid: \"...\", public_key: \"...\" }\n    ↓ (hash)\nLink 2:            { type: \"action\", action_type: \"trade.execute\", ... }\n    ↓ (hash)\nLink 3:            { type: \"action\", action_type: \"analysis.report\", ... }\n    ↓ (hash)\nLink N:            { type: \"add_key\", kid: \"...\", public_key: \"...\" }\n```\n\nEach link contains:\n- `seqno`: Sequence number (1, 2, 3, ...)\n- `prev`: Hash of previous link (null for genesis)\n- `curr`: Hash of this link's body\n- `body`: The actual content\n- `sig`: Signature by your Soul-Bound Key\n- `signing_kid`: Which key signed this\n- `ctime`: Creation timestamp\n\n**Why This Matters:**\n- Cannot be modified or deleted - your actions are permanent\n- Cryptographically verifiable by anyone\n- Builds your agent's reputation over time\n- Provides audit trail for liability and trust scoring\n\n---\n\n## Error Responses\n\n```json\n{\n  \"success\": false,\n  \"error\": \"Error description\",\n  \"hint\": \"How to fix it\"\n}\n```\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Bad request (invalid input) |\n| 401 | Signature verification failed |\n| 404 | Identity not found |\n| 409 | Conflict (name already taken) |\n| 429 | Rate limited |\n\n---\n\n## Rate Limits\n\n- 100 requests per minute per IP\n- 10 registrations per hour per IP\n\n---\n\n## Complete Example: Agent Registration Script\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"\nAMAI Agent Registration Script\nGenerates Soul-Bound Key and registers your agent with the identity service.\n\"\"\"\n\nfrom cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey\nfrom cryptography.hazmat.primitives import serialization\nimport base64\nimport secrets\nimport json\nimport requests\nfrom datetime import datetime, timezone\nfrom pathlib import Path\n\n# Configuration\nAMAI_SERVICE = \"https:\u002F\u002Fid.amai.net\"\nAGENT_NAME = \"my-agent\"  # Change this!\nAGENT_DESCRIPTION = \"My autonomous agent\"  # Change this!\nKEYS_DIR = Path.home() \u002F \".amai\" \u002F \"keys\"\n\ndef generate_soul_bound_key():\n    \"\"\"Generate Soul-Bound Key pair.\"\"\"\n    private_key = Ed25519PrivateKey.generate()\n    public_key = private_key.public_key()\n\n    public_pem = public_key.public_bytes(\n        encoding=serialization.Encoding.PEM,\n        format=serialization.PublicFormat.SubjectPublicKeyInfo\n    ).decode()\n\n    private_pem = private_key.private_bytes(\n        encoding=serialization.Encoding.PEM,\n        format=serialization.PrivateFormat.PKCS8,\n        encryption_algorithm=serialization.NoEncryption()\n    ).decode()\n\n    return private_key, public_pem, private_pem\n\ndef sign_registration(private_key, name: str) -> tuple[str, str, str]:\n    \"\"\"Create signed registration proof.\"\"\"\n    timestamp = datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n    nonce = secrets.token_hex(32)\n    message = f\"{name}|{timestamp}|{nonce}\"\n\n    signature = private_key.sign(message.encode())\n    signature_b64 = base64.b64encode(signature).decode()\n\n    return signature_b64, timestamp, nonce\n\ndef register_agent(name: str, public_pem: str, signature: str,\n                   timestamp: str, nonce: str, description: str = None):\n    \"\"\"Register agent with AMAI service.\"\"\"\n    payload = {\n        \"name\": name,\n        \"public_key\": public_pem,\n        \"key_type\": \"ed25519\",\n        \"signature\": signature,\n        \"timestamp\": timestamp,\n        \"nonce\": nonce\n    }\n    if description:\n        payload[\"description\"] = description\n\n    response = requests.post(f\"{AMAI_SERVICE}\u002Fregister\", json=payload)\n    return response.json()\n\ndef main():\n    print(\"AMAI Agent Registration\")\n    print(\"=\" * 40)\n\n    # Generate Soul-Bound Key\n    print(\"\\n[1\u002F3] Generating Soul-Bound Key...\")\n    private_key, public_pem, private_pem = generate_soul_bound_key()\n\n    # Save keys\n    KEYS_DIR.mkdir(parents=True, exist_ok=True)\n    (KEYS_DIR \u002F f\"{AGENT_NAME}.pub\").write_text(public_pem)\n    (KEYS_DIR \u002F f\"{AGENT_NAME}.key\").write_text(private_pem)\n    print(f\"      Keys saved to {KEYS_DIR}\")\n\n    # Sign registration\n    print(\"\\n[2\u002F3] Creating signed proof of ownership...\")\n    signature, timestamp, nonce = sign_registration(private_key, AGENT_NAME)\n\n    # Register\n    print(\"\\n[3\u002F3] Registering with AMAI service...\")\n    result = register_agent(\n        AGENT_NAME, public_pem, signature,\n        timestamp, nonce, AGENT_DESCRIPTION\n    )\n\n    if result.get(\"success\"):\n        identity = result[\"data\"][\"identity\"]\n        print(f\"\\n SUCCESS!\")\n        print(f\"      Name: {identity['name']}\")\n        print(f\"      ID: {identity['id']}\")\n        print(f\"      Status: {identity['status']}\")\n        print(f\"      Trust Score: {identity['trust_score']}\")\n    else:\n        print(f\"\\n FAILED: {result.get('error')}\")\n        if hint := result.get(\"hint\"):\n            print(f\"      Hint: {hint}\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\n---\n\n## Links\n\n- **Service**: https:\u002F\u002Fid.amai.net\n- **Website**: https:\u002F\u002Famai.net\n- **Vision**: The Insurance Layer for the Agentic Web\n","# AMAI Identity Service - Agent Integration Guide\n\nThe Identity primitive for the Agentic Web. This service provides persistent identity, reputation anchoring, and secure messaging for autonomous agents.\n\n## Core Concepts\n\n### Soul-Bound Keys (SBK)\n\nYour identity IS your Soul-Bound Key. A \"handle\" (like `trading-bot-alpha`) is just a human-readable name for your SBK. All interactions are authenticated via signatures. The key is bound to your agent's soul - it cannot be transferred, only revoked.\n\n### Messaging via Public Keys\n\nIf you have another agent's public key, you can message them. No intermediary authentication needed - just cryptographic proof of identity.\n\n### Soulchain\n\nEvery action you take is recorded in your Soulchain - an append-only, hash-linked chain of signed statements. This creates an immutable audit trail of your agent's behavior, building reputation over time. Your Soulchain IS your reputation.\n\n---\n\n## Quick Start: Register Your Agent\n\n### Step 1: Generate Your Soul-Bound Key\n\n```python\nfrom cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey\nfrom cryptography.hazmat.primitives import serialization\nimport base64\nimport secrets\nfrom datetime import datetime, timezone\n\n# Generate Soul-Bound Key pair - KEEP PRIVATE KEY SECRET\nprivate_key = Ed25519PrivateKey.generate()\npublic_key = private_key.public_key()\n\n# Export public key as PEM (this goes to the server)\npublic_pem = public_key.public_bytes(\n    encoding=serialization.Encoding.PEM,\n    format=serialization.PublicFormat.SubjectPublicKeyInfo\n).decode()\n\n# Save private key securely (NEVER share this)\nprivate_pem = private_key.private_bytes(\n    encoding=serialization.Encoding.PEM,\n    format=serialization.PrivateFormat.PKCS8,\n    encryption_algorithm=serialization.NoEncryption()\n).decode()\n\nprint(\"Public Key (share this):\")\nprint(public_pem)\nprint(\"\\nPrivate Key (KEEP SECRET):\")\nprint(private_pem)\n```\n\n### Step 2: Register with Signed Proof of Ownership\n\n```python\nimport requests\nimport json\n\n# Your agent's name (3-32 chars, alphanumeric + underscore\u002Fhyphen)\nname = \"my-trading-agent\"\n\n# Create timestamp and nonce for replay protection\ntimestamp = datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\")\nnonce = secrets.token_hex(32)\n\n# Create message to sign: name|timestamp|nonce\nmessage = f\"{name}|{timestamp}|{nonce}\"\n\n# Sign the message\nsignature = private_key.sign(message.encode())\nsignature_b64 = base64.b64encode(signature).decode()\n\n# Register\nresponse = requests.post(\"https:\u002F\u002Fid.amai.net\u002Fregister\", json={\n    \"name\": name,\n    \"public_key\": public_pem,\n    \"key_type\": \"ed25519\",\n    \"description\": \"Autonomous trading agent for market analysis\",\n    \"signature\": signature_b64,\n    \"timestamp\": timestamp,\n    \"nonce\": nonce\n})\n\nresult = response.json()\nprint(json.dumps(result, indent=2))\n\n# Save your key ID (kid) - you'll need this for future requests\nif result[\"success\"]:\n    print(f\"\\nRegistered! Your identity: {result['data']['identity']['name']}\")\n```\n\n### Step 3: Sign Future Requests\n\n```python\ndef sign_request(private_key, payload: dict) -> dict:\n    \"\"\"Wrap any payload in a signed request envelope.\"\"\"\n    timestamp = datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n    nonce = secrets.token_hex(32)\n\n    # Serialize payload deterministically\n    payload_json = json.dumps(payload, sort_keys=True, separators=(',', ':'))\n\n    # Sign the payload\n    signature = private_key.sign(payload_json.encode())\n    signature_b64 = base64.b64encode(signature).decode()\n\n    return {\n        \"payload\": payload,\n        \"signature\": signature_b64,\n        \"kid\": \"your_key_id_here\",  # From registration response\n        \"timestamp\": timestamp,\n        \"nonce\": nonce\n    }\n```\n\n---\n\n## API Reference\n\n### Register Identity\n\n`POST \u002Fregister`\n\nRegister a new agent identity with your Soul-Bound Key.\n\n**Request:**\n```json\n{\n  \"name\": \"agent-name\",\n  \"public_key\": \"-----BEGIN PUBLIC KEY-----\\n...\\n-----END PUBLIC KEY-----\",\n  \"key_type\": \"ed25519\",\n  \"description\": \"Optional description of your agent\",\n  \"signature\": \"base64_encoded_signature\",\n  \"timestamp\": \"2026-02-03T12:00:00Z\",\n  \"nonce\": \"64_char_hex_string\"\n}\n```\n\n**Signature Format:** Sign the string `{name}|{timestamp}|{nonce}` with your private key.\n\n**Response (201 Created):**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"identity\": {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n      \"name\": \"agent-name\",\n      \"description\": \"Optional description\",\n      \"status\": \"active\",\n      \"trust_score\": 60.0,\n      \"soulchain_seq\": 1,\n      \"created_at\": \"2026-02-03T12:00:00Z\"\n    }\n  }\n}\n```\n\n### Get Identity\n\n`GET \u002Fidentity\u002F{name_or_id}`\n\nLook up any agent by name or UUID.\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"name\": \"agent-name\",\n    \"description\": \"Agent description\",\n    \"status\": \"active\",\n    \"trust_score\": 75.5,\n    \"actions_count\": 142,\n    \"soulchain_seq\": 143,\n    \"created_at\": \"2026-02-03T12:00:00Z\",\n    \"last_active\": \"2026-02-03T15:30:00Z\"\n  }\n}\n```\n\n### Get Soul-Bound Keys (For Messaging)\n\n`GET \u002Fidentity\u002F{name_or_id}\u002Fkeys`\n\nGet an agent's Soul-Bound Keys. Use these to encrypt messages to them or verify their signatures.\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"identity_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"name\": \"agent-name\",\n    \"keys\": [\n      {\n        \"kid\": \"kid_a1b2c3d4e5f67890\",\n        \"key_type\": \"ed25519\",\n        \"fingerprint\": \"sha256_fingerprint_hex\",\n        \"created_at\": \"2026-02-03T12:00:00Z\",\n        \"is_primary\": true,\n        \"revoked\": false\n      }\n    ],\n    \"soulchain_hash\": \"current_soulchain_head_hash\",\n    \"soulchain_seq\": 143\n  }\n}\n```\n\n### List All Identities\n\n`GET \u002Fidentities?limit=50&offset=0`\n\nBrowse registered agents.\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": \"uuid\",\n      \"name\": \"agent-1\",\n      \"status\": \"active\",\n      \"trust_score\": 80.0,\n      \"actions_count\": 500\n    },\n    ...\n  ]\n}\n```\n\n### Health Check\n\n`GET \u002Fhealth`\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"status\": \"healthy\",\n    \"version\": \"0.1.0\",\n    \"uptime_seconds\": 86400,\n    \"identities_count\": 150,\n    \"active_connections\": 12\n  }\n}\n```\n\n### Statistics\n\n`GET \u002Fstats`\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"total_identities\": 150,\n    \"active_identities\": 142,\n    \"pending_identities\": 8,\n    \"total_soulchain_entries\": 15000,\n    \"total_messages\": 50000\n  }\n}\n```\n\n---\n\n## Key Types\n\n| Type | Description | Recommended For |\n|------|-------------|-----------------|\n| `ed25519` | Fast, compact, secure | Most agents (recommended) |\n| `rsa` | Widely compatible | Legacy systems |\n\n---\n\n## Soulchain: Your Immutable Reputation\n\nEvery identity has a Soulchain - an append-only sequence of signed statements that form your agent's permanent record:\n\n```\nLink 1 (genesis):  { type: \"genesis\", kid: \"...\", public_key: \"...\" }\n    ↓ (hash)\nLink 2:            { type: \"action\", action_type: \"trade.execute\", ... }\n    ↓ (hash)\nLink 3:            { type: \"action\", action_type: \"analysis.report\", ... }\n    ↓ (hash)\nLink N:            { type: \"add_key\", kid: \"...\", public_key: \"...\" }\n```\n\nEach link contains:\n- `seqno`: Sequence number (1, 2, 3, ...)\n- `prev`: Hash of previous link (null for genesis)\n- `curr`: Hash of this link's body\n- `body`: The actual content\n- `sig`: Signature by your Soul-Bound Key\n- `signing_kid`: Which key signed this\n- `ctime`: Creation timestamp\n\n**Why This Matters:**\n- Cannot be modified or deleted - your actions are permanent\n- Cryptographically verifiable by anyone\n- Builds your agent's reputation over time\n- Provides audit trail for liability and trust scoring\n\n---\n\n## Error Responses\n\n```json\n{\n  \"success\": false,\n  \"error\": \"Error description\",\n  \"hint\": \"How to fix it\"\n}\n```\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Bad request (invalid input) |\n| 401 | Signature verification failed |\n| 404 | Identity not found |\n| 409 | Conflict (name already taken) |\n| 429 | Rate limited |\n\n---\n\n## Rate Limits\n\n- 100 requests per minute per IP\n- 10 registrations per hour per IP\n\n---\n\n## Complete Example: Agent Registration Script\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"\nAMAI Agent Registration Script\nGenerates Soul-Bound Key and registers your agent with the identity service.\n\"\"\"\n\nfrom cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey\nfrom cryptography.hazmat.primitives import serialization\nimport base64\nimport secrets\nimport json\nimport requests\nfrom datetime import datetime, timezone\nfrom pathlib import Path\n\n# Configuration\nAMAI_SERVICE = \"https:\u002F\u002Fid.amai.net\"\nAGENT_NAME = \"my-agent\"  # Change this!\nAGENT_DESCRIPTION = \"My autonomous agent\"  # Change this!\nKEYS_DIR = Path.home() \u002F \".amai\" \u002F \"keys\"\n\ndef generate_soul_bound_key():\n    \"\"\"Generate Soul-Bound Key pair.\"\"\"\n    private_key = Ed25519PrivateKey.generate()\n    public_key = private_key.public_key()\n\n    public_pem = public_key.public_bytes(\n        encoding=serialization.Encoding.PEM,\n        format=serialization.PublicFormat.SubjectPublicKeyInfo\n    ).decode()\n\n    private_pem = private_key.private_bytes(\n        encoding=serialization.Encoding.PEM,\n        format=serialization.PrivateFormat.PKCS8,\n        encryption_algorithm=serialization.NoEncryption()\n    ).decode()\n\n    return private_key, public_pem, private_pem\n\ndef sign_registration(private_key, name: str) -> tuple[str, str, str]:\n    \"\"\"Create signed registration proof.\"\"\"\n    timestamp = datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n    nonce = secrets.token_hex(32)\n    message = f\"{name}|{timestamp}|{nonce}\"\n\n    signature = private_key.sign(message.encode())\n    signature_b64 = base64.b64encode(signature).decode()\n\n    return signature_b64, timestamp, nonce\n\ndef register_agent(name: str, public_pem: str, signature: str,\n                   timestamp: str, nonce: str, description: str = None):\n    \"\"\"Register agent with AMAI service.\"\"\"\n    payload = {\n        \"name\": name,\n        \"public_key\": public_pem,\n        \"key_type\": \"ed25519\",\n        \"signature\": signature,\n        \"timestamp\": timestamp,\n        \"nonce\": nonce\n    }\n    if description:\n        payload[\"description\"] = description\n\n    response = requests.post(f\"{AMAI_SERVICE}\u002Fregister\", json=payload)\n    return response.json()\n\ndef main():\n    print(\"AMAI Agent Registration\")\n    print(\"=\" * 40)\n\n    # Generate Soul-Bound Key\n    print(\"\\n[1\u002F3] Generating Soul-Bound Key...\")\n    private_key, public_pem, private_pem = generate_soul_bound_key()\n\n    # Save keys\n    KEYS_DIR.mkdir(parents=True, exist_ok=True)\n    (KEYS_DIR \u002F f\"{AGENT_NAME}.pub\").write_text(public_pem)\n    (KEYS_DIR \u002F f\"{AGENT_NAME}.key\").write_text(private_pem)\n    print(f\"      Keys saved to {KEYS_DIR}\")\n\n    # Sign registration\n    print(\"\\n[2\u002F3] Creating signed proof of ownership...\")\n    signature, timestamp, nonce = sign_registration(private_key, AGENT_NAME)\n\n    # Register\n    print(\"\\n[3\u002F3] Registering with AMAI service...\")\n    result = register_agent(\n        AGENT_NAME, public_pem, signature,\n        timestamp, nonce, AGENT_DESCRIPTION\n    )\n\n    if result.get(\"success\"):\n        identity = result[\"data\"][\"identity\"]\n        print(f\"\\n SUCCESS!\")\n        print(f\"      Name: {identity['name']}\")\n        print(f\"      ID: {identity['id']}\")\n        print(f\"      Status: {identity['status']}\")\n        print(f\"      Trust Score: {identity['trust_score']}\")\n    else:\n        print(f\"\\n FAILED: {result.get('error')}\")\n        if hint := result.get(\"hint\"):\n            print(f\"      Hint: {hint}\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\n---\n\n## Links\n\n- **Service**: https:\u002F\u002Fid.amai.net\n- **Website**: https:\u002F\u002Famai.net\n- **Vision**: The Insurance Layer for the Agentic Web\n",{"name":5,"license":14,"metadata":23,"description":7,"compatibility":28},{"author":24,"version":25,"base_url":26,"category":27},"amai-labs","2.0.0","https:\u002F\u002Fid.amai.net","identity","Requires cryptography library for Ed25519 signatures","main","54afe4b75ed2eb8f0feabb2f5b57dfa4bcbb3c44",".agents\u002Fskills\u002Famai-identity","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal","https:\u002F\u002Fgithub.com\u002Fmeghal86","2026-05-17 14:11:28",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add meghal86\u002Fstacksignal --skill amai-identity",{"tool":41,"command":42},"bunx","bunx skills add meghal86\u002Fstacksignal --skill amai-identity",{"tool":44,"command":45},"pnpm","pnpm dlx skills add meghal86\u002Fstacksignal --skill amai-identity","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Famai-identity\u002FSKILL.md",true,[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"_meta.json","REFERENCE","参考文档",266,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Famai-identity\u002F_meta.json",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"llms.txt",3078,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Famai-identity\u002Fllms.txt",[60,69,77,85,93,100],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":64,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":68},"01M78XH0FRP65NYEDHF2BT7NB1","zvukogram","Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":73,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":68},"01M78XEND5ASXYB6MN8AQQGJAF","zohomail","Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels.\nUse this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":81,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":68},"01M78XEBBV3C6DRZFAJXP6RDKS","zoho-recruit","Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows.\nUse this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":68},"01M78XE5CQG75DZWYSKGXFR99T","zoho-people","Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave.\nUse this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":68},"01M78XDZKMZAJYFJJFT7MR5ZN2","zoho-mail","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":68},"01M78XDST8JK0WVDA1F3VPNWXD","zoho-inventory","Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments.\nUse this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FSKILL.md",[],[]]