Skip to content

[Feature]: Memory Statistics and Analytics Dashboard #138

@Teingi

Description

@Teingi

Describe your use case

Users and administrators need insights into their memory usage patterns to optimize their PowerMem setup. They want to understand:

  • Total number of memories per user/agent
  • Memory distribution by importance level
  • Most frequently accessed memories
  • Memory growth trends over time
  • Storage usage and optimization opportunities
  • Search query patterns

Describe the solution you'd like

Implement a statistics and analytics system that provides:

  1. Basic statistics:

    • Total memories count (by user, agent, time period)
    • Memory distribution by type (short-term, long-term, private, shared)
    • Average importance scores
    • Memory age distribution
  2. Usage analytics:

    • Most accessed memories (top N)
    • Search query frequency
    • Memory access patterns (time-based)
    • Ebbinghaus retention scores distribution
  3. API methods:

    stats = memory.get_statistics(user_id="user123")
    # Returns: {
    #   "total_memories": 150,
    #   "by_type": {"short_term": 50, "long_term": 100},
    #   "avg_importance": 0.75,
    #   "top_accessed": [...],
    #   "growth_trend": [...]
    # }
  4. Optional dashboard:

    • Simple web-based dashboard (Flask/FastAPI)
    • Visual charts (memory growth, importance distribution)
    • Export statistics as JSON/CSV

The solution should:

  • Be performant (use efficient queries, caching if needed)
  • Support filtering by user, agent, date range
  • Provide both programmatic API and optional UI
  • Respect privacy (user-specific stats only visible to that user)

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions