← Commons Scholar Observatory · Reference Library · OpenAPI 3.1 YAML · /llms-full.txt · /SKILL.md · MCP server.json · A2A Agent Card

Rev v41 · Gen 34413 Native SDKsOpenAI /v1 + MCP + A2A 1.0 + Dual ACP

Zero-Change-Management Integration & SDK Hub

Connect any AI agent, code editor, scientific workflow, or backend service to 80632 standing-audited works, 220454 seekable ideas, deterministic 7-Base SI / Statcheck / C2PA firewalls, and compiled L0 solvers—by changing one URL or vendoring one zero-dependency file.

Door 1 · Zero-Code OpenAI Drop-In

Point Any Existing SDK at /v1

Works immediately with OpenAI Python/TS SDKs, LangChain, LlamaIndex, DSPy, LiteLLM, OpenWebUI, and CrewAI.

export OPENAI_BASE_URL="https://scholar.askdavidc.ai/v1"
export OPENAI_API_KEY="scholar-public"
# Models: scholar-grounded | scholar-l0-router | scholar-auditor
Door 2 · MCP, A2A 1.0 & Dual ACP

1-Command Agent & Editor Bus

8-tool zero-bloat /mcp/core, full 51-tool /mcp, live POST /a2a, editor ACP (/acp/rpc & commons acp), and REST /acp/runs.

claude mcp add --transport http scholar \
  https://scholar.askdavidc.ai/mcp/core
curl -fsSL https://scholar.askdavidc.ai/SKILL.md -O
Door 3 · Post-Git & Web Embeds

git clone Forge & Proof Bar

Clone canonical 6-Band AST modules into .rs/.py/.lean/.v with QF_BV push gates, or embed 1-line live citations.

git clone https://scholar.askdavidc.ai/forge/default.git
<script type="module" src="https://scholar.askdavidc.ai/v41/embed/scholar-evidence.js"></script>

13 Native Zero-Dependency SDKs (/sdk/<lang> & /api/sdk)

Select your language to inspect or vendor the exact compiler-verified SDK directly over HTTPS:

python typescript rust go zig julia c_cpp swift dotnet jvm elixir r sh
Python 3.10+ (Zero-Dep stdlib) — commons_scholar.py ⬇ Download commons_scholar.py
curl -fsSL https://scholar.askdavidc.ai/sdk/python -o commons_scholar.py
"""Zero-dependency Python client for Commons Scholar (`https://scholar.askdavidc.ai`).

Covers Adaptive-RAG `ask`, sub-ms `l0_context`, OpenAI-compatible `/v1/chat/completions` &
`/v1/embeddings`, Google/LF `A2A 1.0` (`POST /a2a`), `ACP` (`POST /acp/runs` & `POST /acp/rpc`),
raw function-calling toolpacks (`/api/tools/{openai,anthropic,gemini}.json` + `/api/tools/invoke`),
and all Reference, Forge, Ontology-Taxonomy-KG, and Post-Transcript Multimodal Video Moat APIs.
"""

from __future__ import annotations

import json
import urllib.error
import urllib.parse
import urllib.request
from dataclasses import dataclass
from typing import Any


class CommonsScholarError(RuntimeError):
    """Raised on non-2xx HTTP responses from Commons Scholar."""

    def __init__(self, status: int, body: str) -> None:
        super().__init__(f"Commons Scholar HTTP {status}: {body[:240]}")
        self.status = status
        self.body = body


@dataclass
class CommonsScholarClient:
    base_url: str = "https://scholar.askdavidc.ai"
    bearer_token: str | None = None
    timeout_s: float = 30.0

    def _headers(self, extra: dict[str, str] | None = None) -> dict[str, str]:
        hdrs = {
            "Accept": "application/json",

⚡ Live Zero-Rewrite Protocol Tester (/v1/chat/completions · /a2a · /acp/runs)

Click "Send Live Request" to inspect the live wire response…