AgentData - Executable Liquidity / Exit-Cost

السجل الرسمي الذكاء الاصطناعي والوكلاء

Size-aware exit cost, depeg risk & liquidity fragility for a Base token (x402, testnet).

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

Remote (streamable-http)
Claude Code
claude mcp add --transport http agentdata-executable-liquidity-exit-cost 'https://agentdata-liquidity-exit-cost.onrender.com/mcp/'
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "agentdata-executable-liquidity-exit-cost": {
            "type": "http",
            "url": "https://agentdata-liquidity-exit-cost.onrender.com/mcp/"
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. AgentData — Executable Liquidity (endpoint #1)
  2. What it answers
  3. Layout
  4. Run it (local, no funds, no network)
  5. Test
  6. Status

AgentData — Executable Liquidity (endpoint #1)

A pay-per-call data endpoint for AI agents: size-aware exit cost, depeg risk, and liquidity fragility for a token on Base. Not raw prices — computed, normalized, decision-grade intelligence an agent needs before it acts. Settled in USDC via x402 (Phase 2). Sourced on-chain, so the derived data is cleanly redistributable.

Strategy, values, and roadmap live in CLAUDE.md. Decisions are logged in decisions/DECISION_LOG.md and decisions/adr/.

What it answers

"If I try to exit this position right now, what does it actually cost me, how much can I move before slippage blows past X bps, and how fragile is that liquidity?"

Three priced tiers (single source of truth in agentdata/api/pricing.py):

TierContentsMainnet price
quotebest-route exit cost for one size$0.008
riskexit cost + fragility (+ depeg for pegged assets) — default$0.02
deeprisk + multi-size exit-cost curve + max-size-before-cost ladder$0.04

Testnet forces every price to $0 (the 402 flow is still exercised end-to-end).

Layout

src/agentdata/
  config.py            # env-driven; NETWORK_MODE testnet|mainnet (testnet default)
  compute/             # the value-add: pure, deterministic, unit-tested math
    amm.py             #   constant-product + Solidly stable curve, exit cost
    routing.py         #   cheapest-venue selection
    depeg.py           #   depeg deviation / dispersion / score
    fragility.py       #   depth + concentration + convexity -> fragility score
    tiers.py           #   quote / risk / deep orchestration
  chain/               # on-chain Base reads (Aerodrome / Uniswap), web3 lazy
    provider.py        #   FixturePoolProvider (default) + factory
    onchain.py         #   OnChainPoolProvider (env-gated, no guessed addresses)
  api/                 # FastAPI JSON layer + pricing + stable schema
  monitoring/          # uptime, latency p50/p95, error rate, calls per tier
tests/                 # unittest (stdlib for compute; fastapi for api)

Run it (local, no funds, no network)

pip install -e .            # or: pip install fastapi pydantic 'uvicorn[standard]'
uvicorn agentdata.api.app:app --reload
# then:
curl 'http://127.0.0.1:8000/v1/liquidity/exit-cost?token=WETH&size=10&tier=risk'
curl 'http://127.0.0.1:8000/pricing'
curl 'http://127.0.0.1:8000/metrics'

Defaults: NETWORK_MODE=testnet, POOL_SOURCE=fixture (deterministic demo pools WETH, THIN, USDX). See .env.example.

Test

# compute core needs no dependencies:
PYTHONPATH=src python -m unittest discover -s tests

Status

  • Phase 1 (local endpoint): done. compute + chain seam + API + monitoring, 42 tests green.
  • Phase 2 (x402 testnet): next. Payment middleware in front of the API, free testnet facilitator on Base Sepolia. No real USDC; mainnet is an escalated human decision (CLAUDE.md §0/§14).
  • On-chain mode requires a verified pool registry before use (ADR-001) — the code refuses to run on guessed contract addresses rather than fake data.

الأسئلة الشائعة

ما هو AgentData - Executable Liquidity / Exit-Cost؟

Size-aware exit cost, depeg risk & liquidity fragility for a Base token (x402, testnet).

كيف أثبّت AgentData - Executable Liquidity / Exit-Cost؟

يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http agentdata-executable-liquidity-exit-cost 'https://agentdata-liquidity-exit-cost.onrender.com/mcp/'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج AgentData - Executable Liquidity / Exit-Cost إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل AgentData - Executable Liquidity / Exit-Cost مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون AgentData - Executable Liquidity / Exit-Cost؟

ينشره phenicea. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.