> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Apply Policy Preset

> Replace the agent's policy with a preset.

## Overview

Replaces the agent's policy with a preset. Like Set Policy, it doesn't expire anything by itself.

## Authentication

**x-api-key** `string` *required*

Your Memanto Cloud API key (`mk_...`). See [Authentication](https://docs.memanto.ai/cloud/api/introduction.md#authentication).

## Path Parameters

**agent\_id** `string` *required*

The agent's ID.

## Body

**name** `string` *required*

`conservative`, `balanced` or `aggressive`.

```bash cURL theme={null}
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"
  }'
```

```json 200 - OK theme={null}
{
  "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"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.