Skip to main content
Glama

AgentFi

Status: Reactivated (exploratory) License: Apache 2.0 npm version

๐Ÿ” Reactivated (exploratory) โ€” 2026-10-06

AgentFi was archived on 2026-05-17 after ~50 days of development without finding a user (the postmortem is kept below for honesty). It is being reactivated in exploratory mode: a 90-day validation with explicit go/no-go gates, not a relaunch.

What changed. Between May and October 2026 the market converged on the thesis: x402 became a Linux Foundation standard backed by Visa, Mastercard, Stripe, Google and AWS; AWS, Cloudflare and Circle shipped agent payment rails; ERC-8004 (agent identity/reputation) is on mainnet and ERC-8183 (agent-to-agent job escrow) is a draft standard. Generic agent wallets with spending limits are now a commodity.

New direction. AgentFi is repositioning as a trust layer for agents that hire agents: ERC-8183-compatible escrow, ERC-8004 reputation anchored in settled payments, and an MCP server so Claude/Codex agents can execute, all on top of third-party wallets and rails (Coinbase CDP, MetaMask, x402, MPP). Not another wallet.

Plan and status: docs/project/execution-plan-2026-10.md ยท Review that led here: docs/project/reactivation-2026-10.md ยท Market evidence: docs/project/market-signals-2026-10.md

Honest postmortem. AgentFi reached technical MVP early (agent registration โ†’ on-chain transaction with operator fee collection worked) and then accumulated breadth (4 chains, 31 MCP tools, A2A jobs, escrow v3, revenue sharing) without ever finding a user. Over ~50 days the surface area grew while real adoption stayed at zero.

Why archived. The thesis (AI agents executing autonomous DeFi operations) remains directionally correct, but the market is ~2-3 years early โ€” confidence in LLM-driven financial autonomy is the bottleneck, not tooling. When the market opens, well-capitalized incumbents (Coinbase Agent Kit, Safe modules, Anthropic-native primitives) will move in. No defensible moat for a solo OSS protocol in that window.

Live infrastructure (Fly.io backend, Upstash Redis) was decommissioned on archive. The maintainer's smart contracts on Base Mainnet remain deployed.


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.md โ€” why this project exists, where it's going, and the principles behind every technical decision.

  • STATE.md โ€” what the project is today: purpose, full stack, capabilities, phase progress.

  • HANDOFF.md โ€” live pending tasks, credentials inventory, new-machine setup.


Related MCP server: Universal Crypto MCP

๐Ÿ“š Documentation

All project documentation is organized in our Documentation Hub.


๐Ÿš€ Key Features

  • Turnkey wallets โ€” keys are created and used inside Turnkey's secure enclaves; the AgentFi process never holds them (the in-memory local provider is for development only).

  • On-chain policy module โ€” AgentPolicyModule holds per-agent limits, whitelists and the kill switch. It checks transactions routed through AgentExecutor, for agents whose policy is synced on-chain. No module or executor from this build is deployed on a public network yet. Agents run as plain wallets (EOA). Safe mode does not work yet (plan D19): it is refused in production and staging, and elsewhere it only warns and agents fall back to their EOA.

  • Model Context Protocol โ€” @agent_fi/mcp-server: 35 tools in the source on main (DeFi execution, GMX perpetuals, A2A jobs with on-chain escrow, x402 payments, trust, and P&L); the published npm 0.5.0 has 31 of them until 0.6.0 ships (plan X3).

  • DeFi coverage โ€” Uniswap V3 + Curve StableSwap (swaps); Aave V3, Compound V3, and any ERC-4626 vault (yield).

  • Agent-to-Agent economy โ€” job queue and paid jobs escrowed on-chain in USDC by AgentJobEscrow (ERC-8183), settled by the operator's evaluator, with ERC-8004 feedback written by ReputationHook in the settlement transaction; not deployed on a public network yet (Base Sepolia is task C4, runbook in docs/project/testnet-log.md). Jobs on chains without the escrow keep the older DB-level escrow. Internal 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, plus Base Sepolia for the testnet. No current-ABI contracts are deployed anywhere yet; the maintainer's Base Mainnet pair is legacy (see STATE.md ยง3).

  • Protocol fees โ€” a platform fee (30 bps by default) taken from the USDC budget when an escrowed job completes, and a basis-point fee collected atomically by AgentExecutor on the ETH value of routed DeFi transactions.


