Architecture: The Context Engine
The solution is built on three pillars: Memory, Orchestration, and Context.
1. The Context Object
Context is not just text; it is a structured object.
- Layer 1: Identity (RBAC) - Security bounds.
- Layer 2: Episodic State - Short-term conversation history.
- Layer 3: Semantic Knowledge - Long-term facts (Zep/Graphiti).
- Layer 4: Operational State - Workflow status (Temporal).
2. Memory Layer: Zep & Graphiti
We use Zep (Open Source) for the memory layer.
- Temporal Knowledge Graphs: Models how facts change over time (Bi-Temporal Modeling).
- Integration: Zep runs as a service, backed by Postgres.
3. Orchestration Layer: Temporal
We use Temporal to guarantee “Durable Execution”.
- Grid Dynamics Pattern: Decouple the “Brain” (LangGraph) from the “Spine” (Temporal).
- Resilience: If the agent crashes, Temporal retries from the last saved state.
- Human-in-the-Loop: Supports long waits (days/weeks) for approval signals.
4. Ingestion: Unstructured.io
A centralized ETL pipeline processes PDFs, HTML, and Slack dumps into structured data for Zep.