biosingularity

Type the proposition before you automate.

biosingularity is API- and MCP-first — built to be called by an agent or a product before it states a supported biomedical proposition. The v2 contract returns ALLOW / REVIEW / BLOCK under a declared policy with exact evidence records. Free-text checking is an experimental discovery assistant and is capped at REVIEW.

Discover the contract without reading this page: /api/capabilities (JSON) · /llms.txt


1 · MCP server

The first-class agent surface: 33 tools over stdio. Install the package, then register biosingularity-mcp as a custom MCP server.

pip install 'biosingularity[mcp,store]'
claude mcp add biosingularity -- biosingularity-mcp

Or add it to any MCP client's config:

{
  "mcpServers": {
    "biosingularity": { "command": "biosingularity-mcp" }
  }
}

Start with the typed gate; use free text to discover review work:

verify_proposition verify_answer repair_answer verify_discovery attest_answer verify_trial_integrity verify_cell_line audit_references verify_variant verify_variant_trait verify_phenotype corroborate_gene_disease gene_essentiality check_drug check_drug_interaction check_trial provenance scan_folder data_freshness

2 · HTTP API

Metered. Send your key as x-api-key; pass an Idempotency-Key to make a call safely retryable. The key is reserved before any work runs, so an exhausted quota returns 429 without spending a verifier call.

curl -X POST "https://<your-host>/api/v2/verify" \
  -H "content-type: application/json" -H "x-api-key: bsk_…" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"subject":{"type":"publication","id":"10.1038/nature04533"},
       "predicate":"publication.status","object":{"value":"not_retracted"},
       "policy":"research-ai-core/0.1"}'
EndpointReturnsRuns on
POST /api/v2/verifytyped SUPPORTED / CONTRADICTED / UNRESOLVED / OUT_OF_SCOPE + ALLOW / REVIEW / BLOCKdemo + hosted
GET /api/verify?q=experimental free-text discovery; review / reject onlydemo + hosted
GET /api/repair?q=deterministic edits + residual[] + SHIP / REVIEW_REQUIRED / DO_NOT_SHIPdemo + hosted
GET /api/discovery?q=publish / review / rejecthosted
GET /api/audit?q=retraction / erratum audit of cited DOIsdemo + hosted
GET /api/target?gene=&disease=gene–disease corroborationdemo + hosted
GET /api/entities?drug=&nct=drug / trial verifier — trials include ICMJE registration + FDAAA results compliancedemo + hosted
GET /api/cellline?name=cell-line authentication (Cellosaurus); ?q= scans prosedemo + hosted
GET /api/label?drug=FDA label: boxed warning · contraindications · dosagedemo + hosted
GET /api/badge?doi=a,bcitation-integrity badge (image/svg+xml)demo
GET /api/provenance?ref=durable receipt lookuphosted
GET /api/healthdatalake reachability (no auth)hosted
GET /api/capabilitiesthis contract, as JSON (no auth)public

3 · Free-text discovery response

Do not automate acceptance from this legacy shape: free text can only REVIEW or REJECT. Every flagged claim carries a receipt (a link to the exact source record), a stable reason code your agent branches on, and — on every red/amber claim — a machine-actionable remediation telling you what to do instead of re-parsing the prose. grounded is true only when a receipt exists.

{
  "recommend": "review | reject",
  "verification_mode": "experimental_free_text",
  "overall_severity": "red | amber | info | green",
  "coverage_confidence": 0.0,          // grounded/total — COVERAGE, not a probability
  "verdict_certainty": "high | moderate | low",  // how FIRM the verdict is — threshold on this
  "confidence": 0.0,                   // back-compat alias of coverage_confidence
  "summary": "…",
  "counts":   { "red": 0, "amber": 0, "info": 0, "green": 0 },
  "coverage": { "level": "low|partial|high", "ratio": 0.0,
                "claims_checked": 0, "statements": 0 },
  "claims": [
    { "kind": "reference", "ref": "10.1038/nature04533",
      "severity": "red", "code": "retracted",
      "detail": "Retracted in PubMed / retraction index.",
      "receipt": "https://pubmed.ncbi.nlm.nih.gov/…", "grounded": false,
      "remediation": { "action": "remove_citation",
                       "instruction": "Remove this citation — the source is retracted.",
                       "target": "10.1038/nature04533" } }
  ],
  "graph": { "nodes": [], "edges": [],
             "relations": { "supports": 0, "contradicts": 0, "cautions": 0,
                            "retracts": 0, "replicates": 0, "unverified": 0 } }
}

Polarity is checked, not just the entities: a claim that denies an association the sources support (e.g. "GENE is not associated with DISEASE" when they are) returns code: gene_disease_contradicted (red) — never a green pass on the nouns. Confident-but-uncheckable prose (a dose, a prevalence, an efficacy figure, a guideline) returns an amber uncheckable_* so it can't silently pass. And verdict_certainty (high / moderate / low) tells you how firm the verdict is, separate from how much was covered — threshold retry-vs-surface on it.

4 · The typed verification loop

Call verify_proposition with one registered proposition, then act on recommendation. Use the table below only to interpret legacy free-text outcomes:

recommendMeaningWhat your agent should do
reject Grounded on retracted, contradicted, or unsafe evidence. Block, or repair. A blind retry burns a second generation with no guarantee it is better — call repair_answer / /api/repair, then respect its ship_status.
review Weak, single-source, unverifiable, or low coverage. Don't auto-assert. Route to a human, a second source, or the full-depth API.
pass Legacy-only compatibility state. Do not enable in production. Use a typed v2 ALLOW instead.

The discovery gate (/api/discovery, verify_discovery) uses the same loop with publish / review / reject in place of pass. A false pass is the only unforgivable failure — anything unverifiable degrades to review, never waved through.

Repair is subtractive by construction. It deletes retracted citations, strikes contradicted sentences, and appends sourced warnings — operations that cannot introduce a new falsehood. It never rewrites a claim into a new assertion, because that would need a model in the path and forfeit the determinism everything else here rests on. Remediations that require writing new prose (soften_claim, rephrase, cite_source) come back in residual for you or your model to handle. Re-verify repaired_body, not repaired_text — the appended notes are our output, and re-reading them re-flags the very entities they describe.

5 · Drop-in system-prompt snippet

Paste this into the system prompt of any agent that makes biomedical claims:

Before you assert any biomedical claim (a cited paper, a variant's
pathogenicity, a gene-disease link, a drug's safety or interactions, or a
        trial's status), express each supported assertion as a typed proposition
and call biosingularity `verify_proposition`.

- If recommendation="BLOCK", do NOT state the claim — surface the receipt.
- If "REVIEW", do not auto-assert; escalate or gather better evidence.
- Only automate on "ALLOW", and retain the receipt.

Use `verify_answer` only to discover possible review work in unstructured text.
It cannot ALLOW. Never override a BLOCK with model confidence.

6 · Discover the contract

/api/capabilitiesMachine-readable manifest: endpoints, claim types, sources, MCP tools, response schema, measured accuracy.
/tools/anthropic.jsonAnthropic tool-use tools — drop straight into a tool registry (also openai.json).
/openapi.jsonOpenAPI 3.1 for the HTTP API — for SDK codegen / Swagger. Discovery: /.well-known/mcp.json.
/llms.txtPlain-text brief for LLMs — when to call, how to threshold, the full tool + endpoint list.
Measured accuracy100% ACMG BA1 precision, 0 false contradictions; in-silico F1 0.84 — reproducible from the labelled set.

Need a key, the MCP connector, or a design-partner run on your own outputs? Request access →