curl "http://localhost:8000/api/v2/agents/my-agent/policy/presets/balanced" \
-H "X-Session-Token: your_session_token"
{
"name": "balanced",
"description": "Sensible defaults for a working agent: transient state ages out in weeks, semantic knowledge in months, durable truths never.",
"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"
}
}
{
"detail": "Unknown preset 'nope'. Must be one of: aggressive, balanced, conservative."
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Expiry Policy
Get Policy Preset
Return one preset’s full policy without adopting it.
GET
/
api
/
v2
/
agents
/
{agent_id}
/
policy
/
presets
/
{name}
curl "http://localhost:8000/api/v2/agents/my-agent/policy/presets/balanced" \
-H "X-Session-Token: your_session_token"
{
"name": "balanced",
"description": "Sensible defaults for a working agent: transient state ages out in weeks, semantic knowledge in months, durable truths never.",
"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"
}
}
{
"detail": "Unknown preset 'nope'. Must be one of: aggressive, balanced, conservative."
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Overview
Returns a single preset’s complete policy — retention table, rules, and purge window — without writing anything to the agent. This is what makes an informed confirmation possible: show the user exactly what they are about to adopt before they commit.Authentication
API clients do not send an API key orAuthorization header.
string
required
Session token from Activate Agent. Must match
agent_id.Path Parameters
string
required
The unique identifier of the agent.
string
required
Preset name:
conservative, balanced, or aggressive.curl "http://localhost:8000/api/v2/agents/my-agent/policy/presets/balanced" \
-H "X-Session-Token: your_session_token"
{
"name": "balanced",
"description": "Sensible defaults for a working agent: transient state ages out in weeks, semantic knowledge in months, durable truths never.",
"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"
}
}
{
"detail": "Unknown preset 'nope'. Must be one of: aggressive, balanced, conservative."
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Notes
- Read-only. The agent’s stored policy is untouched.
- Unset match conditions are omitted rather than returned as
null. - The returned
policyobject is shaped exactly like a Set Expiry Policy body, so it can be edited and sent straight back.
Next Steps
- Apply Policy Preset to adopt it as-is
- Set Expiry Policy to adopt a modified version