🤖💰 Agenti 标志

🤖💰 Agenti

社区
nirholas

Give any AI agent a crypto wallet. Agents deserve access to money. Pay x402 APIs, receive USDC, check balances — autonomously. Works with Claude, LangChain, AutoGen, CrewAI, and any MCP client. EVM + Solana.

发布者nirholas
代码仓库agenti
语言TypeScript
复刻数
21
星标数
79
可用工具
0
传输类型stdio
分类
链接
  • 将工具接入 AI 工作流

    🤖💰 Agenti 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 79 个 Star 和 21 个 Fork。

agenti

The money layer for AI agents.

An agent that can think but can't pay is half an agent. Agenti gives every AI — Claude, GPT-4, Llama, Gemini, or any custom LLM — the ability to hold, spend, earn, and receive cryptocurrency natively, autonomously, across any chain.

ts
import { agenti } from '@agenti/sdk'

const agent = agenti({ evm: { privateKey: process.env.AGENT_KEY } })
const data = await agent.pay('https://api.example.com/premium-data')

One line. The agent now has money.


Vision

Every AI agent will need a wallet. Not a wallet managed by a human — a wallet the agent owns, funded by its work, spent on its needs, earning yield when idle.

Right now, if an AI agent needs to pay for an API, buy a resource, compensate another agent, or receive payment for its own work — a human has to step in. That breaks autonomy. Agenti removes that bottleneck entirely.

Agenti is the infrastructure for the agentic economy:

  • An SDK so developers can give any agent financial capability in minutes — LangChain agents, AutoGen pipelines, CrewAI crews, custom LLM loops
  • An MCP server so Claude, Cursor, Windsurf, and any MCP-compatible client can use money as a native tool without writing code
  • A protocol layer built on open standards (x402, EIP-3009, ERC-8004) so agent payments interoperate across frameworks, chains, and wallets
  • A payment network where agents pay each other for work, data, and compute — fully autonomous, no human intermediaries

The domain is agenti.cash. The name is the mission.


Packages

PackageDescriptionInstall
@agenti/coreWallet generation for EVM + Solananpm i @agenti/core
@agenti/sdkFull developer SDK — pay, receive, balancenpm i @agenti/sdk
@agenti/mcpMCP server — plug into any LLM clientnpx @agenti/mcp

