Reference
Feedback API
Rate a memory's usefulness after you retrieve and use it. Positive feedback increases a memory's importance score over time; negative feedback decreases it. This signal feeds into the scheduled importance recalculation job and helps Neuroloom surface the most relevant memories first.
See Session Lifecycle for how feedback integrates with the broader memory health cycle.
Base URL and Authentication
https://api.neuroloom.devAll requests require an API key:
Authorization: Token $MEMORIES_API_TOKENRate a Memory
POST /api/v1/memories/{memory_id}/feedbackRecord whether a memory was useful after you retrieved and acted on it. Call this after using (or deciding not to use) a retrieved memory to provide an explicit quality signal.
memory_rate(
memory_id="mem-a1b2c3d4e5f6g7h8",
useful=true,
context="This pattern resolved the N+1 query issue in the sessions router. The selectinload hint was exactly what was needed."
)The context field is optional but valuable — it gives the importance recalculation job a human-readable explanation for why the memory was helpful.
import httpx, os
response = httpx.post(
"https://api.neuroloom.dev/api/v1/memories/mem-a1b2c3d4e5f6g7h8/feedback",
headers={"Authorization": f"Token {os.environ['MEMORIES_API_TOKEN']}"},
json={
"useful": True,
"context": "This pattern resolved the N+1 query issue in the sessions router.",
"session_id": "sess-abc123",
},
)
assert response.status_code == 201curl -X POST "https://api.neuroloom.dev/api/v1/memories/mem-a1b2c3d4e5f6g7h8/feedback" \
-H "Authorization: Token $MEMORIES_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"useful": true,
"context": "This pattern resolved the N+1 query issue in the sessions router.",
"session_id": "sess-abc123"
}'Path parameters
| Parameter | Type | Description |
|---|---|---|
memory_id | string | The memory_id of the memory to provide feedback on (e.g. mem-a1b2c3d4e5f6g7h8). |
Request body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
useful | boolean | Yes | — | true if the memory was helpful in context, false if it was not. |
context | string | No | null | Explanation of why the memory was or was not useful. Stored alongside the feedback record. |
session_id | string | No | null | Session ID linking the feedback to a specific work session. Must belong to the same workspace — cross-workspace session IDs are silently ignored. |
Response — 201 Created, the memory object the feedback was applied to.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"memory_id": "mem-a1b2c3d4e5f6g7h8",
"title": "Use selectinload for SQLAlchemy relationship loading",
"importance_score": 0.9,
"feedback_positive_count": 6,
"feedback_negative_count": 1,
...
}feedback_positive_count and feedback_negative_count reflect the updated totals after this submission.
How Feedback Affects Importance
Feedback is not applied to importance_score immediately. It is incorporated during the scheduled importance recalculation job that runs periodically across the workspace. After the job runs, memories with net positive feedback will have a higher importance_score and appear earlier in search results.
The recalculation formula weights:
feedback_positive_count— increases importancefeedback_negative_count— decreases importanceaccess_countandretrieval_count— recency and frequency of use- Original
confidence_score— baseline trust in the memory
You can view the current feedback_positive_count and feedback_negative_count on any memory by calling GET /api/v1/memories/{memory_id}. These totals update immediately after feedback is submitted, even before the recalculation job runs.
When to Submit Feedback
Submit positive feedback when a retrieved memory directly helped you complete a task or make a decision. Submit negative feedback when a retrieved memory was outdated, incorrect, or irrelevant to the context it appeared in.
The MCP memory_rate tool is designed for use at the end of a task, after you have evaluated whether the retrieved context was genuinely useful. If you used memory_search or memory_get_detail to retrieve a memory, call memory_rate once you know whether it helped.
Error Responses
| Status | When |
|---|---|
401 Unauthorized | Missing or invalid Authorization header. |
404 Not Found | The memory_id does not exist in the authenticated workspace. |
422 Unprocessable Entity | useful field missing or not a boolean. |
{ "detail": "Memory 'mem-notexist' not found." }Related
- Memory Lifecycle — how feedback signals feed into importance score recalculation
- What is a Memory — importance score fields and their meaning