Agent Memory
API Reference

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.

MethodPathCapability
POST/v1/outcomesfeedback
POST/v1/retrieval-feedbackfeedback

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
  }'
FieldTypeNotes
workspaceIdGUIDRequired (400 without it).
runIdstringThe run the outcome belongs to.
receiptIdGUIDCredits exactly what that recall delivered. Without it, everything the run was delivered is credited.
applicationIdGUIDOptional application scope.
buildSuccessboolDid the output build or compile?
testPassRatenumber0.0–1.0. Omit when no tests ran.
deploySuccessboolDid the deployment succeed?
errorCountintBuild and lint errors. Default 0.
warningCountintDefault 0.
userRatingint1–5.
notesstringFree-form notes.
measuredAttimestampWhen 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": ["…"]
}
FieldTypeNotes
workspaceIdGUIDRequired.
runIdstringThe run of the recall being rated.
receiptIdGUIDWith 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.
agentIdstringOptional; omit to use the credential's default agent.
applicationIdGUIDOptional.
usedEntryIds, ignoredEntryIdsGUID[]Memory entries.
appliedProcedureIds, skippedProcedureIdsGUID[]Procedures.

Response:

{ "runId": "run-1", "usedCount": 2, "ignoredCount": 1, "appliedProcedures": 1, "skippedProcedures": 1 }

MCP: record_retrieval_feedback. SDKs: feedback(). .NET: RecordRetrievalFeedbackAsync.

On this page