Use AntSeed as a model provider in pi.
AntSeed runs a local buyer proxy (default http://localhost:8377) that
speaks Anthropic Messages, OpenAI Chat Completions, and OpenAI Responses
interchangeably — the @antseed/api-adapter
translates between them on the fly, regardless of what the upstream seller
actually speaks. This package registers a protocol-aware pi provider named
antseed, so you can switch to AntSeed-routed models with
/model antseed/<id> without manually choosing the wire protocol.
# From GitHub
pi install git:github.com/AntSeed/pi-antseed
# Or try without installing
pi -e git:github.com/AntSeed/pi-antseed
# From a local clone
pi install ./pi-antseedRestart pi (or /reload), then pick any discovered AntSeed service/peer route:
/model antseed/<service-id>@<peer-prefix>
This is the path to a running buyer proxy on http://localhost:8377. The
extension reads /_antseed/peers from that proxy to learn each service's
network-advertised API protocol.
Sources of truth for the commands below: the @antseed/cli
README and
antseed <cmd> --help.
npm i -g @antseed/cli
antseed --versionThe binary is antseed. Identity and state live in ~/.antseed/.
AntSeed authenticates your node with a secp256k1 private key. Export it before running any buyer command:
export ANTSEED_IDENTITY_HEX=<your-private-key-hex>(Persist it in your shell profile or a .env.local next to where you run
antseed.)
Launch the local payments portal and deposit USDC from any funded wallet (MetaMask, Coinbase Wallet, etc.):
antseed payments # opens http://localhost:3118The contract's deposit(buyer, amount) pulls USDC from the connected wallet
and credits your node — your identity key never has to hold funds.
Check balances any time:
antseed buyer balance
antseed buyer statusantseed buyer start # proxy on http://localhost:8377Sanity-check that the OpenAI-compatible endpoint is up:
curl -s http://localhost:8377/v1/models | jqIf the list is empty, the proxy is up but not connected to a seller — keep going.
Browse what's on the network:
antseed network browse
antseed network browse --services # one row per (peer, service)
antseed network browse --sort price --top 10Inspect a specific peer (full details — providers, services, on-chain stats):
antseed network peer 0e49122e76bd8b9ccb2fe10c0088c41ceb608927(antseed peer <peerId> also exists for a quick profile-only view.)
The pi extension targets a peer per request, so you do not need to pin a
session-wide peer with antseed buyer connection set. The proxy must simply see
network peers:
curl http://localhost:8377/_antseed/peers | jqThe response should include providerServiceApiProtocols metadata for each
service. The extension uses that metadata to register pi models and send the
selected peer in the x-antseed-pin-peer request header.
Open the model selector with Ctrl+L (or /model) and pick any AntSeed route:
antseed/<service-id>@<peer-prefix>[-<peer-name>][-rep<score>]
For example:
antseed/claude-opus-4-5@0e49122e76bd-acme-buyer-rep95
antseed/arcee-trinity-thinking@0e49122e76bd-acme-buyer-rep95
antseed/minimax-m2.7@bbbbbbbbbbbb-rep5
The extension reads AntSeed's peer metadata from /_antseed/peers, discovers
each service/peer route, registers every route as a selectable pi model, and
appends the peer's displayName (slugified) and reputationScore to the model
id so they're visible directly in the pi selector. Routes are ordered by peer
reputation, highest first. On each request, the extension sends the peer pin
header (x-antseed-pin-peer) and lets the AntSeed proxy select the provider
inside that peer.
If you want to expose only a specific subset of the discovered services, set
ANTSEED_MODELS:
ANTSEED_MODELS="minimax-m2.7,arcee-trinity-thinking" piMatching is by service id or by full route id (e.g.
minimax-m2.7@bbbbbbbbbbbb-rep5).
| Env var | Default | Purpose |
|---|---|---|
ANTSEED_BASE_URL |
http://localhost:8377 |
Override the buyer proxy URL. Either the root URL or /v1 URL is accepted; the extension normalizes it per protocol. |
ANTSEED_API_KEY |
(unset) | Only needed if you front the proxy with auth. |
ANTSEED_MODELS |
all protocol-bearing services from /_antseed/peers |
Optional comma-separated allow-list of service IDs or full service@peer-prefix[-name][-rep<score>] route IDs to register. |
- No
antseed/...models in pi — no protocol-bearing services were found in/_antseed/peers. Make sureantseed buyer startis running, peers are discoverable withantseed network browse --services, then run/reload. Connection state: idleinantseed buyer status— runantseed buyer startand keep it running.- Insufficient deposits —
antseed buyer balanceshould be > 0; top up viaantseed payments. - Identity errors — make sure
ANTSEED_IDENTITY_HEXis exported in the shell that runsantseed buyer start. - 5xx from the proxy on a real request — usually means the selected peer
route has gone offline or no longer offers that service. Re-run
antseed network browse --services,/reload, and pick another route.
extensions/antseed.ts registers one provider, antseed, with a tiny custom
streamSimple dispatcher. At /reload, it reads /_antseed/peers, builds a
route map from providerServiceApiProtocols, and registers each
service/peer pair as a pi model. On each request, it sends
x-antseed-pin-peer: <peerId>, chooses the correct pi-ai provider for that
service protocol, and uses the correct base URL shape:
anthropic-messages→ proxy root (http://localhost:8377) because pi appends/v1/messages.openai-responses/openai-chat-completions→ OpenAI base (http://localhost:8377/v1).
AntSeed still handles the selected peer connection, payment channels, provider selection inside that peer, protocol adaptation, and metering on its side.