Short answer: Pattern Five is governed organizational knowledge—certified definitions, policies, lineage, and permissions—that agents must treat as authoritative.
Personal Engram memory and graphs do not certify what Finance approved or which SOP is in force. Vector similarity finds related text; it does not prove a hit is canonical and allowed. Put obligations that create liability in the context layer; keep quirks and prefs in Engram. On conflict, prefer certified objects and reconsolidate stale personal notes.
Pattern Five is the enterprise context layer: governed organizational meaning that agents must treat as authoritative. Personal Engram memories answer what this user prefers. Graphs answer how entities connect. Neither automatically answers which revenue definition Finance approved, which SOP is current, or whether this operator may see that lot record. An enterprise context layer supplies certified definitions, policies, lineage, and permission boundaries. Similarity retrieval alone cannot do that job. Vector search finds related text. It does not certify that the hit is canonical, in force, and allowed.
This chapter defines the context layer versus the memory layer, shows how Weaviate-backed organizational collections and Engram groups fit the split, outlines assembly rules that keep authority above anecdote, and walks through a dual-plane retrieve for a change-control agent. The next step is combining experiential Engram memory with that organizational plane on purpose.
How is an enterprise context layer different from agent memory?
After graph architectures, it is tempting to call every structured store “context.” Memory layers and context layers solve different problems. A memory layer stores interaction history, preferences, and lessons so agents stay continuous across sessions. Weaviate Engram is built for that plane: extract, transform, scope by user_id, search with hybrid retrieval. A context layer stores institutional knowledge about what the business means and which rules apply. Metric definitions, glossary terms, approved procedures, access policies, and decision precedents live there.
Industry writing on enterprise agents stresses the gap. RAG over policy PDFs tells the model what documents say. It does not enforce which definition is certified or whether the caller is authorized. Conversation memory that recalls “we talked about Acme pricing” is not the same as the account’s governed relationship history. Pattern Five exists because agents that only remember chats still hallucinate organizational reality.
Treat the context layer as compile-time and runtime authority. Agents may propose. The layer constrains what counts as true for the company right now.
How do Weaviate and Engram map onto that split?
Once the distinction is clear, assign substrates. Put organizational documents, SOPs, and glossary entries in a Weaviate collection that your product treats as the shared knowledge base. Curate writes. Version objects. Mark deprecated content so retrieval can filter it. Put per-user and per-agent experiential facts in Engram. Engram’s own personalized RAG pattern does exactly this dual search: knowledge base for shared product truth, Engram for user-specific context.
Engram groups sharpen the boundary further. A personalization group stays user-scoped. A continual-learning or policy-adjacent group can be project-wide when trusted teams share procedural lessons. Project-wide Engram topics are still experiential unless you govern them like SOPs. Do not let an unverified chat tip silently become the enterprise definition of “critical defect.” Promote carefully, or write organizational facts only through the governed knowledge pipeline.
Permissions travel with context. The assemble step should know the caller’s role before injecting restricted SOP sections. Engram user isolation prevents cross-tenant preference leaks. Enterprise collections need the same discipline with ACLs or tenant filters on the Weaviate side.
What belongs in the context layer, and what must never be only a memory?
Knowing the mapping, classify content. Certified metric formulas, safety lockout procedures, legal retention rules, and approved supplier lists belong in the context layer. Operator quirks, temporary workarounds, and personal UI preferences belong in Engram memory. Decision precedents can sit in both forms: a governed record of what was approved, plus an Engram note that a specific engineer prefers a checklist style when executing that decision.
Never rely on memory alone for obligations that create liability. If the agent must cite the current lockout SOP, retrieve the certified object, not the closest chat paraphrase. If two sources conflict, prefer the context layer and treat the Engram hit as a clue to reconsolidate or forget the stale personal note.
Freshness differs by plane. Memory wants reconsolidation and drift detectors. Context wants publication workflows, owners, and effective dates. Mixing those clocks in one flat store is how deprecated policy keeps winning hybrid search.
What does a dual-plane retrieve look like in code?
Imagine a factory agent on factory-change-control-desk-3. Organizational SOPs live in a Weaviate collection. The engineer’s habits live in Engram.
import os
import weaviate
from weaviate.classes.query import Filter
from engram import EngramClient, HybridRetrieval
engram = EngramClient(api_key=os.environ["ENGRAM_API_KEY"])
wv = weaviate.connect_to_weaviate_cloud(
cluster_url=os.environ["WEAVIATE_URL"],
auth_credentials=weaviate.auth.AuthApiKey(os.environ["WEAVIATE_API_KEY"]),
)
sops = wv.collections.get("ChangeControlSOPs")
engineer = "engineer-priya-nair"
desk = {"desk_id": "factory-change-control-desk-3"}
def enterprise_context(query: str, role: str):
# Authority plane: only certified, role-visible SOPs.
result = sops.query.hybrid(
query=query,
limit=5,
filters=(
Filter.by_property("status").equal("certified")
& Filter.by_property("allowed_roles").contains_any([role, "all"])
),
)
return [
{
"title": o.properties.get("title"),
"content": o.properties.get("content"),
"version": o.properties.get("version"),
"source": "enterprise",
}
for o in result.objects
]
def experiential_memory(query: str):
hits = engram.memories.search(
query,
user_id=engineer,
group="personalization",
properties=desk,
retrieval_config=HybridRetrieval(limit=5),
)
return [{"content": m.content, "source": "engram"} for m in hits]
def assemble(query: str, role: str) -> str:
authority = enterprise_context(query, role)
personal = experiential_memory(query)
auth_block = "\n".join(
f"- [{a['version']}] {a['title']}: {a['content']}" for a in authority
) or "- (none)"
mem_block = "\n".join(f"- {p['content']}" for p in personal) or "- (none)"
return (
"You are a change-control assistant for factory-change-control-desk-3.\n"
"Enterprise context is authoritative when present.\n"
f"Certified SOPs:\n{auth_block}\n"
f"Engineer memories (non-authoritative preferences):\n{mem_block}\n"
"If memory conflicts with a certified SOP, follow the SOP and note the conflict."
)
# Seed a personal preference; SOP truth still wins on conflict.
engram.runs.wait(
engram.memories.add(
"On factory-change-control-desk-3 I prefer shorter impact summaries in email form.",
user_id=engineer,
group="personalization",
properties=desk,
).run_id
)
print(assemble("How do I document a process parameter change?", role="process_engineer"))
wv.close()
engram.close()
The prompt labels planes explicitly. Certified SOP text is authority. Engram supplies style and continuity. Conflict policy is stated so the model does not average them into a unsafe compromise.
How do you operate Pattern Five without freezing the organization?
Give every context object an owner, status, and effective window. Measure how often agents cite deprecated objects. Measure override rates where humans correct the agent back onto policy. Keep Engram fertile for local learning, then run a promotion review before project-wide procedural memories become quasi-SOP.
Pattern Five alone can feel cold. Agents that only read enterprise catalogs sound compliant and impersonal. The productive architecture combines experiential Engram memory with organizational knowledge under clear precedence rules. That combination is the next pattern chapter.
Our next chapter, How do you combine experiential memory with organizational knowledge?, shows how to merge those planes in one agent loop without letting either erase the other.