> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-beta.getzep.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server.

# Update Agent Literal Policy

PUT https://api.getzep.com/api/v4/agents/{agent_uuid}/literal-policy
Content-Type: application/json

Reference: https://docs-beta.getzep.com/sdk-reference/agent/literal-policy/update

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key  `) — Type "Api-Key" followed by a space and the project API key.

## Request

### Path parameters

- `agent_uuid` (string, required) — Agent UUID

### Body (application/json)

This endpoint expects a v4.UpdateAgentLiteralPolicyRequest.

- `allowlisted_classes` (v4.AgentLiteralPolicyClasses, required) — Typed reusable literal classes.
- `allowlisted_values` (v4.AgentLiteralPolicyValues, required) — Exact reusable values scoped by tools and environments.
- `default` (enum, required) — The remediation for literals that are not explicitly allowed.
  - Allowed values: `parameterize`, `remove`, `reject`
- `expected_revision` (integer, optional) — The current literal-policy revision used for optimistic concurrency.

## Response

### 200

OK

- `allowlisted_classes` (v4.AgentLiteralPolicyClasses, optional) — Typed classes that the policy may preserve.
- `allowlisted_values` (v4.AgentLiteralPolicyValues, optional) — Exact reusable values that the policy may preserve when applicability matches.
- `created_at` (string, optional) — The time this explicit revision was created. Omitted for revision zero.
- `created_by_principal_id` (string, optional) — The principal identifier that created this explicit revision. Empty for revision zero.
- `created_by_principal_type` (string, optional) — The principal type that created this explicit revision. Empty for revision zero.
- `default` (string, optional) — The remediation for literals that are not explicitly allowed.
- `digest` (string, optional) — SHA-256 of the canonical policy JSON.
- `revision` (integer, optional) — The immutable policy revision. Revision zero is the built-in strict default.

## Errors

### 400 Bad Request Error

Bad Request

- `error` (v4.ErrorBody, optional)

### 401 Unauthorized Error

Unauthorized

- `error` (v4.ErrorBody, optional)

### 403 Forbidden Error

Forbidden

- `error` (v4.ErrorBody, optional)

### 404 Not Found Error

Not Found

- `error` (v4.ErrorBody, optional)

### 409 Conflict Error

Conflict

- `error` (v4.ErrorBody, optional)

## Types

### v4.AgentLiteralPolicyClasses

- `environments` (list of string, required) — Reusable environment literal classes.
- `tools` (list of string, required) — Reusable tool literal classes.

### v4.AgentLiteralPolicyValues

- `environments` (list of string, required) — Exact reusable values eligible for a permitted environment literal class.
- `tools` (list of string, required) — Exact reusable values eligible for a permitted tool literal class.

### v4.ErrorBody

- `code` (string, optional)
- `details` (map from string to any, optional)
- `message` (string, optional)
- `param` (string, optional)
- `request_id` (string, optional)

## Examples

**Request**

```json
{
  "allowlisted_classes": {
    "environments": [
      "string"
    ],
    "tools": [
      "string"
    ]
  },
  "allowlisted_values": {
    "environments": [
      "string"
    ],
    "tools": [
      "string"
    ]
  },
  "default": "parameterize"
}
```

**Response**

```json
{
  "allowlisted_classes": {
    "environments": [
      "string"
    ],
    "tools": [
      "string"
    ]
  },
  "allowlisted_values": {
    "environments": [
      "string"
    ],
    "tools": [
      "string"
    ]
  },
  "created_at": "string",
  "created_by_principal_id": "string",
  "created_by_principal_type": "string",
  "default": "string",
  "digest": "string",
  "revision": 1
}
```