curl -X POST "https://api.memanto.ai/agents/my-agent/policy/preset" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "balanced"
}'
{
"agent_id": "my-agent",
"preset": "balanced",
"policy": {
"version": 1,
"retention": {
"context": "7d",
"event": "30d",
"error": "30d",
"observation": "60d",
"commitment": "90d",
"artifact": "180d"
},
"rules": [
{
"name": "pinned",
"match": {
"tags": [
"pinned"
]
},
"expire_after": "never"
},
{
"name": "scratch-notes",
"match": {
"tags": [
"scratch",
"temp"
]
},
"expire_after": "3d"
},
{
"name": "low-confidence-guesses",
"match": {
"provenance": [
"inferred"
],
"confidence_below": 0.5
},
"expire_after": "14d"
}
],
"purge_expired_after": "never"
}
}
Expiry Policy
Apply Policy Preset
Replace the agent’s policy with a preset.
POST
/
agents
/
{agent_id}
/
policy
/
preset
curl -X POST "https://api.memanto.ai/agents/my-agent/policy/preset" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "balanced"
}'
{
"agent_id": "my-agent",
"preset": "balanced",
"policy": {
"version": 1,
"retention": {
"context": "7d",
"event": "30d",
"error": "30d",
"observation": "60d",
"commitment": "90d",
"artifact": "180d"
},
"rules": [
{
"name": "pinned",
"match": {
"tags": [
"pinned"
]
},
"expire_after": "never"
},
{
"name": "scratch-notes",
"match": {
"tags": [
"scratch",
"temp"
]
},
"expire_after": "3d"
},
{
"name": "low-confidence-guesses",
"match": {
"provenance": [
"inferred"
],
"confidence_below": 0.5
},
"expire_after": "14d"
}
],
"purge_expired_after": "never"
}
}
Overview
Replaces the agent’s policy with a preset. Like Set Policy, it doesn’t expire anything by itself.Authentication
Your Memanto Cloud API key (
mk_...). See Authentication.Path Parameters
Body
curl -X POST "https://api.memanto.ai/agents/my-agent/policy/preset" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "balanced"
}'
{
"agent_id": "my-agent",
"preset": "balanced",
"policy": {
"version": 1,
"retention": {
"context": "7d",
"event": "30d",
"error": "30d",
"observation": "60d",
"commitment": "90d",
"artifact": "180d"
},
"rules": [
{
"name": "pinned",
"match": {
"tags": [
"pinned"
]
},
"expire_after": "never"
},
{
"name": "scratch-notes",
"match": {
"tags": [
"scratch",
"temp"
]
},
"expire_after": "3d"
},
{
"name": "low-confidence-guesses",
"match": {
"provenance": [
"inferred"
],
"confidence_below": 0.5
},
"expire_after": "14d"
}
],
"purge_expired_after": "never"
}
}