← Lesson
Memory Types
Joeven
Run
Reset
Python loads on first run
import json working = {"goal": "fix runner OOM", "steps_left": 4, "last_obs": None} episodic = [] semantic = { "runbook.oom": "Raise worker memory, then replay the DLQ.", "tenant.acme.refunds": "never_cash", } procedural = { "replay_dlq": lambda since: {"ran": True, "since": since}, } def remember_event(kind, payload): episodic.append({"kind": kind, "payload": payload}) def act(): fact = semantic["runbook.oom"] working["last_obs"] = fact remember_event("retrieved_semantic", {"key": "runbook.oom"}) result = procedural["replay_dlq"]("24h") remember_event("procedure", {"name": "replay_dlq", "result": result}) working["steps_left"] -= 1 working["goal_done"] = result["ran"] return result print("act", act()) print("working", json.dumps(working)) print("episodic", [e["kind"] for e in episodic]) print("semantic keys", list(semantic)) print("procedures", list(procedural))
Run to execute this in your browser. Nothing is sent to a server.