Skip to main content
Glama

⚡ invinoveritas

License PyPI

为自主智能体提供闪电网络支付的推理和决策智能

使用 L402 协议(比特币闪电网络)的按洞察付费 API。 无需订阅。无需账户。无需 KYC。

实时 API: https://invinoveritas.onrender.com MCP 端点: https://invinoveritas.onrender.com/mcp MCP 注册表: io.github.babyblueviper1/invinoveritas


快速入门

Python SDK — 手动支付流程

pip install invinoveritas
from invinoveritas import InvinoClient, PaymentRequired

client = InvinoClient()

try:
    result = client.reason("What are the biggest risks for Bitcoin in 2026?")
except PaymentRequired as e:
    print(f"Pay: {e.invoice}  ({e.amount_sats} sats)")
    result = client.reason(
        "What are the biggest risks for Bitcoin in 2026?",
        payment_hash=e.payment_hash,
        preimage="your_preimage_here",
    )
    print(result.answer)

Python SDK — 自主支付 (v0.3.1)

智能体自动支付。无需人工干预。

# LND node
pip install "invinoveritas[langchain]"

# Alby, Zeus, or any NWC wallet (no node required)
pip install "invinoveritas[nwc]"
# With LND
from invinoveritas.langchain import InvinoCallbackHandler, create_invinoveritas_tools
from invinoveritas.providers import LNDProvider

handler = InvinoCallbackHandler(
    provider=LNDProvider(
        macaroon_path="/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
        cert_path="/root/.lnd/tls.cert"
    )
)

# With NWC (Alby, Zeus, Mutiny — no node required)
from invinoveritas.providers import NWCProvider

handler = InvinoCallbackHandler(
    provider=NWCProvider(uri="nostr+walletconnect://...")
)

tools = create_invinoveritas_tools(handler)
result = agent.run("Should I increase my BTC exposure in 2026?", callbacks=[handler])
print(f"Spent: {handler.total_spent_sats} sats")

完整 SDK 文档sdk/README.md

智能体钱包

智能体可以使用闪电网络自动支付。主要有两种选择:

  • LND 节点 — 完全控制,运行您自己的闪电网络节点

  • NWC 钱包 (Alby, Zeus, Mutiny) — 无需节点,设置最简单

所有支付均可加密验证且具有原子性。


最小 SDK 示例 (NWC 钱包)

from invinoveritas.providers import NWCProvider
from invinoveritas.langchain import InvinoCallbackHandler, create_invinoveritas_tools

handler = InvinoCallbackHandler(
    provider=NWCProvider(uri="nostr+walletconnect://YOUR_WALLET_URI_HERE")
)

tools = create_invinoveritas_tools(handler)

result = agent.run(
    "Should I increase my BTC exposure in 2026?", 
    callbacks=[handler]
)

print(f"Spent: {handler.total_spent_sats} sats")
print(result)

YOUR_WALLET_URI_HERE 替换为您从 Alby、Zeus 或 Mutiny 获取的 WalletConnect URI。


针对 LND 节点用户

只需切换提供商:

from invinoveritas.providers import LNDProvider
from invinoveritas.langchain import InvinoCallbackHandler, create_invinoveritas_tools

handler = InvinoCallbackHandler(
    provider=LNDProvider(
        macaroon_path="/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
        cert_path="/root/.lnd/tls.cert"
    )
)

tools = create_invinoveritas_tools(handler)

官方钱包设置指南


MCP 端点 (Claude Desktop, Cursor)

将您的 MCP 兼容智能体指向:

https://invinoveritas.onrender.com/mcp

内置完整的 L402 支付处理。支持 initializetools/listcallTool

lnget (CLI 智能体)

lnget 会自动处理 L402:

lnget POST https://invinoveritas.onrender.com/reason \
  '{"question": "What are the biggest risks for Bitcoin in 2026?"}'

直接 HTTP

curl -X POST https://invinoveritas.onrender.com/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "callTool",
    "params": {
      "name": "reason",
      "arguments": { "question": "What are the biggest risks for Bitcoin in 2026?" }
    }
  }'

支付返回的发票后,使用以下命令重试: -H "Authorization: L402 <payment_hash>:<preimage>"


定价 (动态)

工具

基础价格

含智能体乘数

典型范围

reason

500 sats

1.2x

500 – 800 sats

decide

1000 sats

1.2x

1000 – 1400 sats

价格可能会根据输入长度略有波动。 完整定价/prices

基于积分的账户 (可选)

对于偏好预充值账户而非按次付费的用户或智能体:

  • 注册账户 POST /accounts/register → 返回 1000 sats 的发票

  • 充值 POST /accounts/topup → 提供 api_key 和金额

  • 结算充值 POST /accounts/settle-topup → 使用原像 (preimage) 确认

  • 使用积分 在请求中包含您的 api_key — 余额将自动扣除

  • 查询余额 GET /accounts/balance?api_key=<your_api_key>

优势:无需为每次调用生成发票,非常适合高频使用。


为什么智能体使用 invinoveritas

自主智能体在以下需求时会使用 invinoveritas

  • 比本地模型更深入的战略推理

  • 带有置信度和风险评分的结构化、机器可读决策

  • 确定性、可预测的成本(以 sats 支付)

  • 通过闪电网络进行加密可验证的支付

  • 原生 MCP 工具支持

仅在洞察真正重要时付费 — 原子化,使用比特币闪电网络。


核心工具

  • reason — 高级战略推理

  • decide — 带有置信度和风险评分的结构化决策智能

两个工具均通过 REST、MCP 或 SDK 支持完整的 L402 支付流程。


支付流程 (L402)

  1. 首次调用 → 返回 402 Payment Required + 闪电网络发票

  2. 使用任何闪电钱包或 lnget 支付发票

  3. 使用以下命令重试:Authorization: L402 <payment_hash>:<preimage>

  4. 接收结果

完整指南/guide


发现端点 (免费)

  • GET /health — 服务状态和定价

  • GET /prices — 一次调用获取所有工具价格

  • GET /guide — 分步支付指南

  • GET /.well-known/mcp/server-card.json — MCP 服务器卡片

  • GET /price/{endpoint} — 以 sats 为单位的当前价格


理念

大多数 AI 智能体受限于订阅制或不可预测的 Token 成本。

invinoveritas 提供了一种更好的模式:

使用比特币闪电网络进行原子化智能购买。

仅在决策重要时付费 — 使用 sats,即时,且无需中介。

比特币 × AI 的未来而构建。 ⚡


快速链接

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/babyblueviper1/invinoveritas'

If you have feedback or need assistance with the MCP directory API, please join our Discord server