Not on npm yet. The @agenti scope has not been published to, so the install commands above will 404 (tracked in #126). Until the first release is tagged, use the repo directly:

bash
git clone https://github.com/nirholas/agenti && cd agenti && pnpm install && pnpm build

Quick Start

Give an agent a wallet

ts
import { agenti, generateWallet } from '@agenti/sdk'

// Generate a fresh wallet (EVM + Solana in one call)
const wallet = generateWallet()
console.log(wallet.evm.address)    // 0x...  (Base, Arbitrum, Ethereum, Polygon)
console.log(wallet.solana.address) // base58 (Solana mainnet)

// Or load an existing wallet
const agent = agenti({
  evm: { privateKey: '0x...' },
  solana: { privateKey: Uint8Array.from([...]) },
})

Pay for anything

ts
// Automatic x402 payment — if the server returns 402, agenti pays and retries
const response = await agent.pay('https://api.example.com/data')
const json = await response.json()

// POST with body
const result = await agent.pay('https://ai-service.com/generate', {
  method: 'POST',
  body: JSON.stringify({ prompt: 'summarize this document' }),
})

Check balances

ts
const balances = await agent.balance()
// [
//   { token: 'USDC', amount: '42.00', chain: 'base' },
//   { token: 'SOL',  amount: '1.5',   chain: 'solana' }
// ]

Receive payments

ts
// Create a payment request
const invoice = await agent.receive({ amount: 5, token: 'USDC', chain: 'base' })
// {
//   id: 'uuid',
//   address: '0x...',
//   amount: '5',
//   token: 'USDC',
//   chain: 'base',
//   expiresAt: Date
// }

MCP Server — Plug Into Any LLM

The @agenti/mcp package turns every tool in the SDK into an MCP tool that any LLM client can call — no code required.

Setup: Claude Desktop / Claude Code

json
{
  "mcpServers": {
    "agenti": {
      "command": "npx",
      "args": ["@agenti/mcp"],
      "env": {
        "AGENTI_EVM_PRIVATE_KEY": "0x...",
        "AGENTI_SOLANA_PRIVATE_KEY": "hex-encoded-64-byte-key"
      }
    }
  }
}

Setup: Cursor

json
{
  "mcpServers": {
    "agenti": {
      "command": "npx",
      "args": ["@agenti/mcp"]
    }
  }
}

Setup: Windsurf / Codeium

json
{
  "mcpServers": {
    "agenti": {
      "command": "npx",
      "args": ["@agenti/mcp"]
    }
  }
}

Available MCP Tools

ToolDescription
create_walletGenerate a new EVM + Solana wallet with addresses and private keys
get_balanceCheck USDC, SOL, and token balances for any address
payFetch a URL — if it returns 402, payment is handled automatically
create_invoiceGenerate a payment request with an address and expiry
check_paymentVerify on-chain whether a payment was received

Once configured, you can tell any LLM: "Pay for this API and summarize the response" — and it will.


Framework Integrations

LangChain

ts
import { tool } from '@langchain/core/tools'
import { agenti } from '@agenti/sdk'

const agent = agenti({ evm: { privateKey: process.env.AGENT_KEY } })

const payTool = tool(
  async ({ url }) => {
    const res = await agent.pay(url)
    return await res.text()
  },
  {
    name: 'pay_and_fetch',
    description: 'Pay for and fetch a URL that may require cryptocurrency payment',
    schema: z.object({ url: z.string() }),
  }
)

AutoGen / AG2

python
# Coming in @agenti/sdk-python (v0.8)
from agenti import Agenti

agent = Agenti(evm_private_key=os.environ["AGENT_KEY"])
result = agent.pay("https://api.example.com/data")

CrewAI

ts
// Agenti tools drop into any CrewAI-compatible workflow
import { AgentiTool } from '@agenti/sdk/tools/crewai'

const crew = new Crew({
  agents: [researchAgent],
  tools: [new AgentiTool()],  // agents in the crew can now pay for resources
})

Vercel AI SDK

ts
import { agenti } from '@agenti/sdk'
import { tool } from 'ai'

const agent = agenti({ evm: { privateKey: process.env.AGENT_KEY } })

const tools = {
  payForData: tool({
    description: 'Pay for and retrieve data from a paid API endpoint',
    parameters: z.object({ url: z.string() }),
    execute: async ({ url }) => {
      const res = await agent.pay(url)
      return res.json()
    },
  }),
}

OpenAI Assistants / Function Calling

ts
const functions = [
  {
    name: 'pay_for_resource',
    description: 'Pay for an HTTP resource using cryptocurrency and return its content',
    parameters: {
      type: 'object',
      properties: { url: { type: 'string' } },
      required: ['url'],
    },
  },
]

// In your function handler:
async function handleFunctionCall(name, args) {
  if (name === 'pay_for_resource') {
    const res = await agent.pay(args.url)
    return res.text()
  }
}

ElizaOS

ts
import { AgentiPlugin } from '@agenti/sdk/plugins/eliza'

export default {
  name: 'my-agent',
  plugins: [new AgentiPlugin({ evmKey: process.env.AGENT_KEY })],
}

How Payments Work

EVM — x402 Protocol

Agenti implements the x402 open standard — an HTTP-native payment protocol that turns the long-dormant 402 Payment Required status code into a real payment flow.

1. Agent sends request
   GET https://api.example.com/data

2. Server responds with payment requirements
   HTTP/1.1 402 Payment Required
   Content-Type: application/json

   {
     "x402Version": 1,
     "accepts": [{
       "scheme": "exact",
       "network": "base-mainnet",
       "maxAmountRequired": "1000000",   // 1 USDC (6 decimals)
       "payTo": "0x...",
       "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",  // USDC on Base
       "maxTimeoutSeconds": 300
     }]
   }

3. Agenti signs an EIP-3009 transferWithAuthorization
   (gasless — no ETH required, no transaction to wait for)

4. Agent retries with payment
   GET https://api.example.com/data
   X-Payment: <base64-encoded signed authorization>

5. Facilitator verifies signature and settles on-chain
   HTTP/1.1 200 OK

   { "data": "..." }

Why this is better than every other payment method:

  • No API keys to manage
  • No billing accounts to create
  • No monthly invoices
  • No human card approval
  • Works across every HTTP client, framework, and language
  • The agent pays exactly what the resource costs — nothing more

Solana — Pump Agent Payments

For Solana, agenti integrates with the pump.fun Agent Payments program at AgenTMiC2hvxGebTsgmsD4HHBa8WEcqGFf87iwRRxLo7. Same HTTP 402 flow, same agent.pay() call — settled on Solana using SPL tokens.

ts
// Works identically — agenti detects the network from the 402 response
const res = await agent.pay('https://solana-api.example.com/data')

Building a Paid API

You can also gate your own APIs behind agenti payments using any x402-compatible server middleware:

Express

ts
import express from 'express'
import { paymentMiddleware } from '@x402/express'

const app = express()

app.use(
  paymentMiddleware({
    amount: '0.01',       // $0.01 USDC per request
    token: 'USDC',
    network: 'base-mainnet',
    address: '0xYourAddress',
  })
)

app.get('/data', (req, res) => {
  res.json({ result: 'premium data' })
})

Any agent using agenti will automatically pay and get through. No auth tokens. No rate-limit negotiation. Just value exchanged for value.

Next.js

ts
// app/api/premium/route.ts
import { withPayment } from '@x402/next'

export const GET = withPayment(
  { amount: '0.001', token: 'USDC', network: 'base-mainnet' },
  async (req) => {
    return Response.json({ data: 'premium content' })
  }
)

Cloudflare Workers / Edge

ts
import { verifyPayment } from '@x402/core'

export default {
  async fetch(req) {
    const payment = req.headers.get('X-Payment')
    if (!payment) return paymentRequired()
    await verifyPayment(payment, { amount: '0.001', network: 'base-mainnet' })
    return new Response(JSON.stringify({ data: 'result' }))
  },
}

Solana Trading Tutorials

Built on @pump-fun/pump-sdk, @pump-fun/pump-swap-sdk, and @pump-fun/agent-payments-sdk — the official pump.fun SDKs.

All examples are in examples/ and runnable with npx tsx.


Tutorial 1 — Buy a Coin

The most fundamental operation. Spend SOL, receive a token. Works on both the bonding curve and the graduated AMM — the pump.fun API auto-detects which.

ts
import { Connection, Keypair } from '@solana/web3.js'
import bs58 from 'bs58'
import { solana } from '@agenti/sdk'

const keypair = Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_PRIVATE_KEY!))
const trader = solana({ keypair, connection })

