LangGraph
Use UnifiedMemory before graph nodes that need durable context and after nodes that produce durable outcomes. Keep node-local scratch state in LangGraph; write only reusable facts, decisions, and tool outcomes to UnifiedMemory.
Pattern
- Use
agent/contextbefore a node or subgraph that needs memory. - Stamp
source_app=langgraph, a stableagent_id, and arun_id. - Use
agent/writebackafter useful work completes. - Keep graph handoffs explicit with allowed memory refs.
Safety
Each graph actor should have its own scoped key or stable agent_id. Shared
facts must be promoted through trust gates before another actor sees them.