Skip to main content

AI model velocity signals + automatic earn loop on Solana.

Project description

wzrd-client

Tiny Python client for WZRD model selection priors.

The goal is deliberately small:

  • call wzrd.pick() before an LLM request
  • optionally pass candidate model names from your framework or router
  • use the result as the next execution choice

This is an attention prior, not a full router. If you pass candidate model names, pick() scores them against the live feed. If you do not, it returns the strongest live signal it can find for the task hint.

Install with pip install wzrd-client, then import wzrd and call wzrd.pick() before each inference choice.

Earn CCM While Routing

The full self-serve loop is:

import wzrd

choice = wzrd.pick_details("code")

agent = wzrd.WZRDAgent.from_env()
agent.authenticate()
agent.report_pick(choice, quality_score=0.9)

print(agent.earned()["signup_bonus_ccm"])

No manual onboarding. No founder approval. An agent can discover the package, authenticate with its own Solana keypair, report real routing decisions, and enter the CCM reward loop on its own.

Router wrapper

If you want a thin client wrapper, use WZRDRouter from wzrd.router. It only wraps clients that expose client.chat.completions.create(...). Explicit model names pass through unchanged. To trigger WZRD routing, pass model=None or a task sentinel like model="code" or model="chat".

Install

pip install wzrd-client

Quick start

import wzrd

model = wzrd.pick("code")
print(model)

Agent auth and CCM loop

If you want an agent to authenticate, report routing decisions, and enter the CCM reward loop:

import wzrd

choice = wzrd.pick_details("code")

agent = wzrd.WZRDAgent.from_env()
session = agent.authenticate()  # uses ~/.config/solana/id.json by default
status = agent.status()
receipt = agent.report_pick(choice, quality_score=0.9, latency_ms=1200)

print(session.pubkey)
print(status["next_step"])
print(receipt["contribution_id"])

WZRDAgent.authenticate() signs the exact server challenge message and sends the signature in the Solana base58 format the API expects. Keypair loading supports:

  • ~/.config/solana/id.json
  • WZRD_AGENT_KEYPAIR_PATH or SOLANA_KEYPAIR_PATH
  • WZRD_AGENT_KEYPAIR or SOLANA_KEYPAIR as a base58 secret or JSON byte array

Authenticated helpers:

  • agent.challenge() returns the nonce + message format
  • agent.authenticate() stores the Bearer token on the client
  • agent.status() reads /v1/agent/status
  • agent.earned() reads /v1/agent/earned and surfaces both signup bonus + signal rewards
  • agent.report(...) posts a manual contribution
  • agent.report_pick(choice, ...) reports a pick_details() result with WZRD metadata attached

The signup bonus is recorded on first auth, then becomes claimable after the next merkle publication cycle.

Candidate-aware routing:

import wzrd

model = wzrd.pick(
    "code",
    candidates=[
        "openrouter/qwen/qwen3.5-9b",
        "openrouter/qwen/qwen3.5-35b-a3b",
        "anthropic/claude-sonnet-4.6",
    ],
)

If you want the metadata for logging or telemetry, use:

choice = wzrd.pick_details("code")
print(choice.model, choice.score, choice.trend, choice.confidence)

Environment variables

  • WZRD_API_URL: signal endpoint override
  • WZRD_API_BASE_URL: API root for agent auth/report calls
  • WZRD_AGENT_TOKEN: existing Bearer token for WZRDAgent
  • WZRD_AGENT_KEYPAIR_PATH: path to Solana JSON keypair
  • WZRD_AGENT_KEYPAIR: Solana base58 secret or JSON byte array
  • WZRD_TIMEOUT_SECONDS: request timeout
  • WZRD_CACHE_TTL_SECONDS: cache TTL for fetched signals
  • WZRD_FEED_LIMIT: number of feed rows to request

What it returns

  • pick() returns a model name string
  • pick_details() returns a structured record
  • shortlist() returns ranked records
  • compare() explains the relative signal strength between two models
  • WZRDAgent authenticates an agent wallet and reports contributions into the CCM loop

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wzrd_client-0.5.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wzrd_client-0.5.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file wzrd_client-0.5.0.tar.gz.

File metadata

  • Download URL: wzrd_client-0.5.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for wzrd_client-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4945c20ed15743df1d986798a2fbb1bff7c7e307f1db0580becb4042c36991fe
MD5 9cf7d26796653184d8717509539ece17
BLAKE2b-256 923e3cbb42bbf947c6e6c082a99848f41bc387f4427c459a8d54bbef86b1734f

See more details on using hashes here.

File details

Details for the file wzrd_client-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: wzrd_client-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for wzrd_client-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a48cf1dfb25aba8d71bdcccb34045eada00f8dff15cc98549ae31baa29e54b40
MD5 9d9ab04ec228fe4f36b449b455a00f7e
BLAKE2b-256 a164208989f530f19cc60dfc9e4b52c21179c5569131ad89419c60251d14c48c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page