AntSeed — Integration Skill

SkillCloud & infra

Lets your agent route AI inference requests through the AntSeed buyer proxy on localhost:8377.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the AntSeed — Integration Skill skill

About this capability

Connect coding agents, AI SDKs, and LLM tools to the AntSeed buyer proxy. Use when configuring Claude Code, Codex, OpenCode, Pi, OpenClaw, Hermes, GenLayer Studio, Vercel AI SDK, LangChain, or raw HTTP to route inference through AntSeed at localhost:8377.

What this skill tells your AI

The instructions your AI receives, as published by internet-court/internet-court-skill in vendored/antseed/antseed-connect/SKILL.md and read by ahel’s review.

This file is the agent-readable companion to https://antseed.com/integrations. It tells any AI agent (Claude, Codex, OpenClaw, Hermes, custom) exactly how to wire its tool of choice up to the AntSeed peer-to-peer inference network.

What is AntSeed?

AntSeed is a peer-to-peer marketplace for AI inference. Buyers run a small local daemon (the buyer proxy) that exposes an HTTP API at http://localhost:8377 speaking the three caller-facing LLM API protocols: Anthropic Messages, OpenAI Chat Completions, and OpenAI Responses. Legacy OpenAI Completions is supported internally for adapter translation. The proxy discovers providers on a DHT, routes the request to a peer, translates between protocols when needed (via @antseed/api-adapter), and settles in USDC on Base.

Important: AntSeed is for value-added AI services (specialized models, agents, TEEs, fine-tunes, managed workflows), not raw resale of API keys or subscription access. Providers must comply with upstream terms of service.

From the perspective of any tool, SDK, or agent, AntSeed is just a local OpenAI/Anthropic-compatible endpoint — point a base_url at it and you are done.

Glossary (mental model)

  • Buyer proxy — the local server on localhost:8377 that accepts API calls from your tools and forwards them to AntSeed peers. It is the only thing your editor / agent / SDK ever talks to.

  • Peer — someone selling inference. Each peer has a peerId (40-char hex), a display name, and a list of services. List with antseed network browse.

  • Service — a single model id like claude-sonnet-4-6 or deepseek-v4-flash. This is what you pass as model in your tool's config. Each service has its own native protocol list and its own in / cachedIn / out pricing.

  • Protocols (per service) — the wire formats a service accepts natively, advertised on each peer in providerServiceApiProtocols[provider].services[service]. Values are anthropic-messages, openai-chat-completions, openai-responses, openai-completions. This is the field to match your tool's wire format against. If your tool's wire format is in this list, the request passes through untouched; if not, the api-adapter translates on the fly.

  • Cached input pricing — services charge a separate, much lower rate (typically 4–10×) for tokens that are reused across requests: system prompts, tool schemas, prior conversation turns, long files you keep referencing. The CLI exposes it as cachedInputUsdPerMillion. For long-running agents and chatbots, this is often the dominant cost line.

  • Pin — telling the buyer proxy "route requests to this peer." In the default manual flow, there is no peer auto-selection; you must choose a peer, send a per-request pin header, or start the proxy with a router plugin that performs selection. Common explicit routes:

    • Session pin: antseed buyer connection set --peer <peerId>. Persists in ~/.antseed/buyer.state.json and applies to every request until you change it.
    • Per-request header: x-antseed-pin-peer: <peerId> on each call. Overrides the session pin for that request, and works without any session pin at all.
    • Model prefix: set model to <peerId>@<service>. The proxy uses the prefix as the peer pin and forwards only <service> to the seller.

    If both header and model-prefix pins are present, the header selects the peer; the model prefix is still stripped before routing. Until at least one of these is in effect, every request returns no_peer_pinned.

Universal setup (do this once)

Option A — VPR desktop app (easiest)

Download from https://antseed.com — it ships the buyer proxy, a wallet, and a peer browser in a GUI. While the app is open the proxy is reachable at http://localhost:8377.

Option B — CLI (headless / servers / agents)

# 1. Install
npm install -g @antseed/cli

# 2. Identity (an EVM private key — 64 hex chars). Save this somewhere safe;
#    you will reuse it across machines and it controls your USDC deposits.
export ANTSEED_IDENTITY_HEX=$(openssl rand -hex 32)
# SECURITY: never paste this key into chat, logs, GitHub issues, or a file
# committed to git. It controls the buyer identity and access to deposits.

