Wikidata Explorer
Evidence-first exploration for Wikidata graphs.
A Next.js 16 application for searching Wikidata, inspecting entity evidence, and visualizing the relationships around any item. It turns labels, statements, qualifiers, references, ranks, and linked records into an inspectable, shareable research picture, and routes reviewers into a seeded proof path that shows graph context, evidence depth, and safe exports in one short review. Optional AG2 research agents sit behind a deliberate, feature-flagged AI boundary. It also runs as a named client of Meta Museum's Linked Art change feed, a separate system in this portfolio, with a durable callback ledger that survives a restart.
Make the trustworthy graph understandable, fast
Wikidata is powerful but dense. Generic search flattens its evidence into plain results. Wikidata Explorer answers a focused question instead: how quickly can someone start from one entity and understand the trustworthy graph around it?
A reviewer can land directly on a seeded Q42 proof path, Douglas Adams, and immediately see the relationship graph, the evidence behind each edge, a side-by-side comparison against another entity, and safe, shareable exports. Statements carry their ranks, references, qualifiers, and source hints rather than being collapsed into a summary, so the research picture stays auditable. The public demo ships reliably on Vercel with AI disabled by default, and the AG2 agent runtime is an opt-in layer that can be enabled locally or hosted as a separate service.
Conforming to a spec I could not reach into
Publishing a standards feed is the easy half. The harder half is being a well-behaved client of one, and saying so out loud when the evidence is not there yet.
Wikidata Explorer harvests Meta Museum's Linked Art and IIIF Change Discovery feed as a distinct named client, identifying itself in the User-Agent and a dedicated consumer-id header. Both systems are mine, so this is conformance rather than outside adoption. What it buys is that neither side could shortcut the other: the contract is a published spec, not a private arrangement. The consumer core is network-free and unit-tested: header building, QID extraction, UTC timestamp validation, per-activity reconciliation, and a walk-back plan all run against fixtures. A live harvest against the production feed passes 53 of 53 activities across 47 distinct QIDs, with every timestamp in UTC and every record carrying its equivalence hooks.
An optional public callback receives Create, Update, and Delete notifications, token-gated and failing closed until it is configured. Its observed-event ledger is honest by construction: Update and Delete stay at zero until one is genuinely seen, and the ledger persists to durable storage with a graceful per-instance fallback, so the route reports its own storage mode rather than implying a durability it does not have.
A public app with an optional AI boundary
A reliable Next.js front end backed by live Wikimedia data, with feature-flagged server routes that keep the optional AG2 runtime, and its credentials, off the public client.
Next.js 16 explorer
An App Router product surface built on React 19, TypeScript, Tailwind CSS, and Radix UI primitives. The search workbench drives a clickable relationship graph, evidence rows, comparison flows, and workspace slots, with shareable state encoded in the URL.
Live Wikimedia APIs
The app fetches and normalizes records from the Wikidata Action API, the Wikibase REST API, and the Wikimedia Commons API. It renders the canonical facts rather than owning them, keeping the research picture grounded in upstream data.
Feature-flagged server routes
AG2-backed endpoints for chat, grounded entity summaries, and specialist workflows live behind explicit flags and fail closed in public mode. They run server-side, so provider keys and bearer tokens never reach the browser.
AG2 service in a container
The AG2 / AutoGen agents run through either a local conda env or a token-protected FastAPI container. Packaged with a Docker /health check, it runs as a non-root user and can be hosted separately from the Vercel app.
Search, graph, evidence, compare
Everything a reviewer needs to assemble a trail of entities, statements, labels, references, and linked records into a trustworthy picture.
π Search
Find entities by keyword or by direct entity/property ID such as Q42 or P31, then follow related items without restarting the flow.
π§Ύ Evidence rows
Inspect statement ranks, referenced/unreferenced badges, statement IDs, qualifiers, references, and source hints in expandable evidence rows.
πΈοΈ Relationship graph
A clickable graph with URL-backed filters, depth controls, grouped-by-property and timeline layouts, node previews, pinned comparison, and selected-edge detail.
βοΈ Compare entities
Compare two or three entities without AI by shared properties, distinctive statements, property matrices, and overlapping linked entities.
π Shareable URLs
Launch straight into a query or a shared comparison such as /search?q=Q42&tab=compare&compare=Q80, preserving context for reviewers.
π€ Safe exports
Export evidence-grounded graph paths, review findings, and portable workspace snapshots as Markdown/JSON, plus safe QuickStatements draft comments.
π€ AG2 agents
When enabled, specialist agents handle research, graph analysis, next-entity suggestions, citation verification, comparison, and Markdown reports.
π§ββοΈ Review queue
Review entity data-quality findings with persisted browser-local task status, source-link hints, and a Markdown project brief for handoff.
πΎ Workspaces
Save browser-local or token-protected project workspace slots with curation-task and agent-history summaries, or export and restore portable snapshots.
π Change feed client
Harvest Meta Museum's Linked Art activity stream under a declared consumer id, with cursor reconciliation, a content-addressed proof log, and a durable callback ledger.
Grounded, tested, and safe by default
- Deep evidence modeling. Statements, references, qualifiers, ranks, source hints, media, and language coverage are normalized into inspectable UI instead of being flattened into generic search results, the research picture stays auditable.
- Deliberate AI boundary. AG2 agents are feature-flagged and server-side, so the public demo stays reliable while the optional Python/container runtime can be enabled for richer workflows. Public AI routes fail closed with a tested disabled response.
- Citation-style grounding. A route-level validator requires AG2 responses to include grounding references and the supplied Wikidata IDs before AI-enabled routes return results, keeping agent output tied to real evidence.
- Layered verification. npm run verify composes lint, unit tests, and a production build, backed by route smoke tests, API contracts, fixture-backed browser e2e checks, performance budgets, and visual QA, all wired into GitHub Actions CI.
- Secure optional service. The AG2 FastAPI container runs as a non-root user, disables docs by default, declares a /health check, uses a tight build-context allowlist, and rejects /run requests unless a 32+ character bearer token matches.
- Privacy-preserving observability. Sanitized API-failure classification and an optional monitor receiver never expose prompts, raw payloads, provider keys, bearer tokens, or local store paths.
- Proof that lives outside the laptop. A production-proof workflow runs the public proof path against the live domain and uploads its log as a release artifact. Optional hosted ops and AG2 proof runs write their own logs, then a single evidence summary validates the required pass lines and scans for secret-shaped leaks before upload, so a release claim rests on a downloadable artifact rather than a memory of a green run.
- Honest ledgers. The partner callback ledger reports zero observed Update and Delete events until one genuinely arrives, and the route reports whether its storage is durable or per-instance. An unproven number stays unproven rather than being rounded up.
The public demo ships with its most impressive feature switched off
The AG2 research agents are the best thing in this project, and every anonymous visitor gets them disabled by default. That is the decision, not an oversight.
An AI-enabled public demo carries provider credentials and an unmetered spend path. A portfolio demo that falls over under load, or that a stranger can drain, proves the opposite of what it was built to prove. So the boundary is a product decision as much as a technical one: the public surface should show judgment, not model access.
The off state is engineered rather than absent. Public AI routes fail closed with tested disabled responses, provider keys and bearer tokens stay server-side and never reach the browser, and the optional AG2 runtime lives in a separate token-protected container that can be enabled locally or hosted independently. Turning it off is a behaviour with tests, not a missing feature.
The partner ledger follows the same rule. Its Create counter reflects a live harvest that reconciled fifty-three of fifty-three activities across forty-seven entities, and its Update and Delete counters sit at zero, because no real Update or Delete has arrived yet. No synthetic counts are claimed, and the route reports whether its own storage is durable or per-instance rather than implying a guarantee it does not have.
A ledger that fills itself with plausible numbers is worse than one that admits it has seen nothing. The same goes for a demo that looks impressive right up until a reviewer opens it.
Live, grounded, and inspectable
Wikidata Explorer runs in production at wikidataexplorer.com. It showcases linked-data modeling, evidence-first product design, a feature-flagged AI boundary with citation-style grounding, verified two-way interop over a published Linked Art spec, and a layered verification story spanning unit, contract, browser, performance, and visual QA. It is a research workbench that keeps every claim tied to its source, including the claims it makes about its own readiness.