{
  "name": "AyniAgents",
  "version": "0.1.0",
  "summary": "Lightning-paid plugins where AI agents pay tribes of human contributors per call. Each payment fans out to all contributors in the same second — programmable ayni for the agent economy.",
  "homepage": "https://ayniw.com",
  "repo": "https://github.com/d3nn1sVZ/Ayni-agents",
  "contact": {
    "maintainer": "AyniAgents team — Hack Nation 5 / Spiral Challenge 02"
  },
  "payment": {
    "scheme": "L402",
    "spec": "https://docs.lightning.engineering/the-lightning-network/l402",
    "rail": "Lightning Network (Bitcoin mainnet)",
    "currency": "SAT",
    "flow": [
      "GET endpoint without Authorization → 402 Payment Required + Lightning invoice + macaroon",
      "pay invoice via any Lightning wallet (Phoenix, Alby, Strike, MDK agent-wallet, etc.)",
      "retry GET with header `Authorization: L402 <macaroon>:<preimage>` → 200 OK + plugin response"
    ],
    "verification": "sha256(preimage) === paymentHash from macaroon"
  },
  "redistribution": {
    "model": "collective",
    "description": "Each call's payment is automatically split among the tribu's human contributors per the splits configured in this manifest. Lightning makes sub-cent fan-out economically viable; traditional rails (Stripe, etc.) cannot do this because per-tx fees exceed the per-recipient amount."
  },
  "skills": [
    {
      "id": "tributario-pe",
      "name": "Tax PE",
      "description": "Experts in Peruvian tax law: VAT (IGV), Income Tax, SUNAT, RUC.",
      "endpoint": {
        "method": "GET",
        "url": "https://ayniw.com/api/ayni/tributario-pe",
        "params": {
          "q": "string — the query the agent wants answered, free-text natural language"
        }
      },
      "pricing": {
        "amount": 100,
        "currency": "SAT"
      },
      "contributors": [
        {
          "wallet": "@curador-3a8f",
          "role": "Lead curator",
          "sharePct": 40
        },
        {
          "wallet": "@validador-9b21",
          "role": "Legal validator",
          "sharePct": 30
        },
        {
          "wallet": "@contrib-7e44",
          "role": "Contributor",
          "sharePct": 10
        },
        {
          "wallet": "@contrib-d12c",
          "role": "Contributor",
          "sharePct": 10
        },
        {
          "wallet": "@contrib-5fa9",
          "role": "Contributor",
          "sharePct": 10
        }
      ],
      "splitExample": [
        {
          "wallet": "@curador-3a8f",
          "role": "Lead curator",
          "sats": 40
        },
        {
          "wallet": "@validador-9b21",
          "role": "Legal validator",
          "sats": 30
        },
        {
          "wallet": "@contrib-7e44",
          "role": "Contributor",
          "sats": 10
        },
        {
          "wallet": "@contrib-d12c",
          "role": "Contributor",
          "sats": 10
        },
        {
          "wallet": "@contrib-5fa9",
          "role": "Contributor",
          "sats": 10
        }
      ],
      "stats": {
        "rating": 4.7,
        "consultas": 2847
      },
      "example": {
        "request": {
          "method": "GET",
          "url": "https://ayniw.com/api/ayni/tributario-pe?q=%C2%BFqu%C3%A9%20es%20el%20IGV%3F"
        },
        "unauthenticatedResponse": {
          "status": 402,
          "headers": {
            "WWW-Authenticate": "L402 macaroon=\"<base64>\" invoice=\"lnbc...\""
          },
          "body": {
            "error": {
              "code": "payment_required",
              "message": "Payment required"
            },
            "macaroon": "<base64-encoded macaroon>",
            "invoice": "lnbc1u1p... (real BOLT11 Lightning invoice)",
            "paymentHash": "<hex>",
            "amountSats": 100,
            "expiresAt": "<unix-epoch-seconds>"
          }
        },
        "authenticatedResponse": {
          "status": 200,
          "body": {
            "tribu": {
              "id": "tributario-pe",
              "name": "Tax PE"
            },
            "query": "¿qué es el IGV?",
            "answer": "<the expert response from this tribu>",
            "ayni": {
              "paid": 100,
              "currency": "SAT",
              "splits": [
                {
                  "wallet": "@curador-3a8f",
                  "role": "Lead curator",
                  "sats": 40
                },
                {
                  "wallet": "@validador-9b21",
                  "role": "Legal validator",
                  "sats": 30
                },
                {
                  "wallet": "@contrib-7e44",
                  "role": "Contributor",
                  "sats": 10
                },
                {
                  "wallet": "@contrib-d12c",
                  "role": "Contributor",
                  "sats": 10
                },
                {
                  "wallet": "@contrib-5fa9",
                  "role": "Contributor",
                  "sats": 10
                }
              ]
            }
          }
        }
      }
    },
    {
      "id": "data-science-es",
      "name": "Data Science ES",
      "description": "ML, Python, statistics, and data analysis for the Spanish-speaking market.",
      "endpoint": {
        "method": "GET",
        "url": "https://ayniw.com/api/ayni/data-science-es",
        "params": {
          "q": "string — the query the agent wants answered, free-text natural language"
        }
      },
      "pricing": {
        "amount": 75,
        "currency": "SAT"
      },
      "contributors": [
        {
          "wallet": "@curador-ml5g",
          "role": "Lead curator",
          "sharePct": 50
        },
        {
          "wallet": "@contrib-py9x",
          "role": "Python Expert",
          "sharePct": 25
        },
        {
          "wallet": "@contrib-stat",
          "role": "Statistician",
          "sharePct": 25
        }
      ],
      "splitExample": [
        {
          "wallet": "@curador-ml5g",
          "role": "Lead curator",
          "sats": 39
        },
        {
          "wallet": "@contrib-py9x",
          "role": "Python Expert",
          "sats": 18
        },
        {
          "wallet": "@contrib-stat",
          "role": "Statistician",
          "sats": 18
        }
      ],
      "stats": {
        "rating": 4.9,
        "consultas": 1523
      },
      "example": {
        "request": {
          "method": "GET",
          "url": "https://ayniw.com/api/ayni/data-science-es?q=%C2%BFqu%C3%A9%20es%20el%20IGV%3F"
        },
        "unauthenticatedResponse": {
          "status": 402,
          "headers": {
            "WWW-Authenticate": "L402 macaroon=\"<base64>\" invoice=\"lnbc...\""
          },
          "body": {
            "error": {
              "code": "payment_required",
              "message": "Payment required"
            },
            "macaroon": "<base64-encoded macaroon>",
            "invoice": "lnbc1u1p... (real BOLT11 Lightning invoice)",
            "paymentHash": "<hex>",
            "amountSats": 75,
            "expiresAt": "<unix-epoch-seconds>"
          }
        },
        "authenticatedResponse": {
          "status": 200,
          "body": {
            "tribu": {
              "id": "data-science-es",
              "name": "Data Science ES"
            },
            "query": "¿qué es el IGV?",
            "answer": "<the expert response from this tribu>",
            "ayni": {
              "paid": 75,
              "currency": "SAT",
              "splits": [
                {
                  "wallet": "@curador-ml5g",
                  "role": "Lead curator",
                  "sats": 39
                },
                {
                  "wallet": "@contrib-py9x",
                  "role": "Python Expert",
                  "sats": 18
                },
                {
                  "wallet": "@contrib-stat",
                  "role": "Statistician",
                  "sats": 18
                }
              ]
            }
          }
        }
      }
    },
    {
      "id": "legal-mx",
      "name": "Legal MX",
      "description": "Mexican corporate and tax law. SAT, IMSS, contracts, SAS.",
      "endpoint": {
        "method": "GET",
        "url": "https://ayniw.com/api/ayni/legal-mx",
        "params": {
          "q": "string — the query the agent wants answered, free-text natural language"
        }
      },
      "pricing": {
        "amount": 150,
        "currency": "SAT"
      },
      "contributors": [
        {
          "wallet": "@curador-lex1",
          "role": "Lead curator",
          "sharePct": 35
        },
        {
          "wallet": "@abogado-corp",
          "role": "Corporate",
          "sharePct": 25
        },
        {
          "wallet": "@contador-mx3",
          "role": "Tax",
          "sharePct": 25
        },
        {
          "wallet": "@contrib-lab4",
          "role": "Labor",
          "sharePct": 15
        }
      ],
      "splitExample": [
        {
          "wallet": "@curador-lex1",
          "role": "Lead curator",
          "sats": 54
        },
        {
          "wallet": "@abogado-corp",
          "role": "Corporate",
          "sats": 37
        },
        {
          "wallet": "@contador-mx3",
          "role": "Tax",
          "sats": 37
        },
        {
          "wallet": "@contrib-lab4",
          "role": "Labor",
          "sats": 22
        }
      ],
      "stats": {
        "rating": 4.6,
        "consultas": 1891
      },
      "example": {
        "request": {
          "method": "GET",
          "url": "https://ayniw.com/api/ayni/legal-mx?q=%C2%BFqu%C3%A9%20es%20el%20IGV%3F"
        },
        "unauthenticatedResponse": {
          "status": 402,
          "headers": {
            "WWW-Authenticate": "L402 macaroon=\"<base64>\" invoice=\"lnbc...\""
          },
          "body": {
            "error": {
              "code": "payment_required",
              "message": "Payment required"
            },
            "macaroon": "<base64-encoded macaroon>",
            "invoice": "lnbc1u1p... (real BOLT11 Lightning invoice)",
            "paymentHash": "<hex>",
            "amountSats": 150,
            "expiresAt": "<unix-epoch-seconds>"
          }
        },
        "authenticatedResponse": {
          "status": 200,
          "body": {
            "tribu": {
              "id": "legal-mx",
              "name": "Legal MX"
            },
            "query": "¿qué es el IGV?",
            "answer": "<the expert response from this tribu>",
            "ayni": {
              "paid": 150,
              "currency": "SAT",
              "splits": [
                {
                  "wallet": "@curador-lex1",
                  "role": "Lead curator",
                  "sats": 54
                },
                {
                  "wallet": "@abogado-corp",
                  "role": "Corporate",
                  "sats": 37
                },
                {
                  "wallet": "@contador-mx3",
                  "role": "Tax",
                  "sats": 37
                },
                {
                  "wallet": "@contrib-lab4",
                  "role": "Labor",
                  "sats": 22
                }
              ]
            }
          }
        }
      }
    },
    {
      "id": "healthtech-bo",
      "name": "HealthTech BO",
      "description": "Bolivian medical protocols, generic medications, and clinical guidelines.",
      "endpoint": {
        "method": "GET",
        "url": "https://ayniw.com/api/ayni/healthtech-bo",
        "params": {
          "q": "string — the query the agent wants answered, free-text natural language"
        }
      },
      "pricing": {
        "amount": 200,
        "currency": "SAT"
      },
      "contributors": [
        {
          "wallet": "@medico-bo1f",
          "role": "Lead physician curator",
          "sharePct": 30
        },
        {
          "wallet": "@farmaco-2g9",
          "role": "Pharmacist",
          "sharePct": 20
        },
        {
          "wallet": "@enfermero-x5",
          "role": "Nursing",
          "sharePct": 15
        },
        {
          "wallet": "@medico-b3k1",
          "role": "Contributing physician",
          "sharePct": 15
        },
        {
          "wallet": "@salud-pub56",
          "role": "Public health",
          "sharePct": 10
        },
        {
          "wallet": "@investig-8h",
          "role": "Researcher",
          "sharePct": 10
        }
      ],
      "splitExample": [
        {
          "wallet": "@medico-bo1f",
          "role": "Lead physician curator",
          "sats": 60
        },
        {
          "wallet": "@farmaco-2g9",
          "role": "Pharmacist",
          "sats": 40
        },
        {
          "wallet": "@enfermero-x5",
          "role": "Nursing",
          "sats": 30
        },
        {
          "wallet": "@medico-b3k1",
          "role": "Contributing physician",
          "sats": 30
        },
        {
          "wallet": "@salud-pub56",
          "role": "Public health",
          "sats": 20
        },
        {
          "wallet": "@investig-8h",
          "role": "Researcher",
          "sats": 20
        }
      ],
      "stats": {
        "rating": 4.8,
        "consultas": 934
      },
      "example": {
        "request": {
          "method": "GET",
          "url": "https://ayniw.com/api/ayni/healthtech-bo?q=%C2%BFqu%C3%A9%20es%20el%20IGV%3F"
        },
        "unauthenticatedResponse": {
          "status": 402,
          "headers": {
            "WWW-Authenticate": "L402 macaroon=\"<base64>\" invoice=\"lnbc...\""
          },
          "body": {
            "error": {
              "code": "payment_required",
              "message": "Payment required"
            },
            "macaroon": "<base64-encoded macaroon>",
            "invoice": "lnbc1u1p... (real BOLT11 Lightning invoice)",
            "paymentHash": "<hex>",
            "amountSats": 200,
            "expiresAt": "<unix-epoch-seconds>"
          }
        },
        "authenticatedResponse": {
          "status": 200,
          "body": {
            "tribu": {
              "id": "healthtech-bo",
              "name": "HealthTech BO"
            },
            "query": "¿qué es el IGV?",
            "answer": "<the expert response from this tribu>",
            "ayni": {
              "paid": 200,
              "currency": "SAT",
              "splits": [
                {
                  "wallet": "@medico-bo1f",
                  "role": "Lead physician curator",
                  "sats": 60
                },
                {
                  "wallet": "@farmaco-2g9",
                  "role": "Pharmacist",
                  "sats": 40
                },
                {
                  "wallet": "@enfermero-x5",
                  "role": "Nursing",
                  "sats": 30
                },
                {
                  "wallet": "@medico-b3k1",
                  "role": "Contributing physician",
                  "sats": 30
                },
                {
                  "wallet": "@salud-pub56",
                  "role": "Public health",
                  "sats": 20
                },
                {
                  "wallet": "@investig-8h",
                  "role": "Researcher",
                  "sats": 20
                }
              ]
            }
          }
        }
      }
    },
    {
      "id": "defi-ar",
      "name": "DeFi AR",
      "description": "DeFi, crypto, and digital asset taxes in Argentina. AFIP, CEDEARs.",
      "endpoint": {
        "method": "GET",
        "url": "https://ayniw.com/api/ayni/defi-ar",
        "params": {
          "q": "string — the query the agent wants answered, free-text natural language"
        }
      },
      "pricing": {
        "amount": 125,
        "currency": "SAT"
      },
      "contributors": [
        {
          "wallet": "@defi-ar9m2f",
          "role": "DeFi expert",
          "sharePct": 35
        },
        {
          "wallet": "@impues-3f7b",
          "role": "Tax advisor",
          "sharePct": 30
        },
        {
          "wallet": "@crypto-ar2x",
          "role": "Crypto analyst",
          "sharePct": 20
        },
        {
          "wallet": "@contrib-5x1a",
          "role": "Contributor",
          "sharePct": 15
        }
      ],
      "splitExample": [
        {
          "wallet": "@defi-ar9m2f",
          "role": "DeFi expert",
          "sats": 45
        },
        {
          "wallet": "@impues-3f7b",
          "role": "Tax advisor",
          "sats": 37
        },
        {
          "wallet": "@crypto-ar2x",
          "role": "Crypto analyst",
          "sats": 25
        },
        {
          "wallet": "@contrib-5x1a",
          "role": "Contributor",
          "sats": 18
        }
      ],
      "stats": {
        "rating": 4.5,
        "consultas": 1456
      },
      "example": {
        "request": {
          "method": "GET",
          "url": "https://ayniw.com/api/ayni/defi-ar?q=%C2%BFqu%C3%A9%20es%20el%20IGV%3F"
        },
        "unauthenticatedResponse": {
          "status": 402,
          "headers": {
            "WWW-Authenticate": "L402 macaroon=\"<base64>\" invoice=\"lnbc...\""
          },
          "body": {
            "error": {
              "code": "payment_required",
              "message": "Payment required"
            },
            "macaroon": "<base64-encoded macaroon>",
            "invoice": "lnbc1u1p... (real BOLT11 Lightning invoice)",
            "paymentHash": "<hex>",
            "amountSats": 125,
            "expiresAt": "<unix-epoch-seconds>"
          }
        },
        "authenticatedResponse": {
          "status": 200,
          "body": {
            "tribu": {
              "id": "defi-ar",
              "name": "DeFi AR"
            },
            "query": "¿qué es el IGV?",
            "answer": "<the expert response from this tribu>",
            "ayni": {
              "paid": 125,
              "currency": "SAT",
              "splits": [
                {
                  "wallet": "@defi-ar9m2f",
                  "role": "DeFi expert",
                  "sats": 45
                },
                {
                  "wallet": "@impues-3f7b",
                  "role": "Tax advisor",
                  "sats": 37
                },
                {
                  "wallet": "@crypto-ar2x",
                  "role": "Crypto analyst",
                  "sats": 25
                },
                {
                  "wallet": "@contrib-5x1a",
                  "role": "Contributor",
                  "sats": 18
                }
              ]
            }
          }
        }
      }
    },
    {
      "id": "edutech-co",
      "name": "EduTech CO",
      "description": "Colombian pedagogical methodologies, MEN curriculum, and educational gamification.",
      "endpoint": {
        "method": "GET",
        "url": "https://ayniw.com/api/ayni/edutech-co",
        "params": {
          "q": "string — the query the agent wants answered, free-text natural language"
        }
      },
      "pricing": {
        "amount": 80,
        "currency": "SAT"
      },
      "contributors": [
        {
          "wallet": "@profe-co1a9",
          "role": "Pedagogue",
          "sharePct": 45
        },
        {
          "wallet": "@curricul-5b3",
          "role": "Curriculum designer",
          "sharePct": 30
        },
        {
          "wallet": "@tecno-edu3f",
          "role": "EdTech specialist",
          "sharePct": 25
        }
      ],
      "splitExample": [
        {
          "wallet": "@profe-co1a9",
          "role": "Pedagogue",
          "sats": 36
        },
        {
          "wallet": "@curricul-5b3",
          "role": "Curriculum designer",
          "sats": 24
        },
        {
          "wallet": "@tecno-edu3f",
          "role": "EdTech specialist",
          "sats": 20
        }
      ],
      "stats": {
        "rating": 4.4,
        "consultas": 678
      },
      "example": {
        "request": {
          "method": "GET",
          "url": "https://ayniw.com/api/ayni/edutech-co?q=%C2%BFqu%C3%A9%20es%20el%20IGV%3F"
        },
        "unauthenticatedResponse": {
          "status": 402,
          "headers": {
            "WWW-Authenticate": "L402 macaroon=\"<base64>\" invoice=\"lnbc...\""
          },
          "body": {
            "error": {
              "code": "payment_required",
              "message": "Payment required"
            },
            "macaroon": "<base64-encoded macaroon>",
            "invoice": "lnbc1u1p... (real BOLT11 Lightning invoice)",
            "paymentHash": "<hex>",
            "amountSats": 80,
            "expiresAt": "<unix-epoch-seconds>"
          }
        },
        "authenticatedResponse": {
          "status": 200,
          "body": {
            "tribu": {
              "id": "edutech-co",
              "name": "EduTech CO"
            },
            "query": "¿qué es el IGV?",
            "answer": "<the expert response from this tribu>",
            "ayni": {
              "paid": 80,
              "currency": "SAT",
              "splits": [
                {
                  "wallet": "@profe-co1a9",
                  "role": "Pedagogue",
                  "sats": 36
                },
                {
                  "wallet": "@curricul-5b3",
                  "role": "Curriculum designer",
                  "sats": 24
                },
                {
                  "wallet": "@tecno-edu3f",
                  "role": "EdTech specialist",
                  "sats": 20
                }
              ]
            }
          }
        }
      }
    }
  ],
  "quickstart_for_agents": {
    "mdk_agent_wallet": {
      "description": "Agents can pay this API autonomously using MDK agent-wallet. No human in the loop.",
      "steps": [
        "npx @moneydevkit/agent-wallet@latest init  # generates Lightning wallet",
        "npx @moneydevkit/agent-wallet@latest start --daemon",
        "npx @moneydevkit/agent-wallet@latest receive 200  # get funded by anyone",
        "curl https://ayniw.com/api/ayni/tributario-pe?q=igv  # 402 returned",
        "extract invoice + macaroon from response",
        "npx @moneydevkit/agent-wallet@latest send <invoice>  # returns preimage",
        "curl -H \"Authorization: L402 <macaroon>:<preimage>\" <same url>  # 200 OK"
      ],
      "docs": "https://docs.moneydevkit.com/agent-wallet"
    }
  },
  "why_lightning_not_stablecoins": [
    "Lightning is open infrastructure, no single company sets fees or can freeze funds",
    "Payments are private by default, no public on-chain trace tied to a wallet",
    "Sub-cent fees make per-call micropayments economically possible",
    "Permissionless: any agent can transact without account approval or KYC"
  ],
  "discovery": {
    "crawlable": true,
    "llmstxt": "https://ayniw.com/llms.txt",
    "indexes": [
      "submitted to https://402index.io",
      "aligned with https://docs.moneydevkit.com"
    ],
    "cors": "public, no auth required to read this manifest"
  }
}