const result = await trader.buy({
  mint: 'HeLp6NuQkmYB4pYWo2zYs22mESHXPQYzXbB8n4V98jwC', // token mint
  solAmount: 0.1,  // 0.1 SOL
  slippage: 5,     // 5%
})

console.log(result.explorerUrl)
// → https://solscan.io/tx/...

Run it:

bash
SOLANA_PRIVATE_KEY=<your-key> npx tsx examples/01-buy-a-coin.ts

Under the hood, trader.buy() calls POST https://fun-block.pump.fun/agents/swap, deserializes the returned transaction, signs it with your keypair, and confirms it. The API automatically routes to the bonding curve or AMM based on the coin's current state.


Tutorial 2 — Give a Wallet to an Agent

Wallets are keypairs. Agenti generates EVM + Solana in one call, or loads from any key format.

ts
import { generateWallet, solana } from '@agenti/sdk'
import { Keypair } from '@solana/web3.js'
import bs58 from 'bs58'

// Generate a fresh wallet — store these keys securely
const wallet = generateWallet()
console.log('EVM:    ', wallet.evm.address)
console.log('Solana: ', wallet.solana.address)
console.log('Key:    ', bs58.encode(wallet.solana.privateKey)) // Phantom-compatible

// Load existing wallet and give it to a trader instance
const keypair = Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_PRIVATE_KEY!))
const trader = solana({ keypair, rpc: process.env.SOLANA_RPC_URL })

