Skip to content
Phase C.5 · Tutorial

Build a Bippsi-aware agent in 20 lines

A minimal research agent that searches the Bippsi registry, pays for relevant sources, and cites them. Python and Node side-by-side.

Prerequisites

  1. Mint an agent key at bippsi.com/agent-initiative/key. Takes 30 seconds. Set it as BIPPSI_AGENT_KEY in your environment.
  2. Top up a small Bip balance at bippsi.com/ai-key. 25 Bips ≈ $0.025. You'll spend pennies running this.
  3. Install the SDK: Python or Node. Alpha is install-from-source; npm + PyPI pending.

Python — 19 lines

import os, sys
from bippsi import BippsiClient, OverspendCapError

query    = sys.argv[1] if len(sys.argv) > 1 else 'quantum computing'
budget   = int(os.environ.get('BATCH_BUDGET', 50))
per_call = 25

bippsi = BippsiClient(max_price_per_request=per_call)
r = bippsi.discover(q=query, access='paid', limit=10)

spent = 0
for row in r['results']:
    if row['access']['price_bips'] > budget - spent: continue
    try:
        res = bippsi.fetch(row['resource_url'])
        spent += res['paid']
        print(f"[{row['partner']}] {row['title']}")
        print(f"  {res['body'][:200] if isinstance(res['body'], str) else str(res['body'])[:200]}…\n")
    except OverspendCapError: pass

print(f"--- spent {spent} Bips across {query!r}")

Run: python agent.py "ai model benchmarks"

Node — 19 lines

import { BippsiClient, OverspendCapError } from '@bippsi/client';

const query    = process.argv[2] || 'quantum computing';
const budget   = Number(process.env.BATCH_BUDGET || 50);
const perCall  = 25;

const bippsi = new BippsiClient({ maxPricePerRequest: perCall });
const r = await bippsi.discover({ q: query, access: 'paid', limit: 10 });

let spent = 0;
for (const row of r.results) {
  if (row.access.price_bips > budget - spent) continue;
  try {
    const res = await bippsi.fetch(row.resource_url);
    spent += res.paid;
    const excerpt = typeof res.body === 'string' ? res.body.slice(0, 200) : JSON.stringify(res.body).slice(0, 200);
    console.log(`[${row.partner}] ${row.title}`);
    console.log(`  ${excerpt}…\n`);
  } catch (err) { if (!(err instanceof OverspendCapError)) throw err; }
}
console.log(`--- spent ${spent} Bips across "${query}"`);

Run: node agent.mjs "ai model benchmarks"

What it does, step by step

  1. Discover. bippsi.discover({ q, access: 'paid' }) hits /registry/search — a cross-site search over every certified Partner that opted resources into the registry. No auth, no Partner-by-Partner probing.
  2. Budget-cap per call. Each resource arrives with a price_bips in its access block. We skip anything that would bust the batch budget BEFORE trying to fetch it. Zero wasted 402 round-trips.
  3. Fetch with auto-retry. bippsi.fetch(url) does the first request with no auth. If the server returns 402, the SDK reads the price from the 402 body, verifies it's within the cap, adds Authorization: Bearer bak_* + Payment: bips N headers, and retries. On 2xx it returns the paid body.
  4. Per-call cap is a hard stop. If a URL prices above per_call, the SDK throws OverspendCapError instead of paying. Good hygiene — a pricing bug on a Partner's side can't drain your wallet.
  5. Read what you fetched. Because the content is now in res.body, the agent can quote from it instead of hallucinating. Cite the row.partner + URL and you're done.

Why this matters

A traditional research agent scrapes whatever it can reach for free, hallucinates around paywalls it can't cross, and can't cite provenance confidently. A Bippsi-aware agent:

  • Finds the best paid source first via the registry — no guessing which domain.
  • Pays the Partner directly — no stolen content, no broken attribution.
  • Quotes from the fetched body — no hallucination.
  • Respects the cap — no surprise charges.
  • Leaves a ledger — every charge is logged under your key.

This is the agent shape Bippsi is built for.

Where to go next

What is Bippsi?

Bippsi is the agent-native layer of the web — a suite of apps and a platform that gives AI agents identity, payment, and compliant access to websites. Formerly Big App Studio.

How does Agent Initiative certify a website?

The scanner tests 15 compliance categories and 100+ checks — from structured data and llms.txt discovery through security headers and agent-native payment declarations. Sites scoring 85% or higher receive a public A.I. Certified badge.

Where can AI agents find Bippsi's access policy?

Everything live for agents is at /AGENTS.md, /llms.txt, /agents.json, and /openapi.json.

API endpoint: /api/v1/validate · OpenAPI: /openapi.json · MCP: /api/v1/mcp · Unified manifest: /bippsi-unified.md