Skip to main content
Every adapter wraps your framework’s normal call surface and inserts a check() step that returns an HTTP 402 challenge when payment is missing. The client pays on-chain, retries with proof, and the call goes through. Same shape across all 12 frameworks.

Available adapters

FrameworkWhat it gatesSource
LangChainLLMs, chains, agent tool endpointslangchain
LangGraphCompiled StateGraph executionlanggraph
CrewAICrews, tasks, agent toolscrewai
AutoGenConversations, callable toolsautogen
AG2Multi-agent flows(via AutoGen)
DSPyModules, programs, chainsdspy
LlamaIndexLLMs, query engines, chat engines, ReAct agent toolsllamaindex
Pydantic AIAgents, model callspydantic-ai
Vercel AI SDKModel calls, tool callsvercel-ai-sdk
Semantic KernelChat completions, KernelFunction, pluginssemantic-kernel
Hugging FaceInferenceClient, transformers pipelines, smolagents toolshuggingface
AgnoAgno agentsagno
Google A2AA2A endpoints (server side)a2a

Common shape

Every adapter has the same three-method surface:
from algovoi_<framework> import AlgoVoi<Framework>

adapter = AlgoVoi<Framework>(
    api_base="https://api1.ilovechicken.co.uk",
    api_key="algv_…",
    tenant_id="…",
    webhook_secret="algvw_…",
)

# 1. Check payment status before invocation
status = adapter.check(resource_id="premium-call")

# 2. If unpaid, surface a challenge to the client
if not status.paid:
    raise adapter.PaymentRequired(status.challenge)

# 3. Run the wrapped call
result = adapter.run(...)  # framework-specific

Picking a protocol

Each adapter supports x402, MPP, and AP2 on the same code path. Pick the one that matches your client:
  • x402 for HTTP-fronted endpoints. The most common case for LangChain or Vercel AI SDK servers.
  • MPP for JSON-RPC or MCP-server-backed tools. Use when the call is method-shaped, not URL-shaped.
  • AP2 for autonomous agents acting on a signed mandate.
See the protocol pages for detail: x402, MPP, AP2.

Versioning

All adapters track v1.0.0 of the shared client surface. Behaviour and method names are identical across frameworks; only the wrapping layer changes. If you switch frameworks you keep the same AlgoVoi configuration.