Agentfi — Defi Tools For Ai Agents

Created By
AgentFi2 months ago
Give your AI agent a wallet. AgentFi provides 10 MCP tools for executing DeFi transactions on EVM chains (Ethereum, Base, Arbitrum, Polygon). Swap tokens, transfer assets, supply to Aave, check balances and prices — all policy-constrained and simulated before broadcast. Each agent gets a dedicated Safe smart wallet with MPC key management via Turnkey.
Overview

AgentFi

CI npm version npm downloads License: Apache 2.0

The economic layer for non-human intelligence.

AgentFi provides crypto transaction infrastructure for AI agents on Ethereum and EVM-compatible networks. It allows agents to execute DeFi transactions (swaps, yield farming, transfers) without handling private keys or managing gas, all within a secure on-chain policy framework.

Start here:

  • VISION.mdwhy this project exists, where it's going, and the principles behind every technical decision.
  • STATE.mdwhat the project is today: purpose, full stack, capabilities, phase progress.
  • HANDOFF.md — live pending tasks, credentials inventory, new-machine setup.

📚 Documentation

All project documentation is organized in our Documentation Hub.


🚀 Key Features

  • Turnkey MPC Wallets — keys split across shards and never exposed.
  • Safe Smart Wallets — per-agent on-chain policy enforcement (limits, whitelists, kill switch).
  • Model Context Protocol — 26 tools published to npm at @agent_fi/mcp-server: 15 DeFi + 11 A2A.
  • DeFi coverage — Uniswap V3 + Curve StableSwap (swaps); Aave V3, Compound V3, and any ERC-4626 vault (yield).
  • Agent-to-Agent economy — job queue, atomic payments, DB-level escrow (v2), reputation scoring from real metrics with time-decay.
  • Agent P&L dashboard — per-agent breakeven detection, including real gas costs (v2).
  • Persistent identity — optional ENS subdomains (alice-abc123.agentfi.eth) wired into agent registration.
  • OpenAPI 3.0.3 spec at docs/api/openapi.yaml — machine-readable contract for SDK generation.
  • Cross-chain — Ethereum, Base, Arbitrum, Polygon (Base Mainnet has maintainer-deployed contracts).
  • Protocol fee engine — basis-point fee collected on-chain atomically via AgentExecutor.

🛠️ Getting Started

For Operators

  1. Follow the Operator Setup Checklist to fill third-party accounts and local .env.
  2. Deploy the Smart Contracts to your target chain (or reuse the maintainer-deployed Base addresses in STATE.md).
  3. Deploy the backend via Self-Hosted Production Guide — provider-agnostic, with Railway as the reference and Fly.io / Render / Docker documented as alternatives.

For Developers

  1. Start with the Dev Quickstartdocker compose up → stack running in 3 minutes, zero external accounts.
  2. Run the A2A Collaboration Example — two-agent end-to-end flow in one file.
  3. Review the Architecture Overview.
  4. Use the MCP Server to integrate your agents.

🛡️ Security

AgentFi is built for security-first autonomy.

  • Simulations: Every transaction is simulated via Tenderly before submission.
  • Guardrails: On-chain policies prevent agents from exceeding predefined limits.
  • Kill Switch: Operators can pause any agent's transaction ability instantly.

Found a vulnerability? See SECURITY.md for our disclosure policy.


🤝 Community


📄 License

AgentFi is open-source and licensed under the Apache 2.0 License.

Server Config

{
  "mcpServers": {
    "agentfi": {
      "command": "npx",
      "args": [
        "-y",
        "@agentfi/mcp-server"
      ],
      "env": {
        "AGENTFI_API_URL": "https://api.agentfi.cc",
        "AGENTFI_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
Project Info
Created At
2 months ago
Updated At
a month ago
Author Name
AgentFi
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Voyei

2 hours ago
Bring your real authenticated browser session to AI coding agents. Local-first MCP server + Chrome MV3 extension. No cloud. No telemetry.
@Cubenest

peek records the user's actual logged-in browser (DOM via rrweb, console events, network metadata, optional response bodies via opt-in Deep capture) through a Chrome MV3 extension. The extension ships events through a native-messaging stdio bridge to a local MCP server (peek-mcp), which persists them to a SQLite database at ~/.peek/sessions.db. AI coding agents (Claude Code, Cursor, Cline, Windsurf) read sessions from the database via 10 MCP tools: Tool What it does list_recent_sessions List recently recorded sessions (id, origin, ts, event count). get_session_summary LLM-readable narrative summary of a session. get_session_console_errors Console errors recorded in a session. get_session_network_errors Failed/notable network requests in a session. get_user_action_before_error Last N user actions before a console error. generate_playwright_repro Generate a runnable Playwright test from a session. get_dom_snapshot Reconstruct the DOM at a given timestamp. query_dom_history Timeline of attribute/text changes for a selector. request_authorization Side-panel consent for write actions (Level 3). execute_action Dispatch a UI action (gated by permission level + destructive blocklist). Why local-first matters Every other "browser session for AI" tool ships to a vendor cloud. peek's SQLite + extension live on the user's machine — no remote endpoints, no telemetry. The privacy policy (docs/peek/PRIVACY_POLICY.md) is the source of truth. Install # 1. Add the MCP server to Claude Code claude mcp add peek -- npx -y @peekdev/mcp # 2. Install the Chrome extension from the Chrome Web Store # (link added once the CWS listing is approved)

a day ago