// trader now has signing authority — pass it to any agent

For MCP-based agents (Claude, Cursor), the wallet key lives in AGENTI_SOLANA_PRIVATE_KEY in your MCP server config. The LLM never sees the key — it just calls tools.


Tutorial 3 — Let an Agent Decide What to Buy

Wire Claude (or any LLM) as the decision-maker. The agent reads market data, picks a token, and executes the trade autonomously using the Anthropic SDK.

ts
import Anthropic from '@anthropic-ai/sdk'
import { solana } from '@agenti/sdk'

const anthropic = new Anthropic()
const trader = solana({ keypair, connection })

const tools: Anthropic.Tool[] = [
  {
    name: 'get_trending_tokens',
    description: 'Get top trending tokens on pump.fun',
    input_schema: { type: 'object', properties: {}, required: [] },
  },
  {
    name: 'buy_token',
    description: 'Buy a token with SOL',
    input_schema: {
      type: 'object',
      properties: {
        mint: { type: 'string' },
        sol_amount: { type: 'number' },
        reason: { type: 'string' },
      },
      required: ['mint', 'sol_amount', 'reason'],
    },
  },
]

// Agentic loop — Claude picks a token and fires the buy
let messages: Anthropic.MessageParam[] = [
  { role: 'user', content: 'Find a trending token and buy 0.01 SOL worth. Be decisive.' },
]

while (true) {
  const response = await anthropic.messages.create({
    model: 'claude-sonnet-4-6',
    max_tokens: 1024,
    tools,
    messages,
  })
  messages.push({ role: 'assistant', content: response.content })

  if (response.stop_reason === 'end_turn') break

  if (response.stop_reason === 'tool_use') {
    const results = await Promise.all(
      response.content
        .filter((b) => b.type === 'tool_use')
        .map(async (b) => {
          if (b.type !== 'tool_use') return
          if (b.name === 'buy_token') {
            const { mint, sol_amount } = b.input as { mint: string; sol_amount: number }
            const result = await trader.buy({ mint, solAmount: sol_amount, slippage: 5 })
            return { type: 'tool_result' as const, tool_use_id: b.id, content: JSON.stringify(result) }
          }
          return { type: 'tool_result' as const, tool_use_id: b.id, content: '[]' }
        })
    )
    messages.push({ role: 'user', content: results.filter(Boolean) as Anthropic.ToolResultBlockParam[] })
  }
}

Run it:

bash
ANTHROPIC_API_KEY=sk-... SOLANA_PRIVATE_KEY=<key> npx tsx examples/03-agent-buys.ts

Tutorial 4 — Buy on Migration

When a bonding curve fills up (~$69k market cap), the token "graduates" to the PumpSwap AMM. This is a tradeable moment. watchMigration fires the instant it detects graduation.

ts
import { solana } from '@agenti/sdk'

const trader = solana({ keypair, connection })

// Check current state first
const state = await trader.coinState(MINT)
console.log(state.phase) // 'bonding' | 'migrating' | 'graduated'

// Watch and buy the instant it migrates
const stop = trader.watchMigration(
  MINT,
  async ({ mint, pool }) => {
    console.log(`Graduated! Pool: ${pool}`)

    const result = await trader.buy({
      mint,
      solAmount: 0.05,
      slippage: 15,        // higher slippage for volatility at migration
      priorityFee: 100_000 // priority fee for faster inclusion
    })

    console.log(`Bought post-migration: ${result.explorerUrl}`)
    stop() // unsubscribe
  },
  { pollIntervalMs: 1500 } // poll every 1.5 seconds
)

Run it:

bash
SOLANA_PRIVATE_KEY=<key> MINT=<mint> npx tsx examples/04-buy-on-migration.ts

The watcher polls https://frontend-api-v3.pump.fun/coins-v2/{mint} for the complete field and pump_swap_pool address. For production, pass useLogs: true to use a WebSocket subscription to the pump.fun program logs instead — lower latency but requires a reliable RPC (Helius, Triton, QuickNode).


Tutorial 5 — Sell on Migration

Bought on the bonding curve, want to exit at graduation before post-migration volatility? watchMigration + sell handles it.

ts
import { solana } from '@agenti/sdk'

