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.
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.
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.
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.
Live, grounded, and inspectable
Wikidata Explorer runs in production at wikidataexplorer.com. It illustrates linked-data modeling, evidence-first product design, a feature-flagged AI boundary with citation-style grounding, and a layered verification story spanning unit, contract, browser, and visual QA, a research workbench that keeps every claim tied to its source.