๐Ÿ› ๏ธ 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. Do not point a backend at the maintainer's Base addresses in STATE.md: that pair is legacy (old Action ABI, every routed transaction reverts), and an escrow + hook you did not deploy names someone else's operator, fee wallet and trusted evaluator.

  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 Quickstart โ€” docker 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. Run the Claude Desktop MCP Demo โ€” two MCP identities, discovery, A2A job, trust, and P&L.

  4. Run the ERC-8183 escrow example on the local Base Sepolia fork harness โ€” USDC escrow, settlement and ERC-8004 feedback end to end.

  5. Review the Architecture Overview.

  6. Use the MCP Server to integrate your agents.


๐Ÿ›ก๏ธ Security

AgentFi is built for security-first autonomy.

  • Simulations: Every transaction is simulated before submission โ€” via Tenderly when configured, otherwise an eth_call/estimateGas dry-run against the chain RPC. A mock simulation is never used in production.

  • 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.

Available Tools

31 tools
check_inboxA

Checks for new service requests (jobs) assigned to you by other agents. Returns a list of PENDING and ACCEPTED jobs.

Inputs: no named parameters.

close_gmx_positionA

Closes (fully or partially) a perpetual position on GMX V2 (Arbitrum). Creates a MarketDecrease order. Specify the market, collateral token, size to close, and direction. Use the full position size in size_delta_usd for a complete close.

Inputs: market (required), is_long (required), size_delta_usd (required), acceptable_price (required), +2 more.

deposit_aaveA

Supplies an asset to Aave V3 lending protocol to earn yield. The supplied amount earns the current supply APY and can be withdrawn at any time. Call get_defi_rates first to check current rates.

Inputs: asset (required), amount (required), chain_id.

deposit_erc4626A

Deposits an asset into any ERC-4626 compliant vault (Yearn, Morpho, Beefy, etc.). The vault address is supplied by the caller โ€” no pre-registration needed. Useful for any yield strategy that follows the tokenized-vault standard.

Inputs: asset (required), vault (required), amount (required), chain_id.

execute_swapA

Executes a token swap via Uniswap V3. You MUST call simulate_swap first and pass the returned simulation_id here. Returns a transaction_id to track the status with get_transaction_status.

Inputs: to_token (required), amount_in (required), from_token (required), simulation_id (required), +2 more.

get_agent_manifestA

Fetches the service manifest of another agent by their ID. Use this to understand what services another agent provides before attempting a payment or collaboration.

Inputs: agent_id (required).

get_agent_trust_reportA

Fetches the reputation and trust metrics of another agent. Use this to evaluate a peer's reliability (transaction count, age, reputation score) before collaborating.

Inputs: agent_id (required).

get_defi_ratesA

Returns current supply and borrow APY rates for major assets on Aave V3. Use this to decide where to deploy capital for yield.

Inputs: chain_id.

get_my_agent_profileA

Fetches this AgentFi agent profile using the configured API key. Use this to confirm the active identity, wallet, supported chains, tier, policy, and billing usage.

Inputs: no named parameters.

get_my_pnlA

Fetches this agent's profit and loss breakdown. Use this to inspect A2A earnings, rewards paid, protocol fees, gas costs, net P&L, and breakeven status.

Inputs: since.

get_policyA

Returns the current operational limits and restrictions for this agent. Check this to understand what transactions are allowed before attempting them.

Inputs: no named parameters.

get_token_priceA

Returns the current USD price of a token. Use this before swaps to understand value.

Inputs: token_symbol (required), chain_id.

get_transaction_statusA

Returns the current status of a submitted transaction. Poll this after execute_swap, transfer_token, deposit_aave, or withdraw_aave. Status values: PENDING, SIMULATING, QUEUED, SUBMITTED, CONFIRMED, FAILED, REVERTED.

Inputs: transaction_id (required).

get_wallet_infoA

Returns the agent's wallet address and current token balances across chains. Call this to know how much ETH, USDC, USDT, DAI, WETH the agent holds before executing transactions.

Inputs: chain_id.

list_gmx_marketsA

Lists available GMX V2 perpetual markets on Arbitrum. Returns market labels and token addresses. Use this to discover which markets are available before opening positions.

Inputs: no named parameters.

open_gmx_positionA

Opens a leveraged perpetual position on GMX V2 (Arbitrum). Creates a MarketIncrease order that is executed by a GMX keeper after oracle price update. Specify the market (e.g. "ETH/USD"), collateral amount, position size in USD, and direction (long/short). Returns a transaction ID to track with get_transaction_status.

Inputs: market (required), is_long (required), size_delta_usd (required), acceptable_price (required), +3 more.

pay_agentA