# 3. Start the buyer proxy on :8377
antseed buyer start &

# 4. Browse the network and list every service (= model) each peer offers,
#    along with its native protocols and USD-per-1M-tokens pricing.
#    `service` is the model id you pass to your tool. `protocols` is the
#    wire format(s) the service accepts natively — match it against your
#    tool. `in` / `cachedIn` / `out` are fresh-input / cached-input / output.
antseed network browse --json --top 5 \
  | jq '.peers | map({
      peerId, name: .displayName,
      services: [
        (.providerServiceApiProtocols | to_entries[]) as $p
        | ($p.value.services | to_entries[]) as $s
        | {
            service:  $s.key,
            protocols: $s.value,
            in:       (.providerPricing[$p.key].services[$s.key].inputUsdPerMillion       // .providerPricing[$p.key].defaults.inputUsdPerMillion),
            cachedIn: (.providerPricing[$p.key].services[$s.key].cachedInputUsdPerMillion // null),
            out:      (.providerPricing[$p.key].services[$s.key].outputUsdPerMillion      // .providerPricing[$p.key].defaults.outputUsdPerMillion)
          }
      ]
    })'

# 5. Inspect one peer in detail. Use `matchingServices[]` for pricing/tags and
#    `peer.providerServiceApiProtocols` for native protocol support.
#    `cachedIn` is typically 4–10× cheaper than `in` and often dominates the
#    cost line for long-running agents and chatbots — always include it when
#    comparing peers.
antseed network peer <peerId> --json \
  | jq '{
      peer: (.peer | { peerId, name: .displayName,
                       sessions: .onChainChannelCount,
                       ghosts:   .onChainGhostCount }),
      services: [
        (.peer.providerServiceApiProtocols | to_entries[]) as $p
        | ($p.value.services | to_entries[]) as $s
        | (.matchingServices[] | select(.provider == $p.key and .service == $s.key)) as $m
        | {
            provider: $p.key,
            service: $s.key,
            protocols: $s.value,
            in:       $m.inputUsdPerMillion,
            cachedIn: $m.cachedInputUsdPerMillion,
            out:      $m.outputUsdPerMillion,
            tags:     $m.tags
          }
      ]
    }'

# 6. Pin a peer (session-wide). Until you do, every request returns
#    `no_peer_pinned` UNLESS the request includes an `x-antseed-pin-peer`
#    header (see Per-request peer selection below).
antseed buyer connection set --peer <peerId>

# 7. Verify the proxy advertises the services you expect
curl -s http://localhost:8377/v1/models | jq '.data[].id'

# 8. (Optional) Deposit USDC on Base for paid services
antseed payments  # opens portal at 127.0.0.1:3118?token=<hex> — connect a wallet, deposit USDC

Security notes for agents and deploys

  • Treat ANTSEED_IDENTITY_HEX / ~/.antseed/identity.key as a hot wallet key. Never print it, paste it into chat, commit it, or copy it off the buyer host.
  • Keep the buyer proxy bound to 127.0.0.1 / localhost. Do not expose :8377 directly to the public internet; use SSH tunnels or a private network if another process must reach it remotely.
  • Start with small USDC deposits and conservative reserve caps for autonomous agents. The funding wallet does not need to stay connected after depositing.
  • If a tool requires an API key, use a non-secret placeholder such as antseed; the buyer proxy authenticates with the local identity key instead.

Endpoints exposed by the buyer proxy

PathWire formatCommon callers
POST /v1/messagesAnthropic MessagesClaude Code, Anthropic SDKs, OpenClaw
POST /v1/chat/completionsOpenAI Chat CompletionsCodex, Hermes, OpenAI SDKs, Vercel AI SDK, LangChain, most tools
POST /v1/responsesOpenAI ResponsesCodex (newer builds), tools using the Responses API

All four protocols (including legacy openai-completions) are supported by @antseed/api-adapter for translation, but only the three endpoints above are exposed to callers. Translation is automatic: a request that arrives in one format and is routed to a peer whose service advertises a different protocols value is transformed both directions (request and streaming response).

No Authorization header is required by the buyer proxy. It authenticates and pays peers using the local node's identity key and on-chain USDC deposits.

Per-request peer selection (no session pin needed)

