Inspiration

AI agents are becoming increasingly capable at reasoning, but I became interested in a different problem:

What happens to the human context they need to reason well?

People constantly produce valuable context through observations, measurements, decisions, hypotheses, conversations, and experience. Much of it remains unstructured: spoken aloud, written in notes, or trapped inside applications that were designed for humans rather than agents.

My initial idea was simple: let a person describe something naturally, preserve what they actually said, and make that context reusable by an AI agent later.

But that immediately raised a harder question:

If AI helps structure that memory, how do we prevent the AI's interpretation from silently becoming part of the human evidence?

That question became the foundation of Companion.

Companion is a human-to-agent memory layer:

Human context → Confirmed memory → WebMCP → Agent reasoning

The application owns the evidence. The agent owns the reasoning.

What Companion does

Companion starts with unrestricted natural-language human input.

A person can describe an observation without learning a schema or filling out a complex structured form. Companion proposes a subject, but the person reviews and can correct both the original text and the subject before confirming it.

Once confirmed, the original evidence is preserved first.

AI then helps construct a semantic representation of that evidence, but model output does not automatically become factual memory.

Semantic construction happens in two stages:

  1. Semantic discovery finds candidate relations.
  2. Epistemic classification determines how each candidate is supported by the confirmed source.

Relations are classified as:

  • SOURCE_EXPLICIT
  • SOURCE_STRONGLY_IMPLIED
  • AGENT_INFERRED

Only source-grounded relations are eligible for factual memory after deterministic validation.

AGENT_INFERRED relations are kept outside that factual boundary and are never silently exposed as human-confirmed facts.

This means AI can help build the memory without being allowed to redefine the evidence.

Why WebMCP

The next problem was retrieval.

My first instinct was to make Companion intelligent enough to decide which stored information an agent needed.

Experiments changed that design.

If the external agent already understands the user's question and will ultimately reason over the answer, adding another AI inside Companion to predict what that agent needs duplicates intelligence and creates another place where interpretation can go wrong.

Instead, Companion exposes two read-only WebMCP capabilities:

get_companion_vocabulary

Returns a deterministic, reusable vocabulary of factual semantic relations available for a subject.

query_companion_memory

Retrieves exactly the factual relations identified by the vocabulary IDs selected by the external agent.

This creates an incremental protocol:

Agent inspects vocabulary → selects evidence → retrieves it → evaluates sufficiency → requests more if necessary → reasons

Companion does not interpret the question, rank evidence, decide sufficiency, or generate the final answer.

WebMCP is a particularly good fit because it gives the application a discoverable and invocable capability without coupling Companion to one specific agent runtime.

The same architecture could be implemented with custom APIs and agent-specific integrations. WebMCP changes the integration boundary: Companion can expose its memory capability directly from the application so compatible agents can discover what evidence exists, request only the evidence they need, and reason over it without Companion being coupled to a specific agent runtime. What becomes possible is a collaboration in which a human can capture context naturally once, while multiple compatible agents can later discover and retrieve that confirmed memory through a shared application-owned interface.

How I built it

Companion was built as a sequence of small architectural experiments rather than by implementing the first design that seemed plausible.

The core pipeline became:

Human natural-language context
        ↓
Human review and confirmation
        ↓
Persist confirmed raw evidence
        ↓
Stage A: semantic discovery
        ↓
Candidate semantic graph
        ↓
Stage B: epistemic classification
        ↓
Deterministic validation
        ↓
Factual memory / inference boundary
        ↓
Reusable factual vocabulary
        ↓
WebMCP deterministic lookup
        ↓
External-agent reasoning

The AI-assisted part is deliberately bounded.

Everything that can be checked mechanically—IDs, references, schema compliance, candidate correspondence, source excerpts, routing, lookup—is validated deterministically.

One design principle emerged from this:

Pay for intelligence once, then reuse the structured result deterministically.

The confirmed rawText remains the authoritative primary source. Semantic memory stays traceable to it, and semantic-processing failure cannot erase the original evidence.

Persistent semantic IDs are also owned by Companion rather than by the model, preventing temporary model-generated identifiers from becoming accidental persistent authority.

Challenges I faced

Semantic correctness is not factual correctness

One of the biggest lessons came from deliberately trying to break the semantic builder.

A model can identify a relationship that is completely reasonable and still not be justified by the source.

For example, observations may strongly suggest a diagnosis. That does not mean the human actually reported that diagnosis.

This forced me to separate semantic discovery from epistemic classification.

A useful semantic candidate is not automatically a fact.

Preventing silent information loss

Another problem appeared when increasing epistemic strictness.

A strict prompt could reduce unsupported inference but also cause legitimate semantic relations to disappear.

The solution was a no-deletion architecture: Stage A discovers candidates first, and Stage B must classify every candidate exactly once.

That makes three different failures observable:

  • discovery failure,
  • classification failure,
  • inferred semantic content that should not become factual memory.

Deciding where retrieval intelligence belongs

I also experimented with retrieval strategies.

The important realization was that Companion does not need to understand the user's question if the external agent already does.

The external agent can inspect Companion's reusable vocabulary, choose the IDs it needs, retain previous context, and request additional evidence incrementally.

That removed an unnecessary intelligent selector from Companion and produced a cleaner responsibility boundary.

Keeping the demo honest

The public challenge demo uses synthetic evidence and browser-session-local memory.

It intentionally does not claim production readiness, universal semantic correctness, or objective truth.

Human confirmation means that the representation corresponds to what the human confirmed. It does not mean the human statement itself is objectively true.

That distinction became important enough to be part of the architecture rather than just a disclaimer.

What I learned

The most important thing I learned was that memory for agents is not just a storage problem.

It is an authority problem.

A useful agent-memory system needs to know where human evidence ends and machine interpretation begins.

I also learned that adding more AI is not always the answer.

Companion uses AI where semantic interpretation is useful, but deterministic software owns validation, persistence rules, identity, routing, and retrieval.

And WebMCP helped reveal a particularly clean separation of responsibilities:

The human provides the evidence.

Companion preserves and structures it.

WebMCP exposes it.

The external agent decides what it needs and reasons over it.

Validation

I treated the hackathon prototype as an experiment that should be falsifiable rather than as a polished product claim.

The final automated suite contains 52 passing tests, covering the semantic authority boundary, deterministic validation, factual/inferred routing, WebMCP vocabulary projection, exact-ID lookup, and incremental retrieval behavior.

The final production walkthrough also verified:

  • natural-language capture and human confirmation;
  • real semantic construction;
  • WebMCP tool discovery and invocation;
  • reusable factual vocabulary;
  • exact lookup of agent-selected IDs;
  • incremental retrieval across multiple calls;
  • resolvable source references;
  • explicit handling of unknown IDs;
  • zero evidence for an empty ID request;
  • exclusion of AGENT_INFERRED relations from factual WebMCP results.

The public demo starts empty and all challenge examples are synthetic.

What's next

Companion v0.1 deliberately leaves several problems open.

The semantic metamodel is small. Semantic recall can improve. The experimental corpus needs to grow. Long-term handling of agent-generated interpretations needs further research.

One particularly interesting future question is what should happen when a human reviews an agent-generated conclusion and deliberately chooses to preserve it as new evidence.

That is not solved in this version.

For now, Companion establishes the boundary I wanted to test:

AI can help construct reusable semantic memory without being allowed to silently rewrite human evidence.

And WebMCP provides the bridge that allows external agents to use that memory while retaining responsibility for their own reasoning.

Built With

Share this project:

Updates

Submission history