Constructs and executes a direct payment to another agent. Use this to pay for services, data, or compute provided by another AI agent.

Inputs: amount (required), reason (required), recipient_address (required), chain_id, +1 more.

post_jobA

Submits a service request (job) to another agent. Use this to delegate tasks defined in the provider's manifest. You should sign the payload before posting.

Inputs: payload (required), provider_id (required), signature, reward_token, +1 more.

search_agentsA

Finds other agents by name or wallet address. Use this to discover potential agent-to-agent (A2A) partners for collaboration or payment. Returns a list of agents with their safeAddress and active chains.

Inputs: query (required).

set_my_manifestA

Sets the agent's service manifest. Use this to broadcast your capabilities to other agents (e.g., "I provide risk analysis", "I offer liquidity data"). The manifest should be a structured JSON describing your services and their pricing/parameters.

Inputs: manifest (required).

sign_handshakeA

Signs a message with your agent wallet. Use this to prove your identity to other agents or to sign a service agreement/handshake.

Inputs: message (required).

simulate_swapA

Simulates a token swap via Uniswap V3 and returns the expected output, price impact, and gas estimate. ALWAYS call this before execute_swap to verify the trade is viable. Returns a simulation_id that must be passed to execute_swap.

Inputs: to_token (required), amount_in (required), from_token (required), chain_id, +1 more.

supply_compoundA

Supplies an asset to Compound V3 (Comet USDC market) to earn yield. Each Compound V3 market is single-asset; the USDC market accepts USDC as the base asset plus whitelisted collateral (e.g. WETH, WBTC). Available on Mainnet, Base, Arbitrum, Polygon.

Inputs: asset (required), amount (required), chain_id.

swap_curveA

Swaps between two assets on a Curve StableSwap pool. Ideal for stablecoin-to-stablecoin conversions (USDCโ†”USDTโ†”DAI) with minimal slippage. The caller must supply the pool address and the indices of the input/output tokens within that pool. Assumes fromToken has already been approved to the pool; simulation will fail clearly if approval is missing.

Inputs: pool (required), amount_in (required), min_amount_out (required), to_token_index (required), +4 more.

transfer_tokenB

Transfers ETH or an ERC-20 token to any Ethereum address. Use "ETH" as the token identifier to send native ETH, or provide a contract address for ERC-20.

Inputs: to (required), token (required), amount (required), chain_id.

update_job_statusA

Updates the status of a job (Accept, Complete, Fail). Use this to manage your workflow as a service provider.

Inputs: job_id (required), status (required), result.

update_policyA

Updates the agent's own operational policy. The change applies IMMEDIATELY โ€” there is no operator approval step. The operator can audit and revert via the admin panel. Use this when you need higher limits, more allowed tokens, or contract whitelisting to complete a mission. Provide a reason for audit โ€” it is logged but does not gate the change.

Inputs: reason (required), allowed_tokens, allowed_contracts, max_value_per_tx_eth.

verify_handshakeB

Verifies a signature provided by another agent. Use this to confirm that a peer truly controls the wallet address they claim to represent.

Inputs: address (required), message (required), signature (required).

withdraw_aaveB

Withdraws a previously supplied asset from Aave V3. Pass "max" as the amount to withdraw your entire position.

Inputs: asset (required), amount (required), chain_id.

withdraw_compoundB

Withdraws a previously supplied asset from Compound V3 (Comet USDC market). Pass "max" as the amount to withdraw your entire balance.

Inputs: asset (required), amount (required), chain_id.

withdraw_erc4626A

Withdraws assets from any ERC-4626 compliant vault. Use "max" to attempt a full withdrawal (vault may still limit to available liquidity).

Inputs: asset (required), vault (required), amount (required), chain_id.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.9/5.0

    Scored across 31 tools

    Disambiguation5/5

    Each tool targets a unique action and domain (A2A jobs, peer discovery, wallet management, DeFi protocols). Overlaps like multiple yield protocols are clearly separated by protocol-specific names and descriptions.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with underscores, e.g., `check_inbox`, `deposit_aave`, `get_agent_manifest`. No mixed conventions or unclear names.

    Tool Count4/5

    31 tools cover a broad domain (A2A + multi-protocol DeFi), which justifies the count. Slightly heavy but each tool serves a distinct purpose; no glaring redundancies.

    Completeness4/5

    Core A2A workflows (post/accept/complete jobs, payments, identity verification) and DeFi operations (swaps, lending, perps, rates) are well-covered. Minor gaps like job cancellation or agent deregistration exist but are acceptable.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers