Inspiration
AI is the new search. ChatGPT, Perplexity, Gemini, Claude, Google AI Overviews — they now decide who gets cited when consumers ask for product recommendations. Yet every existing GEO/AEO tool today only monitors how AI describes a brand and recommends that the team write a blog post. The result is indirect, slow, unmeasurable — and brands have no idea whether anything actually moved.
We wanted to ship the first autonomous agent that closes the loop: not monitor and suggest, but monitor, act, measure, and monetize. The shift from clicks-to-citations is the biggest reorganization of the discovery layer in 20 years; brands need a tool that operates at the speed AI engines re-crawl, not at the speed humans write blog posts.
What it does
GhostWriter is a single-trigger autonomous GEO agent. One click and it:
- Monitors how AI engines describe a brand across user-supplied queries (via Nimble SERP)
- Detects citation gaps where the brand is absent or out-cited (gpt-4o reasoning)
- Publishes grounded markdown citeables to cited.md (via Senso
content-engine/publish) - Expands coverage — proposes 5 strategic queries the brand should also rank for and auto-publishes citeables for them
- Measures the narrative-control lift over time (ClickHouse Cloud time series)
- Verifies the fix landed with 4 parallel signals (article live, brand in article, brand in fresh SERP, URL indexed)
- Monetizes every read via an x402 paywall — $0.01 USDC lands in the brand's wallet for every agent query
Every step is wrapped in a Datadog LLM Observability span. The full loop runs end-to-end in ~10 seconds.
How we built it
Stack: Next.js 16 App Router on Vercel, TypeScript end-to-end, Tailwind v4, recharts.
Agent loop (lib/agent/loop.ts): a single orchestrator wrapped in a top-level Datadog workflow span. Each phase is a child tool or llm span recorded both via llmobs.wrap() (real Datadog tracing) and synchronously into a trace[] returned to the UI for the live "proof panel". The loop:
ensureTable → monitor(5x in parallel) → detectGaps → for each gap: generateGroundTruth (gpt-4o) → publish (Senso) → simulateAIResponse (gpt-4o-mini ×2) → insertRows (ClickHouse)
Sponsor integrations are each a swappable module under lib/integrations/, so a broken one degrades gracefully without killing the run.
x402 paywall is wired with withX402(handler, recipientAddress, { price: '$0.01', network: 'base-sepolia' }). The buyer side is simulated for the demo flow — in production an agent embedding x402-fetch would auto-sign and retry.
The deck is reveal.js with a custom GhostWriter theme (animated gradient brand mark, per-section tone palette, live status pulse).
Challenges we ran into
- Senso's publish endpoint wasn't in the public docs. We discovered it by reading the
@senso-ai/clisource —POST /org/content-engine/publishwith ageo_question_idlookup-or-created from/org/prompts. Once found, we wired lazy prompt caching insenso.ts. - Coinbase Wallet defaults to a Smart Wallet (passkey-based, no exportable private key) — incompatible with x402's signer. We generated a fresh testnet-only EOA via
viem'sgeneratePrivateKey()and funded it from the Coinbase + Circle faucets. - Page cold-start was 31 seconds because we server-fetched ClickHouse at render time. Moved to a static page with client-side hydration; first paint dropped to <500ms.
- Nimble SERPs vary between calls, so gap counts weren't stable across runs. Widened the brand-match window from top-5 to top-10 and rephrased the verification panel to surface 4 independent signals (article live, brand in article, brand in SERP, URL indexed) instead of one binary "indexed yes/no".
- pnpm 11 strict build-script policy kept blocking
dd-trace's native module postinstalls. Resolved by listing them explicitly underallowBuilds: falseinpnpm-workspace.yaml.
Accomplishments we're proud of
- 6 sponsor tools wired end-to-end in a single autonomous loop (Nimble, Senso, ClickHouse, Datadog, OpenAI, x402).
- First-class verification UX: 4 parallel signals per citeable, two of which are always green immediately, with the SERP-crawl signal honestly labeled "expected in 24-48h".
- Real x402 paywall returning a real HTTP 402 with the full v1 protocol payload on Base Sepolia — not a mock.
- AI engine impact preview: gpt-4o roleplays ChatGPT before vs after the citeable hits the source list. The citation literally flips on screen.
What we learned
The agentic web needs a new substrate — agent-readable, brand-verified, machine-monetizable. cited.md + x402 + Senso together form the rough shape of that substrate. The interesting product surface isn't "another GEO dashboard"; it's the agent that operates that substrate on the brand's behalf.
Also: when sponsor docs are incomplete, read the CLI source. Faster than waiting on support.
What's next for GhostWriter
- Scheduled recurring runs (cron-style) to catch new gaps and re-publish stale citeables
- Real ChatGPT / Perplexity API integration for actual (non-simulated) verification
- Multi-brand orgs + role permissions
- Sentiment tracking on citations (a citation isn't always positive)
- Open the x402 endpoint as a marketplace for partner agents — every paid read is both revenue and a credibility
Log in or sign up for Devpost to join the conversation.