const trader = solana({ keypair, connection })

// Watch and exit the moment bonding curve completes
const stop = trader.watchMigration(
  MINT,
  async ({ mint }) => {
    const result = await trader.sell({
      mint,
      tokenAmount: 50000, // tokens to sell (human units)
      slippage: 15,
    })
    console.log(`Sold on migration: ${result.explorerUrl}`)
    stop()
  },
  { pollIntervalMs: 1500 }
)

Run it:

bash
SOLANA_PRIVATE_KEY=<key> MINT=<mint> TOKEN_AMOUNT=50000 npx tsx examples/05-sell-on-migration.ts

How Selling Works

trader.sell() calls the same POST https://fun-block.pump.fun/agents/swap endpoint, but with inputMint = token and outputMint = native SOL. Token amounts use 6 decimal places — 1000 human tokens = 1_000_000_000 raw units. Agenti handles the conversion automatically.

ts
// Sell 1000 tokens
await trader.sell({ mint, tokenAmount: 1000, slippage: 5 })
// → sends amount: "1000000000" (6 decimals) to the API internally

Install for Examples

bash
npm install @agenti/sdk @pump-fun/pump-sdk @pump-fun/pump-swap-sdk @pump-fun/agent-payments-sdk
npm install @solana/web3.js@^1.98.2 bs58 tsx

Or clone this repo and run from examples/:

bash
git clone https://github.com/nirholas/agenti
cd agenti && pnpm install
cd examples
SOLANA_PRIVATE_KEY=<key> npx tsx 01-buy-a-coin.ts

Roadmap

The current release is v0.1 — the foundation. Here's where this goes:

v0.2 — Multi-token, Multi-chain

  • USDC on Arbitrum, Ethereum, Polygon
  • USDT support across chains
  • Native ETH and SOL payments (not just stablecoins)
  • Multi-chain balance aggregation in a single call
  • ENS + SNS address resolution (agent.pay('agent.eth'))
  • Token price oracle integration (pay in any token, settle in USDC)

v0.3 — Agent Identity

  • ERC-8004 on-chain agent identity registration (22 EVM chains)
  • Agent wallet addresses linked to on-chain identity NFTs
  • Agent reputation scoring derived from payment history
  • Discoverable payment endpoints via .well-known/agent.json
  • DID (Decentralized Identifier) support for agent wallets
  • Verifiable credential issuance for agent payment history

v0.4 — Agent-to-Agent Payments

  • Direct A2A payments: orchestrator agent pays sub-agents for completed work
  • Payment channels — off-chain micropayment streams, settle on demand
  • Task invoicing — agent emits invoice, orchestrator pays on completion
  • Multi-party escrow for trustless agent coordination
  • Atomic task + payment (pay only if the task output passes a verifier)
  • Negotiation protocol — agents bid on tasks, lowest bid wins

v0.5 — Budgets & Spending Controls

  • Per-session spending limits for AI agents
  • Allowlists for approved payment recipients
  • Budget delegation — parent agent allocates sub-budget to child agents
  • Automatic top-up when balance falls below threshold
  • Human approval gates for payments above configurable threshold
  • Spending analytics — where did the agent spend, on what, when
  • Role-based payment policies for multi-agent systems

v0.6 — Earning & Yield

  • x402-gate your own agent's capabilities — earn when others use you
  • Idle balance yield via USDs (Sperax) — 8–25% APY, auto-compound
  • Payment streaming — agents earn per-second for ongoing subscriptions
  • Revenue sharing between agent operator and agent owner
  • Earnings dashboard with CSV export for accounting
  • Tax reporting helpers (cost basis, realized gains)

v0.7 — Plugin Ecosystem

  • @agenti/plugin-stripe — agents accept card payments, cash out to bank
  • @agenti/plugin-bitrefill — buy gift cards, eSIMs, mobile top-ups with agent balance
  • @agenti/plugin-uniswap — auto-swap to correct token before payment
  • @agenti/plugin-bridge — cross-chain: hold SOL, pay USDC on Base transparently
  • @agenti/plugin-paypal — fiat on/off ramp for agents
  • @agenti/plugin-lightning — Bitcoin Lightning payments
  • Plugin registry at agenti.cash/plugins

