> ## 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.

# Get Policy

> The agent's expiry policy.

## Overview

Returns the agent's expiry policy. `is_empty` is `true` when nothing would ever expire. The policy format (`retention`, `rules`, `purge_expired_after`) is the same as on Memanto local; see [Set Policy](https://docs.memanto.ai/api-reference/policy/set-policy.md) and [Memory lifecycle](https://docs.memanto.ai/reference/memory-lifecycle.md).

## 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.

```bash cURL theme={null}
curl -X GET "https://api.memanto.ai/agents/my-agent/policy" \
  -H "x-api-key: $MEMANTO_API_KEY"
```

```json 200 - OK theme={null}
{
  "agent_id": "my-agent",
  "policy": {
    "version": 1,
    "retention": {
      "context": "30d",
      "event": "90d"
    },
    "rules": [
      {
        "name": "pin-instructions",
        "match": {
          "type": [
            "instruction"
          ]
        },
        "expire_after": "never"
      }
    ],
    "purge_expired_after": "never"
  },
  "is_empty": false
}
```


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