import gradio as gr import json, os def view_memory(): # Check if your agent's memory file exists if os.path.exists("data/memory.json"): with open("data/memory.json", "r") as f: return json.dumps(json.load(f), indent=2) return "No memory data yet." memory_tab = gr.Interface( fn=view_memory, inputs=[], outputs="text", title="🧠 Memory Viewer", description="View stored memories and personality data from your agent." )