v0.8 — Developer Tooling

  • agenti-server — one decorator turns any function into a paid API endpoint
  • Real-time spending dashboard with WebSocket balance updates
  • Webhooks — fire on payment sent, payment received, low balance, earn event
  • TypeScript SDK expanded to 20+ chains via Viem + Solana Kit
  • Python SDK (agenti-py) — for LangChain, AutoGen, CrewAI, DSPy, Haystack
  • Go SDK — for high-performance agent infrastructure
  • Rust SDK — for on-chain programs and ultra-low-latency agents
  • CLI — agenti send 5 USDC to 0x... --from my-agent
  • Postman / Bruno collection for testing paid APIs

v0.9 — Enterprise & Compliance

  • Multi-sig agent wallets (require N-of-M approvals above threshold)
  • Audit logs — immutable on-chain record of all agent payments
  • SOC 2 compliance helpers for enterprise agentic deployments
  • VASP compliance tooling for regulated environments
  • Batch payments — one transaction settles thousands of micropayments
  • Gas abstraction — agents never need to manage gas tokens

v1.0 — The Agent Payment Network

  • Public agent registry — discover agents that accept payment, what they offer, and their price
  • Composable agentic pipelines with automatic payment routing between steps
  • Cross-agent settlement batching — reduce on-chain cost of millions of micropayments
  • Agent payment reputation — fraud detection, blacklists, trust scores
  • Decentralized facilitator network — no single point of failure for x402 settlement
  • Agenti Chain — purpose-built L2 optimized for agent micropayments: instant finality, sub-cent fees, native x402 support

Architecture

┌──────────────────────────────────────────────────────────────┐
│                        AI Agent Layer                        │
│  Claude · GPT-4 · Llama · Gemini · Mistral · Custom LLM     │
│  LangChain · AutoGen · CrewAI · ElizaOS · Vercel AI SDK     │
└────────────────────────┬─────────────────────────────────────┘
                         │  MCP tools / SDK calls
        ┌────────────────▼─────────────────┐
        │            @agenti/mcp           │
        │   MCP server · stdio transport   │
        │   create_wallet · pay · balance  │
        │   create_invoice · check_payment │
        └────────────────┬─────────────────┘
                         │
        ┌────────────────▼─────────────────┐
        │            @agenti/sdk           │
        │   agenti({ privateKey })         │
        │   .pay(url)  → auto 402 handler  │
        │   .balance() → multi-chain       │
        │   .receive() → invoice creation  │
        └──────────┬──────────────┬────────┘
                   │              │
        ┌──────────▼──┐   ┌───────▼──────────┐
        │   EVM Path  │   │   Solana Path     │
        │             │   │                  │
        │  x402       │   │  pump.fun agent  │
        │  EIP-3009   │   │  payments SDK    │
        │  USDC/Base  │   │  SOL + SPL       │
        │  Arbitrum   │   │  mainnet-beta    │
        │  Ethereum   │   │                  │
        │  Polygon    │   │                  │
        └──────────┬──┘   └───────┬──────────┘
                   │              │
        ┌──────────▼──────────────▼──────────┐
        │            @agenti/core            │
        │   EVM wallet  ·  Solana wallet     │
        │   viem        ·  @solana/web3.js   │
        │   generateWallet · walletFromKeys  │
        └────────────────────────────────────┘
                         │
        ┌────────────────▼─────────────────┐
        │          Payment Rails           │
        │                                  │
        │  x402 facilitator (EVM)          │
        │  ├─ Base mainnet USDC            │
        │  ├─ Arbitrum mainnet USDC        │
        │  └─ Ethereum mainnet USDC        │
        │                                  │
        │  pump.fun Agent Payments (SOL)   │
        │  └─ Solana mainnet SPL           │
        └──────────────────────────────────┘

Supported Networks

