Learning loop
Report run outcomes and retrieval feedback with /v1/outcomes and /v1/retrieval-feedback.
Both endpoints need the feedback capability. Pass the receiptId from the recall and the same runId you recalled with. The concepts are explained in Learning loop.
| Method | Path | Capability |
|---|---|---|
POST | /v1/outcomes | feedback |
POST | /v1/retrieval-feedback | feedback |
Report an outcome
POST /v1/outcomes — the measured result of a run.
curl -s -X POST "$AGENT_MEMORY_BASE_URL/v1/outcomes" \
-H "Authorization: Bearer $AGENT_MEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "'"$AGENT_MEMORY_WORKSPACE_ID"'",
"runId": "run-1",
"receiptId": "<receiptId>",
"buildSuccess": true,
"testPassRate": 1.0,
"deploySuccess": true
}'| Field | Type | Notes |
|---|---|---|
workspaceId | GUID | Required (400 without it). |
runId | string | The run the outcome belongs to. |
receiptId | GUID | Credits exactly what that recall delivered. Without it, everything the run was delivered is credited. |
applicationId | GUID | Optional application scope. |
buildSuccess | bool | Did the output build or compile? |
testPassRate | number | 0.0–1.0. Omit when no tests ran. |
deploySuccess | bool | Did the deployment succeed? |
errorCount | int | Build and lint errors. Default 0. |
warningCount | int | Default 0. |
userRating | int | 1–5. |
notes | string | Free-form notes. |
measuredAt | timestamp | When the outcome was measured. Defaults to now. |
Response:
{ "runId": "run-1", "successScore": 1.0 }successScore (0–1) is computed from the signals you sent: build 0.30, tests 0.30, deploy 0.20, error-free 0.10, user rating 0.10, re-normalized over what was present.
MCP: report_outcome. SDKs: outcome(). .NET: ReportOutcomeAsync.
Record retrieval feedback
POST /v1/retrieval-feedback — which recalled entries were used or ignored, and which procedures were applied or skipped.
{
"workspaceId": "…",
"runId": "run-1",
"receiptId": "<receiptId>",
"usedEntryIds": ["…", "…"],
"ignoredEntryIds": ["…"],
"appliedProcedureIds": ["…"],
"skippedProcedureIds": ["…"]
}| Field | Type | Notes |
|---|---|---|
workspaceId | GUID | Required. |
runId | string | The run of the recall being rated. |
receiptId | GUID | With it, every used ID must be one that receipt delivered — otherwise 400 RECEIPT_MISMATCH and nothing is recorded. Without it, used IDs the run was never delivered are ignored. |
agentId | string | Optional; omit to use the credential's default agent. |
applicationId | GUID | Optional. |
usedEntryIds, ignoredEntryIds | GUID[] | Memory entries. |
appliedProcedureIds, skippedProcedureIds | GUID[] | Procedures. |
Response:
{ "runId": "run-1", "usedCount": 2, "ignoredCount": 1, "appliedProcedures": 1, "skippedProcedures": 1 }MCP: record_retrieval_feedback. SDKs: feedback(). .NET: RecordRetrievalFeedbackAsync.