Validate every memory access before Conway acts — even at 3am.
Conway runs while you sleep. It persists across sessions, triggers via webhooks, and acts autonomously. Without preflight validation, stale or poisoned memories can drive irreversible actions with no human in the loop.
Conway webhook trigger
↓
Retrieve memory from persistent store
↓
Sgraal preflight (POST /v1/preflight)
↓
USE_MEMORY → act | BLOCK → stop + alert
from sgraal import SgraalClient import os client = SgraalClient(os.environ["SGRAAL_API_KEY"]) def conway_webhook_handler(event): # Retrieve memory Conway is about to act on memory = event["memory_context"] result = client.preflight( memory_state=[{ "id": "conway_mem", "content": memory, "type": "semantic", "timestamp_age_days": 0, "source_trust": 0.85, "source_conflict": 0.05, "downstream_count": 1 }], domain="coding", action_type=event.get("action_type", "reversible") ) if result["recommended_action"] == "BLOCK": return {"blocked": True, "reason": result.get("explainability_note")} # Safe to proceed return execute_action(event)
Catches stale memory replayed as fresh during overnight runs.
Detects authority creep over long-running persistent sessions.
Flags too-clean memory from automated sources at 3am.