File size: 475 Bytes
61c7873
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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."
)