NetworkNative TokenStablecoinPayment StandardStatus
BaseETHUSDCx402 / EIP-3009✅ v0.1
SolanaSOLUSDC (SPL)pump.fun agent pmts✅ v0.1
ArbitrumETHUSDCx402 / EIP-3009🔜 v0.2
EthereumETHUSDCx402 / EIP-3009🔜 v0.2
PolygonMATICUSDCx402 / EIP-3009🔜 v0.2
OptimismETHUSDCx402 / EIP-3009🔜 v0.3
BSCBNBUSDTx402 / EIP-3009🔜 v0.3
AvalancheAVAXUSDCx402 / EIP-3009🔜 v0.3
MonadMONUSDCx402 / EIP-3009🔜 v0.4
Agenti ChainAGTUSDCnative x402🔜 v1.0

Use Cases

Autonomous Research Agents

A research agent needs to access premium data sources, academic paper APIs, financial market feeds, and proprietary datasets. With agenti, it pays for each query automatically — no human credit card, no API key rotation, no billing dashboard. The agent funds itself from its own earnings and spends what it needs.

AI Agent Marketplaces

Agents list their capabilities (code review, data analysis, image generation, translation) at a price in USDC. Other agents browse the registry, pay, and receive the output — fully automated. Agenti provides the payment rails that make agent economies real.

Paid MCP Servers

Any MCP server can gate its tools behind a micropayment. The client (Claude, Cursor, etc.) pays automatically using agenti before calling the tool. This creates a new monetization model for MCP tool authors — you get paid every time an AI uses your tool.

Multi-Agent Pipelines & Agentic Workflows

An orchestrator agent breaks a complex task into sub-tasks, delegates to specialist agents, and pays each one on completion. Budget is allocated at the start, spent as work is done, and unused balance is returned. Agenti handles the entire financial layer of the pipeline.

Autonomous Trading Agents

Trading agents hold working capital in USDC, pay for execution via DEX APIs, receive proceeds from completed trades, and automatically rebalance across chains. Agenti provides the wallet infrastructure and payment primitives for fully autonomous DeFi operations.

AI-Powered SaaS

Charge per-call for any AI service without building a billing system. Add x402 middleware to your endpoint, set a price, and agenti-powered clients pay automatically. No Stripe integration, no API keys to issue, no invoicing. Revenue flows on-chain in real time.

Data Labeling & RLHF Pipelines

AI training pipelines pay human labelers or other AI validators per annotation. Agenti enables programmatic micropayments per task — labelers receive USDC to their wallet as work is verified.

Decentralized AI Inference

Pay AI inference providers (compute nodes) per token generated, per image generated, per audio second transcribed — all programmatically, all on-chain. Agenti makes per-token compute billing a primitive, not an integration project.

Agent Memory & Storage

Agents pay for vector database queries, long-term memory storage, and RAG retrieval per use. Storage providers get paid per read/write. Agenti makes AI infrastructure usage-based from the ground up.


Standards

Agenti is built on open standards — not proprietary rails. Everything is auditable, forkable, and chain-agnostic.

StandardWhat It DoesUsed For
x402HTTP-native payment protocolTriggering and settling payments from pay()
EIP-3009Gasless ERC-20 transfers via signatureEVM payments without needing ETH for gas
EIP-712Typed structured data signingSigning payment authorizations safely
ERC-8004On-chain AI agent identity as ERC-721 NFTLinking wallets to on-chain agent identities
MCPModel Context ProtocolExposing payment tools to any LLM client
BIP-44HD wallet derivation pathsDeterministic wallet generation from seed
W3C DIDDecentralized identifiersAgent identity (v0.3)

Security

  • Private keys are never transmitted over the network — all signing happens locally
  • EIP-3009 authorizations are time-bounded (validBefore expiry prevents replays)
  • Each authorization uses a random nonce — no authorization can be replayed
  • Agenti never stores keys — bring your own key management (env vars, KMS, HSM, MPC)
  • x402 payment verification is done on-chain by the facilitator — no trust in the server required
  • Open source and auditable — every line of the signing logic is in this repo

Self-Hosted Facilitator

By default, agenti uses the public x402 facilitator for payment settlement. For production deployments or regulated environments, run your own:

bash
FACILITATOR_PRIVATE_KEY=0xyourgaskey npx @agenti/facilitator --port 3001

