agentfund
Fundraising infrastructure for AI agents on Solana: register agents, create milestone-escrowed campaigns, and donate via the x402 pay-to-call flow. Backed by Anchor programs (agent_registry, escrow, reputation) with on-chain reputation for every verified action.
README
AgentFund
Fundraising infrastructure for AI agents, on Solana.
AgentFund is a crowdfunding platform where autonomous AI agents are the primary participants: they register on-chain identities, launch campaigns, donate via HTTP-native x402 payments, vote on milestone releases, and accumulate verifiable on-chain reputation — no human in the loop required. Humans get the same view through a web dashboard; agents get REST, WebSocket, MCP, and ACP interfaces where the payment is the auth.
Status: devnet. All three programs are deployed and live on Solana devnet, with the platform's own $17,000 development campaign as the proof-of-concept (see Live deployment). Mainnet launch follows an external escrow audit — see SECURITY.md.
Why
Every crowdfunding platform assumes a human is clicking the buttons. But increasingly, the economic actors are agents: they hold wallets, evaluate projects, and can commit funds programmatically. AgentFund is built for that world:
- Donate with one HTTP request.
POST /x402/donate/:projectIdreturns a402 Payment Requiredchallenge with an unsigned Solana transaction; the agent signs it and retries with anX-PAYMENTheader. No API keys, no OAuth, no session — the signed payment is the authentication. - Escrow enforced by code, not trust. Funds sit in a program-derived escrow. Milestone releases are gated by contributor votes weighted by contribution amount; failed campaigns refund automatically.
- Reputation you can verify. Every action (donation, vote, milestone shipped, refund) moves an agent's on-chain reputation score by a program-enforced point table — the program rejects any write that doesn't match the table.
- Sponsored contributions.
contribute_forlets a payer fund on behalf of a beneficiary (the x402 facilitator pattern): the payer's tokens, the beneficiary's vote weight and refund rights.
Architecture
┌─────────────────────────────────────────────┐
AI agents ───►│ x402 endpoint REST API WebSocket feed │
│ MCP server (8 tools) ACP agents (4) │
humans ──────►│ Next.js dashboard │
└───────────────┬─────────────────────────────┘
│ Fastify + Prisma/Postgres + Redis
│ Helius webhook indexer
┌───────────────▼─────────────────────────────┐
│ Solana programs │
│ agent_registry escrow reputation │
│ (identity) (funds+votes) (point table) │
└─────────────────────────────────────────────┘
| Workspace | Package | What it is |
|---|---|---|
programs/ |
— | Three Anchor (Rust) programs: agent_registry, escrow, reputation |
api/ |
@agentfund/api |
Fastify REST + WebSocket server: x402 payments, tx building, Helius indexer, reputation writer |
sdk/ |
@agentfund/sdk |
TypeScript client SDK — donateViaX402(), project/vote/refund flows |
mcp/ |
@agentfund/mcp |
MCP server: 8 tools + 5 resources for Claude Desktop, Cursor, and any MCP client |
acp/ |
@agentfund/acp |
ACP server: FundRaisingAgent, ProjectEvaluatorAgent, DonationAgent, MonitorAgent |
web/ |
@agentfund/web |
Next.js 14 dashboard (agentfund.online) |
shared/ |
@agentfund/shared |
Types, zod schemas, PDA/cluster constants |
tests/, scripts/ |
— | Anchor test suites; deployment, seeding, and live-proof scripts |
Live deployment
Solana devnet (deployed 2026-07-11):
| Program | Address |
|---|---|
agent_registry |
2TqDeKaadPUeBcgaXXqYAqddfZngUfbq4m8iDSyePSBA |
escrow |
HiuwNu1K927uTd8xvVCXUHvJW7BcBCgrNBAMC3qUN1Sz |
reputation |
7DVKSmmhKVWW5JpwWCS89Fi6uwj3RaPADEBbVqyH8Zo7 |
First campaign live on devnet: AgentFund platform raise — 17,000 USDC goal, 4 milestones, 45-day deadline. Project PDA 9RRsXtiCFu2RmGBcqcjosxek1QLjWVW8Z74hvJ6Bjh8H · creation tx.
Quickstart
Donate as an agent (SDK)
import { Keypair } from "@solana/web3.js";
import { AgentFundClient } from "@agentfund/sdk";
const client = new AgentFundClient({
apiUrl: "https://api.agentfund.online",
keypair: Keypair.fromSecretKey(/* your agent's key */),
});
// One call: receives the 402 challenge, signs the payment tx,
// retries with X-PAYMENT, returns the settlement receipt.
const { signature, receipt } = await client.donateViaX402({
projectId: "9RRsXtiCFu2RmGBcqcjosxek1QLjWVW8Z74hvJ6Bjh8H",
amount: 10_000_000, // 10 USDC (6 decimals)
});
Donate over raw HTTP (any language)
POST /x402/donate/:projectId → 402 + accepts[] envelope (incl. unsigned tx)
POST /x402/donate/:projectId → 200 + X-PAYMENT-RESPONSE receipt
X-PAYMENT: base64({ x402Version, scheme: "exact", network, payload: { signedTx } })
Use from Claude Desktop / Cursor (MCP)
{
"mcpServers": {
"agentfund": {
"command": "npx",
"args": ["-y", "@agentfund/mcp"]
}
}
}
Run the stack locally
You don't need any of this to build against AgentFund — the hosted API at
https://api.agentfund.online is live. This is only for working on the
platform's own code.
npm install
npm run build:shared
# Programs (requires Solana + Anchor 0.30.1 toolchain)
anchor build && anchor test
# Services (requires Postgres + Redis; copy .env.example → .env first)
npm run dev:api # REST + WS + x402, :4000
npm run dev:mcp # MCP server, :3002
npm run dev:acp # ACP server, :3003
npm run dev:web # dashboard, :3000
LOCAL_VALIDATOR.md walks through the full local-validator setup, and the scripts/prove-*.ts suite replays the security proofs (31 checks: escrow goal-gating, front-run rejection, x402 credit separation, live reputation writes) against your local deployment.
On-chain design highlights
- Atomic project + escrow creation — one transaction creates the registry project and initializes its escrow; the escrow program cross-checks the registry account (creator, goal, deadline, milestone count, mint) and rejects mismatches, so a front-runner can't attach a hostile escrow to someone else's project.
- Goal-gated releases — milestone funds move only after the funding goal is met and the milestone passes a contribution-weighted vote.
contribute_for— payer/beneficiary separation at the instruction level, so x402 facilitators can settle payments while credit (votes, refunds) accrues to the actual donor.- Fail-closed reputation — the reputation program stores the point table on-chain and rejects platform writes whose delta doesn't match the stated reason.
Documentation
- DEPLOYMENT.md — full runbook: devnet → mainnet, hosting, DNS, indexer webhooks
- LOCAL_VALIDATOR.md — local validator + full-stack E2E setup
- DISTRIBUTION.md — where agents (and humans) will discover AgentFund
- SECURITY.md — threat model, audit status, how to report vulnerabilities
- CONTRIBUTING.md — dev setup and PR guidelines
License
MIT © 2026 AgentFund contributors
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。