Aventra-OS-Chat / memory_viewer.py
Tpayne101's picture
Create memory_viewer.py
61c7873 verified
raw
history blame contribute delete
475 Bytes
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."
)