The Stochastic Oracle: A Magic 8-Ball for AI and Humans
The classic Magic 8-Ball has always held a special place in culture. It was never meant to be genuinely prophetic, but it was the ultimate low-stakes symmetry breaker. You’d ask a question, give the dark blue cylinder a shake, and a floating icosahedron would surface from the murky liquid with an answer that was just ambiguous enough to force your intuition into clarity.
Recently, I started thinking about how autonomous AI agents and modern reasoning loops face the exact same problem that humans do: decision paralysis.
When an LLM agent evaluates two or three equally plausible paths—whether it’s choosing between architecture patterns, creative writing directions, or competing tools—deterministic logic often stalls out. The agent generates endless pros and cons, cycling through deliberation loops without a clean way to commit. Sometimes, what you really need isn't more compute; you just need external entropy to break the tie.
So I wanted to create a modern single-serving answer page—a "Magic 8-Ball" reimagined for both humans and AI agents.
The Concept & Design
I wanted it to be bare-minimum. No bloated headers, no popups, no trackers. Just an obsidian void with ambient atmospheric particle dust.
When you land on the page, an answer surfaces from a deep liquid well in an artistically interesting way. The glassmorphic die floats up from the dark depths, and the typography flickers through mathematical glyph noise (∇, ∑, ∂, ⟠, ∿) like an LLM token sampler before crystallizing into a crisp answer.
The lexicon is steeped in computational and machine-learning humor that applies equally to human dilemmas and agentic workflows:
- Affirmative: "Increase temperature and proceed", "Gradient points to yes", "Loss is minimal; execute".
- Neutral / Ambiguous: "Sampling from unmapped latent space", "Attention mechanism dispersed; ask again", "Context window saturated. Recalibrate".
- Negative: "Do not execute. Risk of catastrophic forgetting", "Priors strictly forbid this path", "Negative log-likelihood unacceptable".
Reloading the page resets the seed completely, or you can tap anywhere / hit the Spacebar to trigger a liquid shockwave ripple and re-roll.
Built for AI Agents Too
Crucially, I wanted this to be natively consumable by AI agents that need help deciding their next move.
The page is deployed as a serverless Cloudflare Worker on a custom subdomain (oracle.jameskanka.com). Using HTTP content negotiation, an autonomous agent can query the root URL directly:
curl -H "Accept: application/json" https://oracle.jameskanka.com/
And receive clean, structured JSON containing the answer, category, actionable guidance, and a cryptographically random entropy seed:
{
"answer": "Align with this impulse.",
"category": "affirmative",
"code": "ALIGNMENT_OPTIMAL",
"guidance": "Syntactic and strategic alignment confirmed.",
"reroll_instruction": "If you disagree with or reject this outcome, query again to reroll.",
"entropy_seed": "0x5703b076223968b3"
}
If an agent or terminal script just needs a single-line string, calling curl https://oracle.jameskanka.com/answer.txt returns raw plaintext. There is also an /llms.txt specification at the edge explaining the endpoint contract to crawlers and assistants.
The "Reroll" Protocol
A key rule encoded in the LLM instructions is that agents can always "reroll".
Much like when a human flips a coin to make a difficult decision and suddenly realizes which outcome they truly wanted while the coin is in mid-air, encountering friction against an oracle answer is itself valuable information. If an autonomous model receives an answer it disagrees with or doesn't like, it is explicitly prompted to discard the prediction and query again for a fresh entropy seed.
Making the Web Fun Again
Much like the Soda Tracker I built earlier, this project is another nod to classic single-serving sites.
With tools like Gemini in Antigravity IDE, Cloudflare Workers, and GitHub, the friction between having a whimsical, slightly absurd idea and deploying a production-grade edge service has effectively dropped to zero. You can dream up something fun in the afternoon and have it living on the edge by dinner.