Appearance
POST /v1/memory/rules/evaluate
POST /v1/memory/rules/evaluate
Evaluates active (and optional shadow) rules against runtime context.
Request schema
Required:
context
Common fields:
tenant_id?: stringscope?: stringcontext: objectinclude_shadow?: boolean(defaulttrue)limit?: number(default 50, max 200)
Example request
bash
curl -sS "$BASE_URL/v1/memory/rules/evaluate" \
-H 'content-type: application/json' \
-d '{
"tenant_id":"default",
"scope":"support",
"context":{"intent":"escalation","agent":{"id":"agent-1"}},
"include_shadow":true,
"limit":50
}' | jqResponse schema
Key response fields:
scopetenant_idconsideredmatchedapplied(policy patch result)agent_visibility_summary(when available)
Idempotency
- Idempotent read-style evaluation for the same context and rule state.
- Result changes only when rule definitions/state are updated.
Rate limit
- Uses recall-class limiter and recall tenant quota.
- Treat
429as transient; do not retry invalid payloads.
Error codes
Common errors:
invalid_request(400)unauthorized/forbidden(401/403)rate_limited_*(429)
Replay IDs to persist
request_idtenant_idscope- caller
run_id - winning rule identifiers from
applied.sources[]