Architecture

The semantic memory stack for AI

Yohanun combines vector storage, graph memory, and a rules engine into a unified semantic runtime. Here's how vector (Chroma), graph (Neo4j), and rules work together to create truly intelligent systems.

Three layers. One intelligent runtime.

Yohanun sits between your application and any LLM, providing memory, rules, and context management as a unified semantic infrastructure layer.

Your Application

React, Python, Node.js, etc.

Yohanun Semantic Runtime

Memory Layer

Vector + Graph Storage

Rules Engine

Business Logic

Context Manager

Intelligent Weaving

Any LLM

OpenAI, Claude, Local Models

Hybrid memory architecture

Vector storage excels at semantic similarity. Graph databases excel at relationships. Together, they create memory that understands both meaning and context.

Vector Storage (Chroma)

Semantic similarity search using embeddings. Find concepts that are related in meaning, even if they use different words.

Perfect for:

Semantic search across conversations
Finding similar past interactions
Content-based memory retrieval
Query: "vacation planning"
Results:
• "I need help planning my trip" (0.89)
• "Holiday booking assistance" (0.84)
• "Travel itinerary ideas" (0.82)

Graph Memory (Neo4j)

Relationship-based memory that understands connections between people, concepts, and events across time.

Perfect for:

User relationship mapping
Temporal event connections
Complex reasoning chains
User -[PREFERS]-> Italian_Food
User -[LIVES_IN]-> Seattle  
User -[VISITED]-> Rome
Rome -[HAS_CUISINE]-> Italian_Food
Explainable Logic

Declarative rules engine

Business logic that's explicit, auditable, and version-controlled. Define your AI's behavior as clear rules rather than hidden prompt engineering.

Every decision includes a reasoning trail. Every rule can be traced. Every outcome can be explained to users, auditors, or regulators.

Version-controlled business logic
Complete reasoning audit trails
Role-based permission system
Enterprise Compliance

Example Rule Definition

# Customer support escalation rules
rule "enterprise_customer_priority":
  when:
    user.tier == "enterprise" and
    issue.severity >= "high" and
    response_time > 30_minutes
  then:
    escalate_to = "senior_support"
    notify = ["user", "account_manager"]
    priority = "urgent"
    audit_log = "Enterprise SLA breach prevention"

# Data access permissions  
rule "billing_data_access":
  when:
    request.data_type == "billing" and
    user.role in ["billing_admin", "finance"]
  then:
    allow_access = True
    log_reason = "Authorized billing access"
  else:
    deny_access = True
    log_reason = "Insufficient permissions"

Intelligent context management

The context manager decides what information to include in each LLM call, balancing relevance, recency, and token efficiency.

Context Selection Process

1

Retrieve

Query vector and graph storage for relevant memories and relationships

2

Rank

Score by relevance, recency, and importance. Apply business rules.

3

Weave

Construct optimal context within token limits, maintaining coherence

How Yohanun compares

Purpose-built semantic infrastructure vs. building from scratch or using general-purpose tools.

Feature Yohanun LangChain Build from Scratch
Persistent Memory ✓ Built-in ⚠ DIY ⚠ Complex
Rules Engine ✓ Declarative ⚠ Prompt Engineering ✗ None
Context Management ✓ Intelligent ⚠ Basic ⚠ Manual
Audit Trails ✓ Complete ⚠ Limited ⚠ DIY
Development Time Minutes Weeks Months

Ready to build with semantic infrastructure?

Start with Yohanun Cloud to experience the semantic runtime, or explore deployment options for your infrastructure needs.