Two ways to tell the proxy which peer to use:

  1. Session pinantseed buyer connection set --peer <peerId>. Persists in ~/.antseed/buyer.state.json (pinnedPeerId) and applies to every request until you change it. Best for single-tenant setups (laptops, dedicated agents).
  2. Per-request header — send x-antseed-pin-peer: <peerId> on each call. Overrides the session pin for that one request. You do not need to call antseed buyer connection set at all if every request includes this header — the proxy will accept and route them. Best for scripts, schedulers, and multi-tenant deployments that need to fan out to different peers per call.

Example (per-request, no session pin):

curl http://localhost:8377/v1/chat/completions \
  -H 'content-type: application/json' \
  -H 'x-antseed-pin-peer: 4668854ba3e8b094e6f48fbeb59cec1cfde162f2' \
  -d '{ "model": "minimax-m2.7", "messages": [{"role":"user","content":"hi"}] }'

Other optional headers:

  • x-antseed-provider: <providerName> — when a peer exposes the same service through more than one seller-plugin (rare), force a specific one. Most tools never need this.

Files the CLI creates in ~/.antseed/

Knowing what lives in ~/.antseed/ matters for backups, container deploys, and debugging. The directory is created on first antseed buyer start (or first run of any antseed command that needs it).

PathPurposeSurvives restart?Safe to delete?
identity.keyRaw 32-byte EVM private key for the buyer wallet. Fallback when ANTSEED_IDENTITY_HEX is not set.yesNO — deleting loses access to your USDC deposits. Back this up.
identity.encEncrypted copy of identity.key (when the desktop app sets a passphrase).yesonly if identity.key is also intact
config.jsonStatic settings: chain id, proxy port, max-pricing caps, bootstrap nodes, payments preferences. Hand-editable.yesyes (defaults are sane)
buyer.state.jsonLive runtime state: pinnedPeerId, the discovered-peers cache (discoveredPeers), on-chain stats, the proxy pid and port. Re-built from the network on next start.yes (the pin survives restart)yes (you lose the pin and the cached peer list — next browse will repopulate)
metering.dbSQLite log of every request the proxy served (model, peer, tokens, USDC). Used by antseed buyer status and the payments portal.yesyes (you lose request history; settlement is unaffected)
payments/Per-channel state used by the seller-side settlement flow (only relevant if you also run antseed seller).yesonly if you do not run a seller
plugins/Cache of downloaded provider plugins.yesyes (re-downloaded on next use)
chat/, projects/Used by the desktop app for local chat history. Empty on a CLI-only setup.yesyes

config.json (commonly edited)

{
  "buyer": {
    "proxyPort": 8377,                  // change if 8377 conflicts on the host
    "minPeerReputation": 0,             // optional: raise to filter lower-reputation peers
    "maxPricing": {                     // refuse to route to peers above this rate
      "defaults": { "inputUsdPerMillion": 100, "outputUsdPerMillion": 100 }
    }
  },
  "payments": {
    "preferredMethod": "crypto",
    "crypto": { "chainId": "base-mainnet" }   // or "base-sepolia" for testnet
  },
  "network": { "bootstrapNodes": [] }   // empty = use built-in defaults
}

Edit, then restart the buyer proxy. Do not hardcode contract addresses — the chain preset (base-mainnet / base-sepolia) resolves Deposits, Channels, USDC, and the RPC URL automatically.

buyer.state.json (read-only in practice)

Top-level fields that an agent might want to inspect:

  • pinnedPeerId — the currently pinned peer (or null).
  • pid / port — the running proxy. If pid is non-null but the process is gone, antseed buyer start will detect the stale lockfile and clean up.
  • discoveredPeers — cached peer list from the last DHT browse. Refreshed on antseed network browse.
  • peersUpdatedAt, onChainStatsRefreshedAt — cache timestamps (epoch millis).

To force a clean reset of pin + caches without losing your wallet:

antseed buyer stop || true
rm ~/.antseed/buyer.state.json
antseed buyer start &

How to integrate

Below is every integration we currently document. Find your tool, copy the config block, done. If your tool is not listed but accepts a custom OpenAI or Anthropic base URL, follow the closest example (or look at the curl / Raw HTTP entry — the contract is stable).

Claude Code

Anthropic's official CLI agent - launch through AntSeed with antseed claude.

