Kelechi OkekeAbuja, Nigeria
Selected Work

(01)

Sophia Editor

The AI editor behind the world's largest blockchain encyclopedia.

Year
2024 — Now
Role
Frontend Engineer
Stack
Next.js 15 · PlateJS · AI SDK v5 · GraphQL
Sophia Editor

(01) Overview

IQ.wiki is the world's largest blockchain encyclopedia, and Sophia is the AI editor that keeps it growing. I led the frontend redesign of the editorial platform — a 68,000-line Next.js application where AI agents draft, edit and publish encyclopedia articles under human review.

Two tool-calling agents — one that generates new wikis from sources, one that edits existing ones — drive a PlateJS rich-text editor, with every agent run traced end to end and every publish cryptographically signed and committed on-chain.

(02) The Challenge

Encyclopedia articles are long, structured and full of citations — and AI will happily hallucinate all three. The hard part wasn't getting a model to write; it was building an editing surface where humans can trust, verify and reverse everything an agent does, at the pace of hundreds of wikis a week.

(03) Architecture — and why

  • Two agents, twelve specialized tools

    Generating a new wiki and editing an existing one are different jobs. Each agent gets a focused toolset built with dependency-injected factories on a shared tracing base — a deliberate refactor away from the predecessor's single 500-line god-class.

  • Markdown-first, section-based editing

    Articles are chunked into heading-delimited sections, so both the editor and the agent operate on a bounded slice — long documents stay fast and the LLM's working context stays small.

  • Diffs the AI can't hallucinate

    Changes are computed deterministically with a JSON diff; the LLM only translates an already-computed diff into readable descriptions. It never gets to decide what changed.

  • Progress streamed over SSE

    A multi-step agent run streams its tool calls, outputs and publishes to the client as server-sent events with timeout guards — a five-minute run feels alive instead of frozen.

  • Every run fully traced

    Each generation, tool call and LLM span is wrapped in Langfuse tracing behind a swappable interface — when an agent misbehaves, we replay exactly what it did and why.

(04) Engineering Highlights

/01

Publishing that ends on-chain

A publish uploads the wiki to IPFS, signs an EIP-712 typed message and commits it on-chain — Sophia is a cryptographically identified author, with the human operator attributed on every edit.

/02

A citation pipeline, not citation hopes

Agents emit citations inline; a generator extracts, dedupes and normalizes them into stable numbered references — down to a pass that fixes punctuation around citation groups.

/03

Version history reconstructed from chat

Every AI edit carries a content snapshot, so a history drawer rebuilds V1 → Vn with view and restore — undo for agent actions, not just keystrokes.

/04

An editor that fails safe

The rich-text surface sits inside a recovery boundary: malformed pasted content — Word tables, invisible Unicode — shows a 'your draft is untouched' reset instead of a white screen.

/05

Editorial ops, not just editing

Bulk operations run queued tasks across many wikis at once, while automated surfaces flag outdated articles, missing cross-links and ranking gaps — content-ops for a live encyclopedia.

/06

An autonomous trend scout

A third agent ingests RSS feeds, extracts trending topics and decides which deserve a new or updated wiki — the pipeline starts itself, and humans approve the output.

(05) The Flow

  1. 01

    An editor — or the trend agent — picks a topic

  2. 02

    The generating agent drafts from sources, citations inline

  3. 03

    Humans review section by section; deterministic diffs show exactly what changed

  4. 04

    Publish: IPFS upload, EIP-712 signature, on-chain commit

(06) Impact

300%+

increase in weekly wiki output

68k

lines of TypeScript across the platform

12

specialized agent tools behind the editor

Next project

IQ.Wiki