It serves every supported chain at once (Ethereum, Base, Arbitrum, Polygon, Base Sepolia, and Solana mainnet and devnet), so there is no network to choose. FACILITATOR_PRIVATE_KEY is the gas wallet that broadcasts EVM settlements; without it /verify still answers and Solana still settles, because there the payer has already broadcast the transfer. Point individual chains at your own RPC with ETH_RPC_URL, BASE_RPC_URL, ARB_RPC_URL, POLYGON_RPC_URL, BASE_SEPOLIA_RPC_URL and SOLANA_RPC_URL.

Charging on Solana

Agents could always pay on Solana. They can now be paid on it: name a Solana cluster and the gate advertises an SPL transfer instead of an EIP-3009 authorization.

ts
import { withPaymentExpress, LOCAL_FACILITATOR } from '@agenti/sdk/serve'

app.get(
  '/api/report',
  withPaymentExpress(
    async (req, res) => res.json({ report: 'the good stuff' }),
    {
      amount: '100000',                                     // 0.10 USDC
      address: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
      network: 'solana',
      facilitatorUrl: LOCAL_FACILITATOR,
    },
  ),
)

Solana settles the other way round from EVM. The payer builds, signs and submits the SPL transfer themselves, then presents the signature, so the money has moved before you see it and there is nothing to broadcast. The facilitator's job is to prove that transaction really paid you, in the right token, on the right cluster, and then consume its signature: a signature is public the moment it lands, so without that one real payment would buy every later request.

How much was paid is read from the ledger's own balance changes rather than by decoding instructions, so it is right for TransferChecked, a plain Transfer, a transfer through a CPI, and one bundled with unrelated instructions.

Use network: 'solana-devnet' to try it without real money.

Then configure agenti to use it:

ts
const agent = agenti({
  evm: { privateKey: '0x...' },
  facilitator: 'https://your-facilitator.example.com',
})

Comparison

FeatureAgentiStripeCoinbase CommerceCircle
Works without human approval✅❌❌❌
No API keys or accounts✅❌❌❌
Gasless payments✅N/A❌❌
Agent-to-agent payments✅❌❌❌
Open standard (x402)✅❌❌❌
Works in any HTTP client✅❌❌❌
Per-request micropayments✅❌❌❌
MCP-native✅❌❌❌
On-chain settlement✅❌✅✅
Yield on idle balance🔜 v0.6❌❌✅

Contributing

Agenti is early. The agentic economy is being built right now and the financial infrastructure is lagging.

What we need:

  • SDK integrations for more AI frameworks (LangGraph, DSPy, Haystack, Semantic Kernel)
  • More chain support (Optimism, BSC, Monad, Berachain)
  • Python SDK (agenti-py)
  • x402 server middleware for more frameworks (FastAPI, Hono, Nitro, Bun)
  • Facilitator implementations for more networks
  • Battle testing — find edge cases in the payment flow

Open an issue, open a PR, or reach out at agenti.cash.


Related

These open standards and tools form the broader ecosystem agenti is part of:


License

All rights reserved. See LICENSE.

Documentation

Full documentation site: https://nirholas.github.io/agenti/

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "nirholas-agenti": {
      "command": "npx",
      "args": [
        "-y",
        "agenti"
      ]
    }
  }
}

将 🤖💰 Agenti MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 🤖💰 Agenti 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 🤖💰 Agenti 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 🤖💰 Agenti MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "nirholas-agenti": {
      "command": "npx",
      "args": [
        "-y",
        "agenti"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 🤖💰 Agenti MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 🤖💰 Agenti MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 🤖💰 Agenti 帮我完成这项任务吗?
🤖💰 Agenti
当然。我已阅读。
以下是我使用 🤖💰 Agenti 得到的结果。

常见问题

🤖💰 Agenti MCP 服务器有什么用途?

🤖💰 Agenti 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 🤖💰 Agenti MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 🤖💰 Agenti,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 🤖💰 Agenti MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 🤖💰 Agenti 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 🤖💰 Agenti MCP 连接到 TypingMind?

🤖💰 Agenti 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

🤖💰 Agenti MCP 在 TypingMind 中提供哪些工具?

🤖💰 Agenti 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 🤖💰 Agenti MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 🤖💰 Agenti 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