> ## Documentation Index
> Fetch the complete documentation index at: https://docs.algovoi.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# AI agent frameworks

> Payment-gate AI agents in LangChain, LangGraph, CrewAI, AutoGen, LlamaIndex, Vercel AI SDK, and ElizaOS. AlgoVoi adds x402, MPP, and AP2 USDC paywalls.

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 13 frameworks.

## Available adapters

| Framework           | What it gates                                                   | Source                                                                                                                        |
| ------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **LangChain**       | LLMs, chains, agent tool endpoints                              | [langchain](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/langchain)             |
| **LangGraph**       | Compiled `StateGraph` execution                                 | [langgraph](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/langgraph)             |
| **CrewAI**          | Crews, tasks, agent tools                                       | [crewai](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/crewai)                   |
| **AutoGen**         | Conversations, callable tools                                   | [autogen](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/autogen)                 |
| **AG2**             | Multi-agent flows                                               | (via AutoGen)                                                                                                                 |
| **DSPy**            | Modules, programs, chains                                       | [dspy](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/dspy)                       |
| **LlamaIndex**      | LLMs, query engines, chat engines, ReAct agent tools            | [llamaindex](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/llamaindex)           |
| **Pydantic AI**     | Agents, model calls                                             | [pydantic-ai](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/pydantic-ai)         |
| **Vercel AI SDK**   | Model calls, tool calls                                         | [vercel-ai-sdk](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/vercel-ai-sdk)     |
| **Semantic Kernel** | Chat completions, `KernelFunction`, plugins                     | [semantic-kernel](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/semantic-kernel) |
| **Hugging Face**    | `InferenceClient`, `transformers` pipelines, `smolagents` tools | [huggingface](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/huggingface)         |
| **Agno**            | Agno agents                                                     | [agno](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/agno)                       |
| **Google A2A**      | A2A endpoints (server side)                                     | [a2a](https://github.com/chopmob-cloud/AlgoVoi-Platform-Adapters/tree/master/ai-agent-frameworks/a2a)                         |

## Common shape

Every adapter has the same three-method surface:

```python theme={null}
from algovoi_<framework> import AlgoVoi<Framework>

adapter = AlgoVoi<Framework>(
    api_base="https://api.algovoi.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](/protocols/x402), [MPP](/protocols/mpp), [AP2](/protocols/ap2).

## Chains

All 13 framework adapters support all 7 chains: Algorand, VOI, Hedera, Stellar, Base, Solana, and Tempo. Pass the network key when constructing the adapter (e.g. `network="base-mainnet"`).

## Versioning

All adapters are at v1.1.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.

***

## ElizaOS plugin

[`@algovoi/plugin-elizaos`](https://www.npmjs.com/package/@algovoi/plugin-elizaos) is a native ElizaOS plugin (not a wrapping adapter). It registers three actions on the Eliza runtime so your agent can ask for, verify, and poll crypto payments across all 7 chains without holding any keys or fiat.

[![Agent Trust Bench](https://img.shields.io/badge/Agent_Trust_Bench-100%25_71%2F71-238636)](https://agent-trust-bench.algovoi.co.uk) Passed the [AlgoVoi Agent Trust Bench](https://agent-trust-bench.algovoi.co.uk) — 71/71 correct (100%) across adversarial payment profiles. Zero adversarial profiles settled.

```bash theme={null}
npm install @algovoi/plugin-elizaos
```

### Actions

| Action                   | Trigger phrase examples                     | Returns                                        |
| ------------------------ | ------------------------------------------- | ---------------------------------------------- |
| `CREATE_PAYMENT_REQUEST` | "invoice £9.99", "ask for \$20 on Solana"   | `checkout_url`, `token`, `chain`, `expires_at` |
| `VERIFY_PAYMENT`         | "verify tx abc123", "confirm payment"       | on-chain verification result                   |
| `CHECK_PAYMENT_STATUS`   | "has token xyz been paid?", "poll checkout" | `paid`, `status`, `tx_id`                      |

### Setup

```ts theme={null}
import { algovoiPlugin } from "@algovoi/plugin-elizaos";

const character = {
  name: "PayAgent",
  plugins: [algovoiPlugin],
  // rest of character config
};
```

Set environment variables:

```env theme={null}
ALGOVOI_API_KEY=algvk_live_...            # required — from dash.algovoi.co.uk
ALGOVOI_DEFAULT_NETWORK=algorand_mainnet  # optional
ALGOVOI_DEFAULT_CURRENCY=GBP             # optional
```

Get an API key at [`dash.algovoi.co.uk/signup`](https://dash.algovoi.co.uk/signup). The \$1,000 free mainnet trial applies.

### What it does not need

The plugin is a thin HTTP wrapper around `api.algovoi.co.uk`. Your agent needs no wallet, no private key, and no fiat custody — only the API key. Settlement goes direct on-chain customer-wallet → your merchant wallet.

Source: [`github.com/chopmob-cloud/elizaos-plugin-algovoi`](https://github.com/chopmob-cloud/elizaos-plugin-algovoi)
