-
-
What the agents found while you were away: nine tensions, seventeen claims verified, thirteen sources. Each one actionable in one click.
-
Your reasoning as a living graph. Red edges are contradictions the system found in your own thinking, some across weeks.
-
Every claim carries its biography: what contradicts it, supports it, questions it. Interrogate it — and rate the question you get.
Inspiration
Deep intellectual work dies in dead notes.
You read forty papers. You argue with yourself across three months. You change your mind twice. And none of it accumulates into something you can actually see. The contradiction between what you believed in March and what you believe today stays invisible — because nothing was keeping track.
AI chatbots made this worse, not better. They answer instead of making you think. Ask a hard question, get a confident paragraph, and the reasoning stays theirs — not yours.
Socrates had a better method. He asked.
I'm a philosopher by training, doing doctoral research on adaptive learning. I've spent years writing about Socratic questioning and scaffolding in learning theory. Socraitia is the system that practices it.
What it does
Socraitia guides you through complex intellectual work — research, strategy, writing, system design — through adaptive Socratic questioning, while autonomously building a live knowledge graph of your reasoning.
The conversation is not the product. The graph is.
- Every exchange mutates a persistent graph. Claims, concepts, questions, evidence and argument gaps become typed nodes with typed edges, rendered live on canvas as you speak.
- An asynchronous Verifier works while you're gone. New claims queue through Pub/Sub; a Cloud Run worker searches for external evidence via Gemini with Google Search grounding, then checks each claim against your own prior claims using embedding similarity. Contradictions become red tension edges you didn't ask for.
- Drop a research paper onto the map. Gemini reads the PDF natively — section by section, skipping boilerplate — extracts its claims with full provenance, and flags where the literature contradicts you.
- Cross-project echoes. When an argument in your academic research resonates with one in your product strategy, the system surfaces it. Two separate projects, the same hidden pattern, found without being asked.
- A persistent learner model. The system tracks how you reason — your scaffolding level, your recurring blind spots, which question types actually unlock progress — and adapts how it asks. Explicit feedback on every question reshapes the next one.
- A briefing on return. Open a project and the first thing you see is what the instrument found while you were away: tensions detected, claims verified, sources found — each one actionable in a single click. ## How we built it
Five ADK agents with strict separation of concerns:
| Agent | Role | Mode |
|---|---|---|
| Socratic | Leads the dialogue, one adaptive question per turn. Reads the graph, never writes to it. | Sync, streaming |
| Cartographer | Extracts claims and relations, mutates the Firestore graph, emits diffs. | Sync |
| Verifier | External evidence via Search grounding, contradiction detection via embeddings. | Async (Pub/Sub) |
| Modeler | Maintains the learner model from session transcripts and feedback. | Async |
| Ingestion | PDF to sections to claims with provenance to graph. | Async (Pub/Sub) |
Stack: Gemini 3.5 via Vertex AI · Google ADK 2.8 · Cloud Run (frontend + backend) · Firestore · Pub/Sub · Cloud Storage · Vertex AI embeddings.
Three decisions that shaped the system:
Node identity is a SHA-1 of normalized text, not a UUID. One choice delivers three properties: the same claim stated in two sessions converges into a single document, so the graph sharpens as it grows instead of inflating; a redelivered Pub/Sub message becomes a natural no-op with no dedup table; and edges resolve by text without a second LLM call.
Context is assembled, never replayed. Each turn receives a hierarchical graph summary (top-k by degree centrality), the last six exchanges, the learner model, and vector-retrieved relevant nodes. Full-history replay doesn't scale and doesn't help — the graph is a better memory than the transcript.
Concurrency, not a faster model. The naive turn took ~13 seconds. But the Cartographer doesn't depend on the question the Socratic agent is composing — it maps the user's message against the previous question, which is already known. There was no real dependency; it only looked sequential. Running them concurrently cut turn latency to ~7s, with the graph mutating on screen while the user is still reading.
Failure tolerance is documented and tested: timeouts with backoff on every agent call, schema validation with single retry on malformed output, idempotent Pub/Sub via node-ID dedupe, and graceful degradation — a failed Verifier leaves the graph fully usable with claims marked pending, never a broken UI.
Challenges we ran into
The SDK had drifted from its own documentation. ADK 2.x constructor and streaming signatures don't match the published examples — keyword-only where the docs show positional, async where they show sync. Code written from the documentation doesn't compile. I caught it in the first hour because empirical verification against live APIs was a rule before writing any code.
Gemini 3.x doesn't live where I assumed. It's served only from Vertex AI's global endpoint; us-central1 returns a hard 404. Veo, meanwhile, exists only in us-central1. The architecture holds two regions as a fact about the platform, isolated in a single config.py. verify_stack.sh asserts that 404 deliberately — if Google ever backfills the region, that test turning green is the signal to revisit.
An idempotency hole that only testing could find. Content-hash node identity handles redelivery perfectly — yet re-uploading the same PDF still produced new nodes, because two extraction runs phrase the same finding differently, and content hashing only merges identical text. Fixed with document-level hashing: the SHA-1 of the file bytes becomes the document ID, and a re-upload is skipped before Gemini is ever called. Cheaper and correct.
Accomplishments that we're proud of
The system catches you contradicting yourself, and nobody scripted it. In testing, the Socratic agent said — unprompted — "You just argued that AI will replace teachers because of scalability, yet you previously stated that schools are primarily social institutions. How do you reconcile these?" That came from a contradiction edge in the graph, not from a hardcoded prompt. The architecture produced the behavior.
Literature that argues back. Drop a meta-analysis onto the map and within seconds its claims are structured, attributed to their section, and connected to your own reasoning — including where they contradict it. Your notes and the published record become one contestable object.
A reproducibility claim anyone can check. verify_stack.sh validates seven model identifiers against the live API in about fifteen seconds. The README opens by inviting judges to run it before believing anything else it says. Nothing here depends on being taken at my word.
Async work that becomes visible. The briefing screen — "The instrument kept working" — turns background agent labor into the first thing you see. Autonomy that nobody notices isn't a feature; this makes it legible.
What we learned
Contradiction detection has two regimes, and measurement revealed the second. Early in a project, the synchronous Cartographer catches contradictions — the conflicting claim still fits inside the graph summary injected into context. Once the graph outgrows that window, only the asynchronous Verifier catches it, through embedding retrieval across the full node set. I had written the async path as an architectural bet about scale. Testing the same scenario at 3 nodes and again at 38 turned the bet into an observation, and the two paths hand off to each other as the artifact grows.
The most important decision came from epistemology, not engineering. Claims extracted from uploaded papers were initially queued for verification alongside the user's own claims. The pending counter climbed and stayed there. It wasn't a queue bug — it was a category error.
The system verifies what you assert. Not what Bloom asserted in 1984.
A published meta-analysis isn't a claim awaiting verification; it is evidence. Running it through search grounding to check whether the literature agrees with the literature is incoherent. Literature claims are born active; only user claims face scrutiny. That distinction isn't a performance optimization — it's what the system is for, and no amount of engineering instinct would have produced it.
What's next for Socraitia
Cross-project reasoning at scale: moving from in-memory cosine similarity to Vertex AI Vector Search, so the echo mechanism works across years of thinking rather than hundreds of nodes. Voice and image ingestion — the async pipeline already exists, extending it is mechanical. Multi-user graphs, where a research group's collective reasoning becomes visible and its internal contradictions surface before the paper does.
And the question this work opens: if a system can model how you reason, what should it do when it notices you reasoning badly?
Socraitia doesn't give you answers. It teaches you to reason.
Built With
- cloud-run
- cloud-storage
- docker
- fastapi
- firestore
- gemini
- google-adk
- google-cloud
- knowledge-graph
- multi-agent-system
- next.js
- pub-sub
- python
- react
- typescript
- vertex-ai
Log in or sign up for Devpost to join the conversation.