TypeScript SDK
import { MemoryClient } from '@xtraceai/memory';
const client = new MemoryClient({
apiKey: process.env.XTRACE_API_KEY!,
orgId: process.env.XTRACE_ORG_ID!,
});
// Hard delete: the point is removed outright (no tombstone). Afterwards
// get returns 404 and the row is gone from list/search; a second delete
// also returns 404 (idempotent by absence).
await client.memories.delete('5b0d0f7d-d502-45d5-847d-e19512b5c517');curl --request DELETE \
--url https://api.production.xtrace.ai/v1/memories/{memory_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.production.xtrace.ai/v1/memories/{memory_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.production.xtrace.ai/v1/memories/{memory_id}', 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.production.xtrace.ai/v1/memories/{memory_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.production.xtrace.ai/v1/memories/{memory_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.production.xtrace.ai/v1/memories/{memory_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.production.xtrace.ai/v1/memories/{memory_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}memories
Delete memory
Hard-delete a memory — fact, artifact, or episode.
Removes the record outright (no soft-delete / tombstone). A
deleted fact disappears from supersede chains; the revision walker
(GET /{id}/revisions) tolerates the missing node and simply
stops there. Idempotent: the first delete returns 204, subsequent
deletes return 404 (the record is gone, so the existence check
below fails).
DELETE
/
v1
/
memories
/
{memory_id}
TypeScript SDK
import { MemoryClient } from '@xtraceai/memory';
const client = new MemoryClient({
apiKey: process.env.XTRACE_API_KEY!,
orgId: process.env.XTRACE_ORG_ID!,
});
// Hard delete: the point is removed outright (no tombstone). Afterwards
// get returns 404 and the row is gone from list/search; a second delete
// also returns 404 (idempotent by absence).
await client.memories.delete('5b0d0f7d-d502-45d5-847d-e19512b5c517');curl --request DELETE \
--url https://api.production.xtrace.ai/v1/memories/{memory_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.production.xtrace.ai/v1/memories/{memory_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.production.xtrace.ai/v1/memories/{memory_id}', 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.production.xtrace.ai/v1/memories/{memory_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.production.xtrace.ai/v1/memories/{memory_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.production.xtrace.ai/v1/memories/{memory_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.production.xtrace.ai/v1/memories/{memory_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}⌘I