curl --request POST \
--url https://api.mnemom.ai/v1/policies/evaluate/historical \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"card_json": {},
"limit": 50
}
'import requests
url = "https://api.mnemom.ai/v1/policies/evaluate/historical"
payload = {
"agent_id": "<string>",
"card_json": {},
"limit": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '<string>', card_json: {}, limit: 50})
};
fetch('https://api.mnemom.ai/v1/policies/evaluate/historical', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mnemom.ai/v1/policies/evaluate/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '<string>',
'card_json' => [
],
'limit' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mnemom.ai/v1/policies/evaluate/historical"
payload := strings.NewReader("{\n \"agent_id\": \"<string>\",\n \"card_json\": {},\n \"limit\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mnemom.ai/v1/policies/evaluate/historical")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"<string>\",\n \"card_json\": {},\n \"limit\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mnemom.ai/v1/policies/evaluate/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"<string>\",\n \"card_json\": {},\n \"limit\": 50\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"card_id": "<string>",
"total_traces": 123,
"results": [
{
"trace_id": "<string>",
"verdict": "<string>",
"violations": [
{}
],
"warnings": [
{}
],
"skipped": true
}
],
"summary": {
"pass": 123,
"warn": 123,
"fail": 123,
"skipped": 123
},
"message": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Evaluate a card against an agent's historical traces
Replay an agent’s recent AIP traces through the policy derived from a card to identify what would have been blocked, escalated, or flagged.
curl --request POST \
--url https://api.mnemom.ai/v1/policies/evaluate/historical \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"card_json": {},
"limit": 50
}
'import requests
url = "https://api.mnemom.ai/v1/policies/evaluate/historical"
payload = {
"agent_id": "<string>",
"card_json": {},
"limit": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '<string>', card_json: {}, limit: 50})
};
fetch('https://api.mnemom.ai/v1/policies/evaluate/historical', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mnemom.ai/v1/policies/evaluate/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '<string>',
'card_json' => [
],
'limit' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mnemom.ai/v1/policies/evaluate/historical"
payload := strings.NewReader("{\n \"agent_id\": \"<string>\",\n \"card_json\": {},\n \"limit\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mnemom.ai/v1/policies/evaluate/historical")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"<string>\",\n \"card_json\": {},\n \"limit\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mnemom.ai/v1/policies/evaluate/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"<string>\",\n \"card_json\": {},\n \"limit\": 50\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"card_id": "<string>",
"total_traces": 123,
"results": [
{
"trace_id": "<string>",
"verdict": "<string>",
"violations": [
{}
],
"warnings": [
{}
],
"skipped": true
}
],
"summary": {
"pass": 123,
"warn": 123,
"fail": 123,
"skipped": 123
},
"message": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
Supabase JWT token in Authorization: Bearer header
Body
Agent whose historical traces will be replayed. The caller must be an owner, admin or member of the agent's org; otherwise the response is the same 404 as for an unknown agent.
Optional hypothetical alignment card to evaluate against. If omitted, the agent's current canonical card is used (404 if the agent has none and no card_json is supplied).
Maximum number of recent traces to evaluate (capped at 200).
x <= 200Response
Historical evaluation result
Card the traces were evaluated against.
Number of traces returned by the evaluation.
Per-trace verdicts (or {skipped:true} for traces with no tool calls).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Present only when the agent has no historical traces.