Mneme

API Reference

REST API endpoints for signals and memories.

All API endpoints require authentication via a Bearer token in the Authorization header.

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  https://your-mneme-host/api/signals

The token is configured via the API_TOKEN environment variable.


Signals

List Signals

GET /api/signals

Query Parameters:

ParameterTypeDefaultDescription
sourcestringFilter by source: github, slack, or linear
categorystringFilter by signal category
repostringFilter by repository full name (e.g., org/repo)
sincestringISO 8601 date — signals after this time
untilstringISO 8601 date — signals before this time
limitnumber50Max results (capped at 200)
offsetnumber0Pagination offset

Response:

{
  "data": [
    {
      "id": "uuid",
      "source": "github",
      "category": "code_review",
      "repoFullName": "org/repo",
      "title": "PR review comment on auth module",
      "summary": "...",
      "confidence": "high",
      "occurredAt": "2025-01-15T10:30:00Z",
      "entities": [...],
      "metadata": {...}
    }
  ],
  "pagination": {
    "total": 142,
    "limit": 50,
    "offset": 0,
    "hasMore": true
  }
}

Signal Stats

GET /api/signals/stats

Query Parameters:

ParameterTypeDefaultDescription
repostringFilter by repository
windowstring7dTime window: 1d, 7d, or 30d

Response:

{
  "window": "7d",
  "since": "2025-01-08T00:00:00Z",
  "total": 87,
  "bySource": [
    { "source": "github", "count": 52 },
    { "source": "slack", "count": 30 },
    { "source": "linear", "count": 5 }
  ],
  "byCategory": [
    { "category": "code_review", "count": 25 },
    { "category": "discussion", "count": 18 }
  ],
  "byConfidence": [
    { "confidence": "high", "count": 40 },
    { "confidence": "medium", "count": 35 },
    { "confidence": "low", "count": 12 }
  ],
  "daily": [
    { "date": "2025-01-08", "count": 12 },
    { "date": "2025-01-09", "count": 15 }
  ]
}

Get Signal

GET /api/signals/:id

Returns a single signal by ID, or 404 if not found.


Memories

List Memories

GET /api/memories

Query Parameters:

ParameterTypeDefaultDescription
repostringrequiredRepository full name
typestringFilter by memory type: decision, pattern, convention, issue, preference, fact
statusstringFilter by status: active, decaying, archived, contradicted
scopestringFilter by scope: repo or org
limitnumber50Max results (capped at 200)
offsetnumber0Pagination offset

Response:

{
  "data": [
    {
      "id": "uuid",
      "repoFullName": "org/repo",
      "scope": "repo",
      "type": "decision",
      "content": "Team decided to use Zod for all API validation...",
      "keywords": ["zod", "validation", "api"],
      "confidence": 0.85,
      "status": "active",
      "corroborationCount": 3,
      "contradictionCount": 0,
      "createdAt": "2025-01-10T08:00:00Z",
      "updatedAt": "2025-01-14T12:00:00Z"
    }
  ],
  "pagination": {
    "total": 47,
    "limit": 50,
    "offset": 0,
    "hasMore": false
  }
}

Memory Stats

GET /api/memories/stats

Query Parameters:

ParameterTypeDefaultDescription
repostringrequiredRepository full name

Response:

{
  "repo": "org/repo",
  "total": 47,
  "active": 32,
  "byType": [
    { "type": "decision", "count": 8 },
    { "type": "pattern", "count": 12 },
    { "type": "convention", "count": 5 },
    { "type": "issue", "count": 3 },
    { "type": "preference", "count": 2 },
    { "type": "fact", "count": 2 }
  ],
  "byStatus": [
    { "status": "active", "count": 32 },
    { "status": "archived", "count": 10 },
    { "status": "contradicted", "count": 5 }
  ]
}

Get Memory

GET /api/memories/:id

Returns a single memory by ID, or 404 if not found.

Get Memory Evidence

GET /api/memories/:id/evidence

Returns all evidence records for a memory, ordered by creation date (newest first).

Response:

{
  "data": [
    {
      "id": "uuid",
      "memoryId": "uuid",
      "signalId": "uuid",
      "type": "corroboration",
      "summary": "PR review reinforced the Zod validation decision",
      "confidenceDelta": 0.05,
      "createdAt": "2025-01-14T12:00:00Z"
    }
  ]
}

Submit Memory Feedback

POST /api/memories/:id/feedback

Request Body:

{
  "sentiment": "positive",
  "actor": "github-user",
  "prAnalysisId": "uuid",
  "comment": "This memory was helpful in the review"
}
FieldTypeRequiredDescription
sentimentstringYespositive or negative
actorstringYesUsername of the person giving feedback
prAnalysisIdstringNoAssociated PR analysis ID
commentstringNoFree-text feedback

Response: 201 Created

{
  "id": "uuid"
}

On this page