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. Importance affects which memories the session-context endpoint returns first, min_importance filtering, and pruning candidates; it does not change search result order.
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/{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(
id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
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/a1b2c3d4-e5f6-7890-abcd-ef1234567890/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/a1b2c3d4-e5f6-7890-abcd-ef1234567890/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 |
|---|---|---|
id | string (UUID) | The UUID of the memory to provide feedback on (e.g. a1b2c3d4-e5f6-7890-abcd-ef1234567890). |
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": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Use selectinload for SQLAlchemy relationship loading",
"importance_score": 0.9,
"content_hash": null,
"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. That raises their standing for session context, min_importance filters, and pruning, but does not move them up in search results, which are ordered by relevance to the query.
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/{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 id does not exist in the authenticated workspace. |
422 Unprocessable Entity | useful field missing or not a boolean. |
{ "detail": "Memory '00000000-0000-0000-0000-000000000000' not found." }Related
- Memory Lifecycle — how feedback signals feed into importance score recalculation
- What is a Memory — importance score fields and their meaning