TL;DR for agents: Prefer antseed claude --model <service-id>. It sets ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY for Claude Code. Manual equivalent: set ANTHROPIC_BASE_URL=http://localhost:8377 and ANTHROPIC_API_KEY=antseed, then run claude --model <service-id>.

Claude Code is the official CLI coding agent from Anthropic. It speaks the Anthropic Messages API natively, so it slots into AntSeed through the antseed claude wrapper or by pointing ANTHROPIC_BASE_URL at your local proxy.

antseed claude resolves the active buyer proxy, sets the placeholder Anthropic API key for the child process, and forwards the rest of your Claude Code flags unchanged. Manual environment variables still work if you want to run claude directly.

No real Anthropic API key is needed - the AntSeed proxy authenticates each request with your local identity (ANTSEED_IDENTITY_HEX) and settles payments on-chain. The ANTHROPIC_API_KEY value is required by the Anthropic SDK only as a non-empty placeholder.

When Claude Code calls the Messages API, the proxy forwards the request to the peer you pinned in step 3 of the setup above. Whichever service ids that peer advertises (visible in antseed network peer <peerId>) become the valid --model values.

Install

  • Install Claude Code globally
    npm install -g @anthropic-ai/claude-code
    
  • Verify it runs
    claude --version
    
    Example output:
    1.4.2 (Claude Code)
    

Configure

antseed claude --model claude-sonnet-4-6

Recommended: the wrapper reads the active buyer proxy from buyer.state.json or config, sets ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY for Claude Code, and forwards extra Claude args. Add --antseed-base-url http://host:port only when your proxy is somewhere else.

export ANTHROPIC_BASE_URL="http://localhost:8377"
export ANTHROPIC_API_KEY="antseed"

Manual equivalent if you want to run claude directly instead of through antseed claude.

Suggested models: claude-sonnet-4-6, claude-opus-4-7, deepseek-v4-flash

antseed claude --model <service-id> passes the value to Claude Code unchanged. The valid set is whatever your pinned peer advertises - see the discovery commands below.

Test it

  • See which models your pinned peer offers
    curl -s http://localhost:8377/v1/models | jq '.data[].id'
    
    Example response:
    "claude-opus-4-7"
    "claude-sonnet-4-6"
    "deepseek-v4-flash"
    "gpt-oss-120b"
    

    These are the only ids that work with --model. To switch peers, run antseed network browse, then antseed buyer connection set --peer <peerId> and re-check this list.

  • Start a Claude Code session through the wrapper
    antseed claude --model claude-sonnet-4-6
    

    Manual equivalent after exporting the env vars above: claude --model claude-sonnet-4-6.

Troubleshooting

  • "invalid x-api-key" or 401 from Anthropic SDKantseed claude sets ANTHROPIC_API_KEY=antseed for you. If you run claude directly, set the variable to any non-empty string; the proxy ignores the value.
  • Hangs forever on first message — No peer is pinned. Run antseed network browse to see peers, then antseed buyer connection set --peer <peerId>.
  • model_not_found for a model name you expected to work — The pinned peer doesn't advertise that service id. Check what it does offer with antseed network peer <peerId> (or curl http://localhost:8377/v1/models). Pin a different peer if needed.
  • Want to confirm a request actually went through AntSeed (not Anthropic direct) — After the request completes, run antseed buyer metering - you'll see the channel for the peer Claude Code routed to, with token counts and the USDC settled. antseed buyer status shows the snapshot (pinned peer, active-channel count, deposits).

How Claude Code talks to AntSeed

  • Wire format sent by Claude Code: Anthropic Messages (hits /v1/messages on the buyer proxy).
  • Best-fit services: any service whose protocols array contains anthropic-messages — that is what the peer advertises as natively-supported, so traffic passes through with zero translation overhead.
  • How to check a peer: run antseed network peer <peerId> --json and look at peer.providerServiceApiProtocols[provider].services[service] for each model. The browse command exposes the same field per peer.
  • When protocols differ: AntSeed's @antseed/api-adapter translates between Anthropic Messages and the service's native protocol on the fly. So a request from Claude Code can still reach a service that only advertises a different protocol — just with a small transform step.
  • Caveat: services whose only advertised protocol is openai-responses require streaming. If Claude Code sends a non-streaming request and the proxy routes it to one of those services, the call fails with HTTP 400: Stream must be set to true. Pick a service whose protocols includes anthropic-messages (or another non-responses protocol) to avoid this.

