# dashboard/logs.py import streamlit as st import pandas as pd import os import sqlite3 # Use the HF‐writable temp path DB_PATH = os.path.join("/tmp", "memory.db") def show_logs(): st.header("🧠 Agent Memory Log Dashboard") conn = sqlite3.connect(DB_PATH) df = pd.read_sql("SELECT * FROM agent_logs ORDER BY timestamp DESC", conn) conn.close() st.dataframe(df) csv = df.to_csv(index=False).encode() st.download_button("📥 Download Logs CSV", csv, "agent_logs.csv")