Skip to main content

Endpoint

GET /api/v1/memory/stats
Returns aggregated statistics about memories stored for a specific repository, including total count and breakdown by memory type.

Authentication

Requires a valid JWT token in cookies (obtained via GitHub OAuth).

Query Parameters

repo
string
required
Repository in owner/repo format (must be connected to your account)

Response

repo
string
Repository full name (owner/repo)
total
integer
Total number of memories stored for this repository
by_type
object
Count of memories by type

Example Request

curl "https://your-backend.railway.app/api/v1/memory/stats?repo=myorg/backend" \
  -H "Cookie: access_token=your_jwt_token"

Example Response

{
  "repo": "myorg/backend",
  "total": 127,
  "by_type": {
    "project_pattern": 45,
    "decision": 23,
    "developer_pattern": 18,
    "developer_strength": 22,
    "risk_module": 12,
    "contributor_profile": 7
  }
}

Use Cases

  • Memory Overview: Quickly understand what has been learned about a repository
  • Memory Health: Track memory accumulation over time
  • Pattern Analysis: Identify which types of memories are most common
  • Memory Management: Determine if a repository needs memory cleanup or reindexing

Error Responses

{
  "detail": "repo must be owner/repo"
}

List Memories

Browse all memories for a repository

Rescan Repository

Rebuild memories from scratch

Build docs developers (and LLMs) love