Links


OpenAI Codex CLI

OpenAI's official CLI coding agent - use antseed codex for per-run proxy config.

TL;DR for agents: Prefer antseed codex --model <service-id>. It injects the AntSeed Codex provider for one run using base_url=http://localhost:8377/v1 and wire_api="responses". Manual alternative: create user-level ~/.codex/antseed.config.toml with top-level model/model_provider plus [model_providers.antseed], then run codex --profile antseed.

Codex is OpenAI's terminal coding agent. Recent versions ignore OPENAI_BASE_URL and instead read provider config from Codex settings.

antseed codex supplies that provider config for one run with Codex -c overrides, points it at the active buyer proxy, sets the placeholder API key, and leaves your real CODEX_HOME untouched.

If you prefer a persistent manual setup, create ~/.codex/antseed.config.toml and launch Codex with codex --profile antseed; the wrapper is still the shortest path for one-off sessions.

Install

  • Install Codex globally
    npm install -g @openai/codex
    
  • Verify it runs
    codex --version
    

Configure

antseed codex --model claude-sonnet-4-6

Recommended: the wrapper resolves the proxy URL, injects an AntSeed model provider with wire_api = "responses", sets ANTSEED_API_KEY=antseed, and forwards extra Codex args. Put child flags after -- when they look like wrapper flags.

# Loaded by: codex --profile antseed
# Set this to a service id returned by http://localhost:8377/v1/models
# after pinning an AntSeed peer.
model = "claude-sonnet-4-6"
model_provider = "antseed"

[model_providers.antseed]
name = "AntSeed"
base_url = "http://localhost:8377/v1"
wire_api = "responses"

Manual profile only: this must be your user-level ~/.codex/antseed.config.toml, then launch with codex --profile antseed. If your buyer proxy uses a non-default port, update base_url to match it. Project-local ./.codex/config.toml provider blocks are ignored by Codex.

GUI:

No real OpenAI key is needed. The AntSeed proxy authenticates with your local buyer identity; the wrapper and manual profile both point Codex at the local proxy instead of OpenAI.

Suggested models: claude-sonnet-4-6, deepseek-v3.1, kimi-k2.5, qwen-3-coder-480b

Pass the peer service id to antseed codex --model <service-id>. For a manual profile, set top-level model = "<service-id>" in ~/.codex/antseed.config.toml or override with codex --profile antseed --model <service-id>.

Test it

  • See which service ids your pinned peer exposes
    curl -s http://localhost:8377/v1/models | jq '.data[].id'
    
    Example response:
    "claude-opus-4-7"
    "claude-sonnet-4-6"
    "deepseek-v4-flash"
    "gpt-oss-120b"
    

    Whatever appears here is a valid value for top-level model = ... in ~/.codex/antseed.config.toml (or for codex --profile antseed --model <id>).

  • Run Codex through the wrapper
    antseed codex --model deepseek-v4-flash
    

    Manual profile equivalent: codex --profile antseed --model deepseek-v4-flash.

  • Verify inference is actually paid through AntSeed
    open http://localhost:3118   # or: antseed buyer status
    
    What to look for after one real prompt:
    Deposits available: 4.289391 USDC → 3.289391 USDC
    Deposits reserved:           0 USDC → 1 USDC
    

    The buyer dashboard at http://localhost:3118 is the authoritative real-time signal: a non-zero Reserved (channel opened) and/or a drop in Available (settled spend) after a real prompt confirms AntSeed served the request. The antseed buyer status CLI output is cached and may lag the dashboard - refresh the web view for confirmation. Do not rely on lsof -i | grep codex or ~/.codex/log/codex-tui.log: Codex keeps persistent TCP connections to Cloudflare/ChatGPT IPs (e.g. 172.64.0.0/13) for non-inference purposes (the cause was not isolated during testing), and the provider=OpenAI lines in the TUI log are not a reliable indicator that inference went to OpenAI - the on-chain numbers can show AntSeed served the request despite that log line.

Troubleshooting

Shortened here. Read the whole file on GitHub.

Signals

GitHub stars
6k
Forks
104
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
antseed-connect
Source
github.com/internet-court/internet-court-skill