Architecture

The governed memory stack

Yohanun sits between your application and any LLM. Underneath: hybrid vector + graph memory with temporal behavior, and — the part nobody else builds — a deterministic access gate that runs inside the retrieval query, before the model is ever called.

One runtime between your app and any model

Your application talks to Yohanun's API. Yohanun assembles governed context — memory the requesting principal is actually allowed to see — and only then calls the model.

Your Application

REST, SSE streaming, or WebSocket

Yohanun Runtime

Labeled Memory

Vector + graph, temporal decay, ownership & classification labels

Governance Gate

Clearances, ownership, mandates — enforced in the query, audited per read

Learning Loop

Outcomes → lessons; per-memory track record adjusts ranking

Any LLM

OpenAI, Anthropic, Google, DeepSeek, local — sees only what the gate released

The Core Idea

The gate runs inside the query

Every memory carries labels in its metadata: matter, classification level, owners. Every request resolves to a principal — an identity with clearances held in a platform-owned ledger.

At retrieval time, those two meet as filter conditions compiled into the vector search itself. Memory the principal isn't cleared for is never a search candidate — not retrieved-then-redacted, never retrieved at all.

Revocation is a ledger write that busts the cache: effective on the very next request, no reindexing, no redeployment. And every gated read lands in an append-only audit table.

Clearances & classification — who can see
Ownership & custody — who holds a memory, transferable by ledger entry
Conflict graph — ethical walls checked at grant time
Mandates — what an agent may do, with human escalation above the line

One Request, Conceptually

# 1. Resolve the principal (ledger-backed)
principal = resolve(request)
# clearances: [matter_a], level: 2

# 2. Compile gate conditions INTO the search
results = vector_search(
    query_embedding,
    filter = gate_conditions(principal)
    # matter ∈ cleared ∧ level ≤ 2
    # ∧ (unowned ∨ owner = principal)
)

# 3. Audit the read (append-only)
audit(principal, results)

# 4. ONLY NOW call the model
response = llm(context = results)
# It can't leak what it never saw.

Hybrid memory with temporal behavior

Vector storage finds meaning. Graph storage holds relationships. On top of both, memory behaves like memory: recency fades, importance persists, and usefulness earns rank.

Vector Memory (Qdrant)

Semantic similarity search over embeddings — find what's related in meaning, not just in words. This is also where the governance gate physically runs, as filter conditions on the search.

Query: "vacation planning"
Results (gated + ranked):
• "I need help planning my trip" (0.89)
• "Holiday booking assistance" (0.84)
• "Travel itinerary ideas" (0.82)

Graph Memory (Neo4j)

Entities, relationships, and time — used to discover related context before the vector search, and to hold the authority/conflict graph that powers ethical walls.

User -[PREFERS]-> Italian_Food
User -[LIVES_IN]-> Seattle
User -[VISITED]-> Rome
Matter_A -[CONFLICTS_WITH]-> Matter_B

What Happens at Recall

1

Discover & Gate

Graph context discovery finds related entities and sessions; the gate compiles the principal's permissions into the vector query

2

Decay & Rank

Temporal decay computed at read time — recency, access patterns, entity relevance — plus each memory's outcome track record

3

Weave & Audit

The best context is assembled within token limits, the read is written to the audit ledger, and only then does the model see anything

Rules & Automation

Declarative rules, natural-language entry

Business logic lives as versioned, auditable rules — not hidden prompt engineering. Rules fire at storage time, retrieval time, on schedules, or on events, and every execution is tracked.

You can define rules through the API or in plain language — "tag anything about invoices as finance and notify the billing channel" becomes a structured, inspectable rule you can review before it runs.

Versioned rules with execution history
Storage-time, retrieval-time, scheduled, and event triggers
Conflict detection between overlapping rules
Enterprise Features

From Plain Language to Rule

POST /api/ai/create-rule
{ "instruction": "Tag anything about
   invoices as finance and set high
   priority" }

# Becomes a structured, versioned rule:
{
  "trigger": "STORAGE_TIME",
  "conditions": {
    "content_matches": ["invoice"]
  },
  "actions": [
    { "type": "TAG_NODES",
      "tags": ["finance"] },
    { "type": "SET_PRIORITY",
      "level": "high" }
  ]
}

How Yohanun compares

Memory libraries solve recall. Yohanun solves recall plus the questions that come right after it in any serious deployment.

Capability Yohanun Memory Libraries Build from Scratch
Persistent semantic memory ✓ Vector + graph + temporal ✓ Usually vector-only ⚠ Months of work
Access enforced before generation ✓ Per-memory walls, per-principal ⚠ Coarse RBAC/retention at best ⚠ DIY, easy to get wrong
Ethical walls (conflict-checked grants) ✓ Blocked at grant time ✗ Rarely modeled
Ownership & custody transfer ✓ Ledger-based, instant ✗ Rarely modeled
Action mandates + human escalation ✓ Fail-closed commits ⚠ DIY
Per-read audit trail ✓ Append-only ⚠ Limited ⚠ DIY
Learning from outcomes ✓ Track record adjusts ranking

Want the deep technical walkthrough?

We'll take your architects through the gate, the ledgers, and the audit trail in as much depth as they want — including a live look at the enforcement path.