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

# Zep API reference

> API reference for the Zep plugin in Corsair: every `zep.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Agents

### create

`agents.create`

Create Agent. (POST /agents)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.create({ agent_id: 'example', name: 'example', security_domain: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | The developer-assigned Agent identifier, unique within the project. |
| `deployment_id` | `string` | No | The customer deployment this Agent represents. |
| `description` | `string` | No | A human-readable description of the Agent. |
| `memory_settings` | `object` | No | — |
| `metadata` | `Record<string, any>` | No | Developer metadata used to organize and filter Agents. |
| `name` | `string` | Yes | The Agent's display name. |
| `security_domain` | `string` | Yes | The immutable boundary within which Skills may be synthesized. 1 to 200 characters of lowercase letters, digits, and the characters : . - \_ |
| `version` | `string` | No | The customer deployment version this Agent represents. If you omit it, the version is "default". |

> [accordion] memory\_settings full type
>
> ```ts theme={null}
> {
>   admission_evaluation_requirements?: {
>     requirements: {
>       controlled?: boolean,
>       environment?: string,
>       evaluated_by: string,
>       evaluator_version: string,
>       result: string
>     }[],
>     task_family: string
>   }[],
>   approval?: manual | auto,
>   approval_minimum_attempt_families?: number,
>   approval_required_tools?: string[],
>   auto_approval_task_families?: string[],
>   compilation_mode?: scheduled | manual | on_close,
>   provisional_expiry_days?: number,
>   provisional_skill_limit?: number,
>   retention_days?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string \| null` | No | The developer-assigned Agent identifier, unique within the project. |
| `created_at` | `string \| null` | No | The time the Agent was created. |
| `deployment_id` | `string \| null` | No | The customer deployment this Agent represents. |
| `description` | `string \| null` | No | A human-readable description of the Agent. |
| `memory_settings` | `object \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used to organize and filter Agents. |
| `name` | `string \| null` | No | The Agent's display name. |
| `revision` | `number \| null` | No | The revision required by the next update or delete request. |
| `security_domain` | `string \| null` | No | The immutable boundary within which Skills may be synthesized. |
| `status` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | The time the Agent was last updated. |
| `uuid` | `string \| null` | No | The stable identifier of the Agent. |
| `version` | `string \| null` | No | The customer deployment version this Agent represents. |

> [accordion] memory\_settings full type
>
> ```ts theme={null}
> {
>   admission_evaluation_requirements?: {
>     requirements?: {
>       controlled?: boolean | null,
>       environment?: string | null,
>       evaluated_by?: string | null,
>       evaluator_version?: string | null,
>       result?: string | null
>     }[] | null,
>     task_family?: string | null
>   }[] | null,
>   approval?: string | null,
>   approval_minimum_attempt_families?: number | null,
>   approval_required_tools?: string[] | null,
>   auto_approval_task_families?: string[] | null,
>   compilation_mode?: string | null,
>   provisional_expiry_days?: number | null,
>   provisional_skill_limit?: number | null,
>   retention_days?: number | null
> } | null
> ```

***

### declareBreakingChange

`agents.declareBreakingChange`

Declare a breaking Agent deployment change. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.agents.declareBreakingChange({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_revision: 1, version: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `expected_revision` | `number` | Yes | The developer supplies the current Agent revision for optimistic concurrency. It must be at least 1. |
| `version` | `string` | Yes | The developer supplies the new deployment version. It must differ from the current version. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `affected_skill_count` | `number \| null` | No | The service returns the number of Skills affected by the declaration. |
| `agent_uuid` | `string \| null` | No | The service returns the UUID of the Agent that received this declaration. |
| `revision` | `number \| null` | No | The service returns the Agent revision produced by this declaration, stable on replay. |
| `uuid` | `string \| null` | No | The service assigns the UUID that identifies this declaration. |
| `version` | `string \| null` | No | The service returns the deployment version recorded by this declaration. |

***

### delete

`agents.delete`

Delete Agent. Cannot be undone. (DELETE /agents/\{agent\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.agents.delete({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_revision: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `expected_revision` | `number` | Yes | The current Agent revision used for optimistic concurrency. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### get

`agents.get`

Get Agent. (GET /agents/\{agent\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string \| null` | No | The developer-assigned Agent identifier, unique within the project. |
| `created_at` | `string \| null` | No | The time the Agent was created. |
| `deployment_id` | `string \| null` | No | The customer deployment this Agent represents. |
| `description` | `string \| null` | No | A human-readable description of the Agent. |
| `memory_settings` | `object \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used to organize and filter Agents. |
| `name` | `string \| null` | No | The Agent's display name. |
| `revision` | `number \| null` | No | The revision required by the next update or delete request. |
| `security_domain` | `string \| null` | No | The immutable boundary within which Skills may be synthesized. |
| `status` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | The time the Agent was last updated. |
| `uuid` | `string \| null` | No | The stable identifier of the Agent. |
| `version` | `string \| null` | No | The customer deployment version this Agent represents. |

> [accordion] memory\_settings full type
>
> ```ts theme={null}
> {
>   admission_evaluation_requirements?: {
>     requirements?: {
>       controlled?: boolean | null,
>       environment?: string | null,
>       evaluated_by?: string | null,
>       evaluator_version?: string | null,
>       result?: string | null
>     }[] | null,
>     task_family?: string | null
>   }[] | null,
>   approval?: string | null,
>   approval_minimum_attempt_families?: number | null,
>   approval_required_tools?: string[] | null,
>   auto_approval_task_families?: string[] | null,
>   compilation_mode?: string | null,
>   provisional_expiry_days?: number | null,
>   provisional_skill_limit?: number | null,
>   retention_days?: number | null
> } | null
> ```

***

### getContext

`agents.getContext`

Get Agent context. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.getContext({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `environments` | `object[]` | No | The developer supplies environment names used by the Skill. At most 32. |
| `kind` | `string` | No | The developer supplies a Skill kind. At most 64. |
| `max_characters` | `number` | No | The developer sets the maximum number of characters in the context response. |
| `models` | `object[]` | No | The developer supplies models used for this evaluation. At most 32. |
| `objective` | `string` | No | The developer supplies the task-instance objective. At most 512. |
| `task_family` | `string` | No | The developer supplies the task-family slug. At most 128. |
| `tools` | `object[]` | No | The developer supplies tool names used by the Skill. At most 32. |
| `trace_uuid` | `string` | No | The developer supplies the UUID of the source Trace. |

> [accordion] environments full type
>
> ```ts theme={null}
> {
>   name: string,
>   version?: string
> }[]
> ```

> [accordion] models full type
>
> ```ts theme={null}
> {
>   name: string,
>   version?: string
> }[]
> ```

> [accordion] tools full type
>
> ```ts theme={null}
> {
>   name: string,
>   version?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `context` | `string \| null` | No | The service returns context for this result. |
| `objective` | `string \| null` | No | The service returns the task-instance objective. |
| `partial_sources` | `object[] \| null` | No | The service returns sources that it could not include in full. |
| `request_id` | `string \| null` | No | The service returns the UUID that identifies this context request. |
| `skipped` | `object[] \| null` | No | The service returns the Skills that it skipped. |
| `snapshot` | `object[] \| null` | No | The service returns a snapshot of the source data. |
| `task_family` | `string \| null` | No | The service returns the task-family slug. |
| `trace_uuid` | `string \| null` | No | The service returns the UUID of the source Trace. |
| `truncated` | `boolean \| null` | No | The service sets this to true when the context exceeds its output limit. |

> [accordion] partial\_sources full type
>
> ```ts theme={null}
> {
>   reason?: string | null,
>   source?: string | null,
>   task_uuid?: string | null
> }[] | null
> ```

> [accordion] skipped full type
>
> ```ts theme={null}
> {
>   reason?: string | null,
>   skill_uuid?: string | null,
>   version?: number | null
> }[] | null
> ```

> [accordion] snapshot full type
>
> ```ts theme={null}
> {
>   artifact_sha256?: string | null,
>   evidence_citations?: string[] | null,
>   evidence_counts?: {
>     contradicting?: number | null,
>     neutral?: number | null,
>     supporting?: number | null
>   } | null,
>   rank?: number | null,
>   skill_uuid?: string | null,
>   version?: number | null
> }[] | null
> ```

***

### learning.get

`agents.learning.get`

Get Agent Learning State. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.learning.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', task_family: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `task_family` | `string` | Yes | Task family |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `approval` | `string \| null` | No | The service returns the approval mode. Valid values are auto and manual. The default is auto. |
| `compilation_mode` | `string \| null` | No | The service returns the Agent's learning mode. Valid values are scheduled, manual, and on\_close. The default is scheduled. |
| `compilation_pending` | `boolean \| null` | No | The service sets this to true while a learning run waits to start or runs. Skills from that run are not yet available. |
| `eligible_trace_count` | `number \| null` | No | The service reports the number of Traces that can support learning. |
| `minimum_attempt_families` | `number \| null` | No | The service reports how many distinct attempt families a run needs. The default is 3 in scheduled mode and 1 in on\_close mode. |
| `next_step` | `string \| null` | No | The service returns text that tells a person what to do next. Code must not treat this text as a stable value. |
| `required_evaluations` | `string[] \| null` | No | The service returns the evaluations that each candidate must pass. |
| `task_family` | `string \| null` | No | The service returns the category whose learning progress this record describes. |

***

### learning.listRuns

`agents.learning.listRuns`

List Agent Skill Compilation Outcomes. List durable learning-run outcomes for an Agent. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.learning.listRuns({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `task_family` | `string` | No | Task family |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null` | No | — |
| `total_size` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   attempts?: number | null,
>   candidate_count?: number | null,
>   compilation_identity?: string | null,
>   compilation_window_uuid?: string | null,
>   created_at?: string | null,
>   decision?: string | null,
>   proposal_count?: number | null,
>   reason_text?: string | null,
>   rejected_add_count?: number | null,
>   rejection_class?: string | null,
>   stage?: string | null,
>   task_family?: string | null,
>   trace_count?: number | null,
>   uuid?: string | null
> }[] | null
> ```

***

### list

`agents.list`

List Agents. (POST /agents/list)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `created_at \| updated_at \| name` | No | — |
| `order` | `asc \| desc` | No | — |
| `agent_id` | `string` | No | Filters to the exact developer-assigned Agent identifier. |
| `deployment_id` | `string` | No | The developer supplies filters to the exact deployment identifier. |
| `metadata` | `Record<string, any>` | No | Filters to Agents whose metadata contains these key-value pairs. |
| `search` | `string` | No | The developer supplies filters to Agents whose name, Agent identifier, deployment identifier, or deployment version contains this text. Matching is case-insensitive. |
| `status` | `active \| deleting \| deletion_failed` | No | — |
| `version` | `string` | No | Filters to the exact deployment version. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The service returns the Agents on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | The total number of Agents matching the filters and authorization scope. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_id?: string | null,
>   created_at?: string | null,
>   deployment_id?: string | null,
>   description?: string | null,
>   memory_settings?: {
>     admission_evaluation_requirements?: {
>       requirements?: {
>         controlled?: boolean | null,
>         environment?: string | null,
>         evaluated_by?: string | null,
>         evaluator_version?: string | null,
>         result?: string | null
>       }[] | null,
>       task_family?: string | null
>     }[] | null,
>     approval?: string | null,
>     approval_minimum_attempt_families?: number | null,
>     approval_required_tools?: string[] | null,
>     auto_approval_task_families?: string[] | null,
>     compilation_mode?: string | null,
>     provisional_expiry_days?: number | null,
>     provisional_skill_limit?: number | null,
>     retention_days?: number | null
>   } | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   revision?: number | null,
>   security_domain?: string | null,
>   status?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   version?: string | null
> }[] | null
> ```

***

### literalPolicy.get

`agents.literalPolicy.get`

Get Agent Literal Policy. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.literalPolicy.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowlisted_classes` | `object \| null` | No | — |
| `allowlisted_values` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | The time this explicit revision was created. Omitted for revision zero. |
| `created_by_principal_id` | `string \| null` | No | The principal identifier that created this explicit revision. Empty for revision zero. |
| `created_by_principal_type` | `string \| null` | No | The principal type that created this explicit revision. Empty for revision zero. |
| `default` | `string \| null` | No | The remediation for literals that are not explicitly allowed. |
| `digest` | `string \| null` | No | SHA-256 of the canonical policy JSON. |
| `revision` | `number \| null` | No | The immutable policy revision. Revision zero is the built-in strict default. |

> [accordion] allowlisted\_classes full type
>
> ```ts theme={null}
> {
>   environments?: string[] | null,
>   tools?: string[] | null
> } | null
> ```

> [accordion] allowlisted\_values full type
>
> ```ts theme={null}
> {
>   environments?: string[] | null,
>   tools?: string[] | null
> } | null
> ```

***

### literalPolicy.update

`agents.literalPolicy.update`

Update Agent Literal Policy. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.literalPolicy.update({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	allowlisted_classes: {
		environments: ['example'],
		tools: ['example'],
	},
	allowlisted_values: {
		environments: ['example'],
		tools: ['example'],
	},
	default: 'parameterize',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `allowlisted_classes` | `object` | Yes | — |
| `allowlisted_values` | `object` | Yes | — |
| `default` | `parameterize \| remove \| reject` | Yes | The remediation for literals that are not explicitly allowed. |
| `expected_revision` | `number` | No | The current literal-policy revision used for optimistic concurrency. |

> [accordion] allowlisted\_classes full type
>
> ```ts theme={null}
> {
>   environments: string[],
>   tools: string[]
> }
> ```

> [accordion] allowlisted\_values full type
>
> ```ts theme={null}
> {
>   environments: string[],
>   tools: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowlisted_classes` | `object \| null` | No | — |
| `allowlisted_values` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | The time this explicit revision was created. Omitted for revision zero. |
| `created_by_principal_id` | `string \| null` | No | The principal identifier that created this explicit revision. Empty for revision zero. |
| `created_by_principal_type` | `string \| null` | No | The principal type that created this explicit revision. Empty for revision zero. |
| `default` | `string \| null` | No | The remediation for literals that are not explicitly allowed. |
| `digest` | `string \| null` | No | SHA-256 of the canonical policy JSON. |
| `revision` | `number \| null` | No | The immutable policy revision. Revision zero is the built-in strict default. |

> [accordion] allowlisted\_classes full type
>
> ```ts theme={null}
> {
>   environments?: string[] | null,
>   tools?: string[] | null
> } | null
> ```

> [accordion] allowlisted\_values full type
>
> ```ts theme={null}
> {
>   environments?: string[] | null,
>   tools?: string[] | null
> } | null
> ```

***

### planSplit

`agents.planSplit`

Plan an Agent split. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.planSplit({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	destinations: [{
		agent: { agent_id: 'example', name: 'example', security_domain: 'example' },
		skills: [{ skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_version_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', version: 1 }],
	}],
	expected_revision: 1,
	rationale: 'example',
	review_acknowledged: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Source Agent UUID |
| `destinations` | `object[]` | Yes | The developer lists 1 to 100 destination Agents. |
| `expected_revision` | `number` | Yes | The developer supplies the current revision used for optimistic concurrency. At least 1. |
| `rationale` | `string` | Yes | The developer explains the requested change. The limit is 2,000 characters. |
| `review_acknowledged` | `boolean` | Yes | The developer sets this to true to confirm that the review is complete. |

> [accordion] destinations full type
>
> ```ts theme={null}
> {
>   agent: {
>     agent_id: string,
>     deployment_id?: string,
>     description?: string,
>     memory_settings?: {
>       admission_evaluation_requirements?: {
>         requirements: {
>           controlled?: boolean,
>           environment?: string,
>           evaluated_by: string,
>           evaluator_version: string,
>           result: string
>         }[],
>         task_family: string
>       }[],
>       approval?: manual | auto,
>       approval_minimum_attempt_families?: number,
>       approval_required_tools?: string[],
>       auto_approval_task_families?: string[],
>       compilation_mode?: scheduled | manual | on_close,
>       provisional_expiry_days?: number,
>       provisional_skill_limit?: number,
>       retention_days?: number
>     },
>     metadata?: Record<string, any>,
>     name: string,
>     security_domain: string,
>     version?: string
>   },
>   skills: {
>     skill_uuid: string,
>     skill_version_uuid: string,
>     version: number
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `authorizes_agent_creation` | `boolean \| null` | No | The service reports whether the plan authorizes Agent creation. |
| `authorizes_publication` | `boolean \| null` | No | The service reports whether the plan authorizes Skill publication. |
| `creates_resources` | `boolean \| null` | No | A split plan is not human approval and grants no authority for later commands. |
| `destinations` | `object[] \| null` | No | The service returns UUIDs of the destination Agents. |
| `rationale` | `string \| null` | No | The service returns the reason for the requested split. |
| `review_acknowledged` | `boolean \| null` | No | The service reports whether the developer confirmed the review. |
| `source` | `object \| null` | No | — |

> [accordion] destinations full type
>
> ```ts theme={null}
> {
>   agent?: {
>     agent_id?: string | null,
>     deployment_id?: string | null,
>     description?: string | null,
>     memory_settings?: {
>       admission_evaluation_requirements?: {
>         requirements?: {
>           controlled?: boolean | null,
>           environment?: string | null,
>           evaluated_by?: string | null,
>           evaluator_version?: string | null,
>           result?: string | null
>         }[] | null,
>         task_family?: string | null
>       }[] | null,
>       approval?: string | null,
>       approval_minimum_attempt_families?: number | null,
>       approval_required_tools?: string[] | null,
>       auto_approval_task_families?: string[] | null,
>       compilation_mode?: string | null,
>       provisional_expiry_days?: number | null,
>       provisional_skill_limit?: number | null,
>       retention_days?: number | null
>     } | null,
>     metadata?: Record<string, any> | null,
>     name?: string | null,
>     security_domain?: string | null,
>     version?: string | null
>   } | null,
>   skills?: {
>     package_name?: string | null,
>     skill_id?: string | null,
>     skill_uuid?: string | null,
>     skill_version_uuid?: string | null,
>     status?: string | null,
>     version?: number | null
>   }[] | null
> }[] | null
> ```

> [accordion] source full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   revision?: number | null
> } | null
> ```

***

### skillCandidates.evaluate

`agents.skillCandidates.evaluate`

Record Agent Skill Candidate Evaluation.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skillCandidates.evaluate({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	review_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	candidate_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	evaluated_by: 'customer',
	evaluator_version: 'example',
	expected_revision: 1,
	verdict: 'succeeded',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `review_uuid` | `string` | Yes | Candidate review UUID |
| `candidate_uuid` | `string` | Yes | Candidate UUID |
| `controlled_test` | `boolean` | No | The developer sets this to true when a controlled test produced the result. |
| `environment` | `string` | No | The developer supplies the environment for this evaluation. |
| `evaluated_by` | `customer \| tool \| offline_corpus \| policy` | Yes | The developer selects the evaluation source. Valid values are customer, tool, offline\_corpus, policy. |
| `evaluator_version` | `string` | Yes | The developer supplies the version of the evaluation rule. |
| `evidence_reference` | `string` | No | The developer links this evaluation to an evidence record. |
| `expected_revision` | `number` | Yes | The developer supplies the current revision used for optimistic concurrency. At least 1. |
| `metrics` | `Record<string, number>` | No | The developer supplies evaluation metrics. |
| `verdict` | `succeeded \| failed \| partial \| unknown` | Yes | The developer supplies evaluation verdict. Valid values are succeeded, failed, partial, unknown. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `candidate_uuid` | `string \| null` | No | The service returns the UUID of the candidate that this evaluation covers. |
| `controlled_test` | `boolean \| null` | No | The service reports whether a controlled test produced the result. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `environment` | `string \| null` | No | The service returns the environment used for this evaluation. |
| `evaluated_by` | `string \| null` | No | The service returns the evaluation source. Valid values are customer, tool, offline\_corpus, and policy. |
| `evaluator_version` | `string \| null` | No | The service returns the version of the evaluation rule. |
| `evidence_reference` | `string \| null` | No | The service returns the link to supporting evidence, when one exists. |
| `metrics` | `Record<string, number> \| null` | No | The service returns evaluation metrics. |
| `review_uuid` | `string \| null` | No | The service returns the UUID of the review that produced this evaluation. |
| `revision` | `number \| null` | No | The service returns the current revision number. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |
| `verdict` | `string \| null` | No | The service returns the evaluation verdict. |

***

### skillCandidates.get

`agents.skillCandidates.get`

Get Agent Skill Candidate Review. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skillCandidates.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', review_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `review_uuid` | `string` | Yes | Candidate review UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `candidate_count` | `number \| null` | No | The service returns the number of related resources. |
| `candidates` | `object[] \| null` | No | The service returns candidate Skills. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `import_review_required` | `boolean \| null` | No | ImportReviewRequired reports whether any evidence import requires approval. |
| `reason_code` | `string \| null` | No | The service returns the code that explains this result. |
| `results` | `object[] \| null` | No | The service returns evaluation results. |
| `reviewed_at` | `string \| null` | No | The service returns when the review occurred. |
| `revision` | `number \| null` | No | The service returns the current revision number. |
| `status` | `string \| null` | No | The service returns the lifecycle status. |
| `task_family` | `string \| null` | No | The service returns the task-family slug. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |

> [accordion] candidates full type
>
> ```ts theme={null}
> {
>   agent_versions?: string[] | null,
>   base_versions?: {
>     agent_versions?: string[] | null,
>     description?: string | null,
>     do_not_use_when?: string[] | null,
>     markdown?: string | null,
>     name?: string | null,
>     skill_uuid?: string | null,
>     version?: number | null
>   }[] | null,
>   confidence?: number | null,
>   decision?: string | null,
>   description?: string | null,
>   do_not_use_when?: string[] | null,
>   evidence?: {
>     imported_provider?: string | null,
>     occurred_at?: string | null,
>     outcome?: string | null,
>     polarity?: string | null,
>     source_kind?: string | null,
>     trace_uuid?: string | null,
>     verification?: string | null
>   }[] | null,
>   kind?: string | null,
>   markdown?: string | null,
>   name?: string | null,
>   package_name?: string | null,
>   task_family?: string | null,
>   uuid?: string | null
> }[] | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   base_versions?: {
>     agent_versions?: string[] | null,
>     description?: string | null,
>     do_not_use_when?: string[] | null,
>     markdown?: string | null,
>     name?: string | null,
>     skill_uuid?: string | null,
>     version?: number | null
>   }[] | null,
>   candidate_uuids?: string[] | null,
>   decision?: string | null,
>   target_skill_uuids?: string[] | null,
>   uuid?: string | null
> }[] | null
> ```

***

### skillCandidates.list

`agents.skillCandidates.list`

List Agent Skill Candidate Reviews. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skillCandidates.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null` | No | — |
| `total_size` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   candidate_count?: number | null,
>   created_at?: string | null,
>   reason_code?: string | null,
>   reviewed_at?: string | null,
>   revision?: number | null,
>   status?: string | null,
>   task_family?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### skillPublications.lookup

`agents.skillPublications.lookup`

Look up automatic Skill publication lineage. Find a destination Skill by its source Agent, Skill, and version. The endpoint returns 404 until an automatic publication is ready or after it is invalidated. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skillPublications.lookup({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	source_agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	source_skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	source_version: 1,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Destination Agent UUID |
| `source_agent_uuid` | `string` | Yes | Source Agent UUID |
| `source_skill_uuid` | `string` | Yes | Source Skill UUID |
| `source_version` | `number` | Yes | Source version number |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `destination_agent_uuid` | `string \| null` | No | The destination Agent UUID. |
| `destination_skill_uuid` | `string \| null` | No | The destination Skill UUID. |
| `destination_version_uuid` | `string \| null` | No | The destination version UUID. |
| `policy_revision` | `number \| null` | No | The policy revision that allowed automatic publication. |
| `policy_uuid` | `string \| null` | No | The policy UUID that allowed automatic publication. |
| `publication_uuid` | `string \| null` | No | The publication UUID. |
| `source_agent_uuid` | `string \| null` | No | The source Agent UUID. |
| `source_skill_uuid` | `string \| null` | No | The source Skill UUID. |
| `source_version` | `number \| null` | No | The source version number. |
| `source_version_uuid` | `string \| null` | No | The source version UUID. |

***

### skills.approve

`agents.skills.approve`

Approve Agent Skill. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.approve({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_version: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `expected_version` | `number` | Yes | The developer supplies the current Skill version to protect against concurrent edits. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `decision` | `string \| null` | No | The service returns the decision for this operation. |
| `mode` | `string \| null` | No | The service returns publication policy mode. |
| `reason_code` | `string \| null` | No | The service returns the code that explains this result. |
| `skill_version` | `number \| null` | No | The service returns the version number of the Skill. |
| `supporting_attempt_families` | `number \| null` | No | The service returns the count of distinct attempt families that support admission. |

***

### skills.create

`agents.skills.create`

Create Agent Skill. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.create({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	definition: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `definition` | `object` | Yes | — |
| `skill_id` | `string` | No | The developer can set a stable ID for the Skill. If omitted, the service assigns one. |

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   agent_versions?: string[],
>   aliases?: string[],
>   description?: string,
>   do_not_use_when?: string[],
>   done_when?: string[],
>   environments?: {
>     aliases?: string[],
>     name?: string,
>     version?: string
>   }[],
>   failures?: {
>     recover?: string[],
>     when?: string
>   }[],
>   kind?: principle | procedure | workflow | failure_mode | recovery | constraint,
>   name?: string,
>   outputs?: string[],
>   package_name?: string,
>   preconditions?: string[],
>   procedure?: {
>     decision?: string,
>     expect?: string[],
>     instruction?: string
>   }[],
>   related_skills?: {
>     relation?: string,
>     skill?: string,
>     version?: string
>   }[],
>   sections?: {
>     heading?: string,
>     id?: string,
>     markdown?: string
>   }[],
>   stop_when?: string[],
>   task_family?: string,
>   tools?: {
>     aliases?: string[],
>     name?: string,
>     version?: string
>   }[],
>   use_when?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_versions` | `string[] \| null` | No | The service returns Agent versions that can use the Skill. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `current_version` | `number \| null` | No | The service returns the current Skill version number. |
| `kind` | `string \| null` | No | The service returns the Skill kind. |
| `package_name` | `string \| null` | No | The service returns the stable package name of the Skill. |
| `searchable` | `boolean \| null` | No | The service returns whether search can return this Skill. |
| `short_id` | `string \| null` | No | The first 8 hex characters of uuid. Every route that takes skill\_uuid also accepts this value in place of the full UUID. |
| `skill_id` | `string \| null` | No | The service returns the stable developer-facing ID of the Skill, when set. |
| `status` | `string \| null` | No | The service returns the lifecycle status. |
| `task_family` | `string \| null` | No | The service returns the task-family slug. |
| `unavailable_reason` | `string \| null` | No | The service returns why the Skill is unavailable to this Agent. |
| `updated_at` | `string \| null` | No | the time that Zep last updated this resource. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |

***

### skills.createVersion

`agents.skills.createVersion`

Create Agent Skill Version. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.createVersion({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	definition: {},
	expected_version: 1,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `definition` | `object` | Yes | — |
| `expected_version` | `number` | Yes | The developer supplies the current Skill version to protect against concurrent edits. |

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   agent_versions?: string[],
>   aliases?: string[],
>   description?: string,
>   do_not_use_when?: string[],
>   done_when?: string[],
>   environments?: {
>     aliases?: string[],
>     name?: string,
>     version?: string
>   }[],
>   failures?: {
>     recover?: string[],
>     when?: string
>   }[],
>   kind?: principle | procedure | workflow | failure_mode | recovery | constraint,
>   name?: string,
>   outputs?: string[],
>   package_name?: string,
>   preconditions?: string[],
>   procedure?: {
>     decision?: string,
>     expect?: string[],
>     instruction?: string
>   }[],
>   related_skills?: {
>     relation?: string,
>     skill?: string,
>     version?: string
>   }[],
>   sections?: {
>     heading?: string,
>     id?: string,
>     markdown?: string
>   }[],
>   stop_when?: string[],
>   task_family?: string,
>   tools?: {
>     aliases?: string[],
>     name?: string,
>     version?: string
>   }[],
>   use_when?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contract` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `definition` | `object \| null` | No | — |
| `markdown` | `string \| null` | No | Markdown is the agent view of the Skill unless the request selects `markdown_format=full`. |
| `self_contained` | `boolean \| null` | No | The service reports whether the Skill can run without external context. |
| `version` | `number \| null` | No | The service returns the Skill version number. |

> [accordion] contract full type
>
> ```ts theme={null}
> {
>   aliases?: string[] | null,
>   applicability?: {
>     agent_versions?: string[] | null,
>     citations?: string[] | null,
>     models?: {
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null
>   } | null,
>   citations?: string[] | null,
>   confidence?: number | null,
>   contraindications?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   customer_sections?: {
>     heading?: string | null,
>     markdown?: string | null,
>     schema_version?: string | null,
>     section_id?: string | null
>   }[] | null,
>   dependencies?: {
>     package_name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   description?: string | null,
>   environments?: {
>     aliases?: string[] | null,
>     citations?: string[] | null,
>     name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   evidence?: {
>     attempt_family_id?: string | null,
>     id?: string | null,
>     polarity?: string | null,
>     source_id?: string | null,
>     source_kind?: string | null,
>     trace_id?: string | null
>   }[] | null,
>   failures?: {
>     condition?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null,
>     recovery?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null
>   }[] | null,
>   invocation?: {
>     conditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     summary?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null
>   } | null,
>   kind?: string | null,
>   name?: string | null,
>   origin?: string | null,
>   outputs?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   package_name?: string | null,
>   preconditions?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   procedure?: {
>     decision?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null,
>     expected_observations?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     instruction?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null
>   }[] | null,
>   relations?: {
>     citations?: string[] | null,
>     kind?: string | null,
>     target_package_name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   schema_version?: string | null,
>   success_criteria?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   task_family?: string | null,
>   termination_conditions?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   tools?: {
>     aliases?: string[] | null,
>     citations?: string[] | null,
>     name?: string | null,
>     version_constraint?: string | null
>   }[] | null
> } | null
> ```

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   agent_versions?: string[] | null,
>   aliases?: string[] | null,
>   description?: string | null,
>   do_not_use_when?: string[] | null,
>   done_when?: string[] | null,
>   environments?: {
>     aliases?: string[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   failures?: {
>     recover?: string[] | null,
>     when?: string | null
>   }[] | null,
>   kind?: string | null,
>   name?: string | null,
>   outputs?: string[] | null,
>   package_name?: string | null,
>   preconditions?: string[] | null,
>   procedure?: {
>     decision?: string | null,
>     expect?: string[] | null,
>     instruction?: string | null
>   }[] | null,
>   related_skills?: {
>     relation?: string | null,
>     skill?: string | null,
>     version?: string | null
>   }[] | null,
>   sections?: {
>     heading?: string | null,
>     id?: string | null,
>     markdown?: string | null
>   }[] | null,
>   stop_when?: string[] | null,
>   task_family?: string | null,
>   tools?: {
>     aliases?: string[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   use_when?: string[] | null
> } | null
> ```

***

### skills.evaluations.create

`agents.skills.evaluations.create`

Record Agent Skill Evaluation. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.evaluations.create({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	evaluated_by: 'customer',
	evaluator_version: 'example',
	skill_version: 1,
	verdict: 'succeeded',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `controlled_test` | `boolean` | No | The developer sets this to true when a controlled test produced the result. |
| `environment` | `string` | No | The developer supplies the environment for this evaluation. At most 1024. |
| `evaluated_by` | `customer \| tool \| offline_corpus \| policy` | Yes | The developer selects the evaluation source. Valid values are customer, tool, offline\_corpus, policy. |
| `evaluator_version` | `string` | Yes | The developer supplies the evaluation rule version. It can contain up to 255 characters. |
| `evidence_reference` | `string` | No | The developer links this evaluation to an evidence record. |
| `metrics` | `Record<string, number>` | No | The developer supplies evaluation metrics. |
| `skill_version` | `number` | Yes | The developer supplies the Skill version to evaluate. It must be at least 1. |
| `use_uuid` | `string` | No | The developer can link this evaluation to a recorded Skill use. |
| `verdict` | `succeeded \| failed \| partial \| unknown` | Yes | The developer supplies evaluation verdict. Valid values are succeeded, failed, partial, unknown. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `controlled_test` | `boolean \| null` | No | The developer sets this to true when a controlled test produced the result. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `environment` | `string \| null` | No | The service returns the environment used for this evaluation. |
| `evaluated_by` | `string \| null` | No | The service returns the evaluation source. Valid values are customer, tool, offline\_corpus, and policy. |
| `evaluator_version` | `string \| null` | No | The service returns the version of the evaluation rule. |
| `evidence_reference` | `string \| null` | No | The service returns the link to supporting evidence, when one exists. |
| `metrics` | `Record<string, number> \| null` | No | The service returns evaluation metrics. |
| `skill_uuid` | `string \| null` | No | The service returns the UUID of the Skill. |
| `skill_version` | `number \| null` | No | The service returns the version number of the Skill. |
| `trace_uuid` | `string \| null` | No | The service returns the UUID of the source Trace. |
| `use_uuid` | `string \| null` | No | The service returns the UUID of the recorded Skill use, when linked. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |
| `verdict` | `string \| null` | No | The service returns the evaluation verdict. |

***

### skills.evidence.list

`agents.skills.evidence.list`

List Agent Skill Evidence. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.evidence.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null` | No | — |
| `total_size` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   assertion_uuid?: string | null,
>   created_at?: string | null,
>   occurred_at?: string | null,
>   polarity?: string | null,
>   source_kind?: string | null,
>   summary_version_uuid?: string | null,
>   trace_event_uuid?: string | null,
>   trace_uuid?: string | null,
>   verification?: string | null
> }[] | null
> ```

***

### skills.get

`agents.skills.get`

Get Agent Skill. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_versions` | `string[] \| null` | No | The service returns Agent versions that can use the Skill. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `current_version` | `number \| null` | No | The service returns the current Skill version number. |
| `kind` | `string \| null` | No | The service returns the Skill kind. |
| `package_name` | `string \| null` | No | The service returns the stable package name of the Skill. |
| `searchable` | `boolean \| null` | No | The service returns whether search can return this Skill. |
| `short_id` | `string \| null` | No | The first 8 hex characters of uuid. Every route that takes skill\_uuid also accepts this value in place of the full UUID. |
| `skill_id` | `string \| null` | No | The service returns the stable developer-facing ID of the Skill, when set. |
| `status` | `string \| null` | No | The service returns the lifecycle status. |
| `task_family` | `string \| null` | No | The service returns the task-family slug. |
| `unavailable_reason` | `string \| null` | No | The service returns why the Skill is unavailable to this Agent. |
| `updated_at` | `string \| null` | No | the time that Zep last updated this resource. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |

***

### skills.getPublication

`agents.skills.getPublication`

Get automatic Skill publication lineage. Get the publication that created a destination Skill. Use its source version and policy identity to verify a copied Skill. The endpoint returns 404 for unpublished and invalidated Skills. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.getPublication({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Destination Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `destination_agent_uuid` | `string \| null` | No | The destination Agent UUID. |
| `destination_skill_uuid` | `string \| null` | No | The destination Skill UUID. |
| `destination_version_uuid` | `string \| null` | No | The destination version UUID. |
| `policy_revision` | `number \| null` | No | The policy revision that allowed automatic publication. |
| `policy_uuid` | `string \| null` | No | The policy UUID that allowed automatic publication. |
| `publication_uuid` | `string \| null` | No | The publication UUID. |
| `source_agent_uuid` | `string \| null` | No | The source Agent UUID. |
| `source_skill_uuid` | `string \| null` | No | The source Skill UUID. |
| `source_version` | `number \| null` | No | The source version number. |
| `source_version_uuid` | `string \| null` | No | The source version UUID. |

***

### skills.importPackage

`agents.skills.importPackage`

Import an Agent Skill. Submit a portable Skill archive. The completed Task returns \{"result":\{"skill\_uuid":"\<uuid>"}}. Approve that Skill before retrieval. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.importPackage({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `file` | `string \| object \| custom` | Yes | Portable Skill ZIP archive |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `completed_at` | `string \| null` | No | The time the task reached a terminal status; absent while it is still in progress. |
| `created_at` | `string \| null` | No | The time the task was created. |
| `error` | `object \| null` | No | — |
| `progress` | `object \| null` | No | — |
| `result` | `object \| null` | No | — |
| `started_at` | `string \| null` | No | The time a worker began processing the task; absent until then. |
| `status` | `string \| null` | No | The service returns the task state. Valid values are pending, processing, succeeded, partial, and failed. A task has no canceled state. When a batch becomes canceled, its batch.process task becomes failed, and the task error code is batch\_canceled. |
| `type` | `string \| null` | No | The kind of asynchronous operation the task represents. |
| `updated_at` | `string \| null` | No | The time the task was last updated. |
| `uuid` | `string \| null` | No | The unique identifier of the task, used to poll its status. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: Record<string, any> | null,
>   message?: string | null,
>   param?: string | null,
>   request_id?: string | null
> } | null
> ```

> [accordion] progress full type
>
> ```ts theme={null}
> {
>   stage?: string | null
> } | null
> ```

> [accordion] result full type
>
> ```ts theme={null}
> {
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     failed_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null,
>     violated_count?: number | null
>   } | null,
>   edge_uuid?: string | null,
>   edges?: {
>     edge_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   }[] | null,
>   episode_uuid?: string | null,
>   episodes?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     episode_uuid?: string | null
>   }[] | null,
>   hyperedge_uuid?: string | null,
>   skill_uuid?: string | null,
>   source_node_uuid?: string | null,
>   target_node_uuid?: string | null
> } | null
> ```

***

### skills.list

`agents.skills.list`

List Agent Skills. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `environments` | `string[]` | No | The developer filters results by environment names. |
| `kind` | `string` | No | The developer supplies a Skill kind. |
| `task_family` | `string` | No | The developer supplies the task-family slug. |
| `tools` | `string[]` | No | The developer supplies tool names used by the Skill. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null` | No | — |
| `total_size` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_versions?: string[] | null,
>   description?: string | null,
>   environments?: string[] | null,
>   kind?: string | null,
>   markdown?: string | null,
>   maturity?: string | null,
>   name?: string | null,
>   package_name?: string | null,
>   self_contained?: boolean | null,
>   short_id?: string | null,
>   skill_id?: string | null,
>   source_attempt_families?: number | null,
>   task_family?: string | null,
>   tools?: string[] | null,
>   trust?: number | null,
>   uuid?: string | null,
>   verified_applications?: number | null,
>   version?: number | null
> }[] | null
> ```

***

### skills.relations.list

`agents.skills.relations.list`

List Agent Skill Relationships. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.relations.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `kind` | `(composes \| requires \| conflicts_with \| supersedes \| related \| uses_tool \| uses_environment \| supported_by \| contradicted_by \| supersedes_version \| applied_in)[]` | No | Relationship kinds |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null` | No | — |
| `total_size` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   application_state?: string | null,
>   kind?: string | null,
>   related_package_name?: string | null,
>   related_skill_kind?: string | null,
>   related_skill_name?: string | null,
>   related_skill_task_family?: string | null,
>   related_skill_uuid?: string | null,
>   related_skill_version?: number | null,
>   related_version_constraint?: string | null,
>   resource_name?: string | null,
>   resource_version_constraint?: string | null,
>   trace_outcome?: string | null,
>   trace_task_family?: string | null,
>   trace_uuid?: string | null,
>   trace_verification?: string | null
> }[] | null
> ```

***

### skills.retire

`agents.skills.retire`

Retire Agent Skill. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.agents.skills.retire({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_version: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `expected_version` | `number` | Yes | The developer supplies the current Skill version to protect against concurrent edits. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_versions` | `string[] \| null` | No | The service returns Agent versions that can use the Skill. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `current_version` | `number \| null` | No | The service returns the current Skill version number. |
| `kind` | `string \| null` | No | The service returns the Skill kind. |
| `package_name` | `string \| null` | No | The service returns the stable package name of the Skill. |
| `searchable` | `boolean \| null` | No | The service returns whether search can return this Skill. |
| `short_id` | `string \| null` | No | The first 8 hex characters of uuid. Every route that takes skill\_uuid also accepts this value in place of the full UUID. |
| `skill_id` | `string \| null` | No | The service returns the stable developer-facing ID of the Skill, when set. |
| `status` | `string \| null` | No | The service returns the lifecycle status. |
| `task_family` | `string \| null` | No | The service returns the task-family slug. |
| `unavailable_reason` | `string \| null` | No | The service returns why the Skill is unavailable to this Agent. |
| `updated_at` | `string \| null` | No | the time that Zep last updated this resource. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |

***

### skills.search

`agents.skills.search`

Search Agent Skills. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.search({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', query: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `environments` | `string[]` | No | The developer supplies environment names used by the Skill. |
| `include_markdown` | `boolean` | No | The developer sets this to true to include the Skill instructions in Markdown. |
| `kind` | `string` | No | The developer supplies a Skill kind. |
| `markdown_format` | `agent \| full` | No | — |
| `query` | `string` | Yes | The developer supplies a search query for Skills. A term is a sequence of characters between whitespace. When the query has more than 64 terms, Zep searches with the first 64 terms and ignores the other terms. The query must not be longer than 512 bytes. |
| `task_family` | `string` | No | The developer supplies the task-family slug. |
| `tools` | `string[]` | No | The developer supplies tool names used by the Skill. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The service returns the items in this page. |
| `next_cursor` | `string \| null` | No | The service returns the cursor for the next page, when one exists. |
| `search_id` | `string \| null` | No | The service returns the signed token for this result set. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_versions?: string[] | null,
>   description?: string | null,
>   environments?: string[] | null,
>   kind?: string | null,
>   markdown?: string | null,
>   maturity?: string | null,
>   name?: string | null,
>   package_name?: string | null,
>   self_contained?: boolean | null,
>   short_id?: string | null,
>   skill_id?: string | null,
>   source_attempt_families?: number | null,
>   task_family?: string | null,
>   tools?: string[] | null,
>   trust?: number | null,
>   uuid?: string | null,
>   verified_applications?: number | null,
>   version?: number | null
> }[] | null
> ```

***

### skills.uses.addOutcome

`agents.skills.uses.addOutcome`

Record Agent Skill Feedback. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.uses.addOutcome({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	use_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	outcome: 'succeeded',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `use_uuid` | `string` | Yes | Skill use UUID |
| `outcome` | `succeeded \| failed \| partial \| abandoned \| unknown` | Yes | The developer records the attempt outcome. Valid values are succeeded, failed, partial, abandoned, and unknown. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `assertion_uuid` | `string \| null` | No | The service returns the verification assertion linked to this evidence. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `outcome` | `string \| null` | No | The service returns the task outcome. |
| `trace_uuid` | `string \| null` | No | The service returns the UUID of the source Trace. |
| `use_uuid` | `string \| null` | No | The service returns the UUID of the recorded Skill use. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |
| `verification` | `string \| null` | No | The service returns the verification source. Valid values are none, agent, tool, customer, and external. |

***

### skills.uses.create

`agents.skills.uses.create`

Create Agent Skill Use. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.uses.create({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	search_id: 'example',
	trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	usage: 'selected',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `outcome` | `object` | No | — |
| `reason_code` | `string` | No | The developer supplies a reason code for this outcome. It can contain up to 255 characters. |
| `search_id` | `string` | Yes | The developer supplies the signed search token returned by Skill search. |
| `trace_uuid` | `string` | Yes | The developer supplies the UUID of the source Trace. |
| `usage` | `selected \| used \| partially_used \| ignored \| inapplicable` | Yes | The developer supplies how the Skill was used. Valid values are selected, used, partially\_used, ignored, inapplicable. |

> [accordion] outcome full type
>
> ```ts theme={null}
> {
>   outcome: succeeded | failed | partial | abandoned | unknown
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_version` | `string \| null` | No | The service returns the Agent version that used this Skill. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `outcome` | `object \| null` | No | — |
| `reason_code` | `string \| null` | No | The service returns the code that explains this result. |
| `skill_uuid` | `string \| null` | No | The service returns the UUID of the Skill. |
| `skill_version` | `number \| null` | No | The service returns the version number of the Skill. |
| `trace_uuid` | `string \| null` | No | The service returns the UUID of the source Trace. |
| `usage` | `string \| null` | No | The service returns how the Skill was used. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |

> [accordion] outcome full type
>
> ```ts theme={null}
> {
>   assertion_uuid?: string | null,
>   created_at?: string | null,
>   outcome?: string | null,
>   trace_uuid?: string | null,
>   use_uuid?: string | null,
>   uuid?: string | null,
>   verification?: string | null
> } | null
> ```

***

### skills.versions.compare

`agents.skills.versions.compare`

Compare Agent Skill Versions. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.versions.compare({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	from_version: 1,
	to_version: 1,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `from_version` | `number` | Yes | The developer supplies the source version to compare. It must be at least 1. |
| `to_version` | `number` | Yes | The developer supplies the destination version to compare. It must be at least 1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `changed_fields` | `string[] \| null` | No | The service lists fields that changed between these Skill versions. |
| `from` | `object \| null` | No | — |
| `to` | `object \| null` | No | — |

> [accordion] from full type
>
> ```ts theme={null}
> {
>   contract?: {
>     aliases?: string[] | null,
>     applicability?: {
>       agent_versions?: string[] | null,
>       citations?: string[] | null,
>       models?: {
>         name?: string | null,
>         version_constraint?: string | null
>       }[] | null
>     } | null,
>     citations?: string[] | null,
>     confidence?: number | null,
>     contraindications?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     customer_sections?: {
>       heading?: string | null,
>       markdown?: string | null,
>       schema_version?: string | null,
>       section_id?: string | null
>     }[] | null,
>     dependencies?: {
>       package_name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     description?: string | null,
>     environments?: {
>       aliases?: string[] | null,
>       citations?: string[] | null,
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     evidence?: {
>       attempt_family_id?: string | null,
>       id?: string | null,
>       polarity?: string | null,
>       source_id?: string | null,
>       source_kind?: string | null,
>       trace_id?: string | null
>     }[] | null,
>     failures?: {
>       condition?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null,
>       recovery?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null
>     }[] | null,
>     invocation?: {
>       conditions?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null,
>       summary?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null
>     } | null,
>     kind?: string | null,
>     name?: string | null,
>     origin?: string | null,
>     outputs?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     package_name?: string | null,
>     preconditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     procedure?: {
>       decision?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null,
>       expected_observations?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null,
>       instruction?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null
>     }[] | null,
>     relations?: {
>       citations?: string[] | null,
>       kind?: string | null,
>       target_package_name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     schema_version?: string | null,
>     success_criteria?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     task_family?: string | null,
>     termination_conditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     tools?: {
>       aliases?: string[] | null,
>       citations?: string[] | null,
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null
>   } | null,
>   created_at?: string | null,
>   definition?: {
>     agent_versions?: string[] | null,
>     aliases?: string[] | null,
>     description?: string | null,
>     do_not_use_when?: string[] | null,
>     done_when?: string[] | null,
>     environments?: {
>       aliases?: string[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     failures?: {
>       recover?: string[] | null,
>       when?: string | null
>     }[] | null,
>     kind?: string | null,
>     name?: string | null,
>     outputs?: string[] | null,
>     package_name?: string | null,
>     preconditions?: string[] | null,
>     procedure?: {
>       decision?: string | null,
>       expect?: string[] | null,
>       instruction?: string | null
>     }[] | null,
>     related_skills?: {
>       relation?: string | null,
>       skill?: string | null,
>       version?: string | null
>     }[] | null,
>     sections?: {
>       heading?: string | null,
>       id?: string | null,
>       markdown?: string | null
>     }[] | null,
>     stop_when?: string[] | null,
>     task_family?: string | null,
>     tools?: {
>       aliases?: string[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     use_when?: string[] | null
>   } | null,
>   markdown?: string | null,
>   self_contained?: boolean | null,
>   version?: number | null
> } | null
> ```

> [accordion] to full type
>
> ```ts theme={null}
> {
>   contract?: {
>     aliases?: string[] | null,
>     applicability?: {
>       agent_versions?: string[] | null,
>       citations?: string[] | null,
>       models?: {
>         name?: string | null,
>         version_constraint?: string | null
>       }[] | null
>     } | null,
>     citations?: string[] | null,
>     confidence?: number | null,
>     contraindications?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     customer_sections?: {
>       heading?: string | null,
>       markdown?: string | null,
>       schema_version?: string | null,
>       section_id?: string | null
>     }[] | null,
>     dependencies?: {
>       package_name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     description?: string | null,
>     environments?: {
>       aliases?: string[] | null,
>       citations?: string[] | null,
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     evidence?: {
>       attempt_family_id?: string | null,
>       id?: string | null,
>       polarity?: string | null,
>       source_id?: string | null,
>       source_kind?: string | null,
>       trace_id?: string | null
>     }[] | null,
>     failures?: {
>       condition?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null,
>       recovery?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null
>     }[] | null,
>     invocation?: {
>       conditions?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null,
>       summary?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null
>     } | null,
>     kind?: string | null,
>     name?: string | null,
>     origin?: string | null,
>     outputs?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     package_name?: string | null,
>     preconditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     procedure?: {
>       decision?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null,
>       expected_observations?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null,
>       instruction?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null
>     }[] | null,
>     relations?: {
>       citations?: string[] | null,
>       kind?: string | null,
>       target_package_name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     schema_version?: string | null,
>     success_criteria?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     task_family?: string | null,
>     termination_conditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     tools?: {
>       aliases?: string[] | null,
>       citations?: string[] | null,
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null
>   } | null,
>   created_at?: string | null,
>   definition?: {
>     agent_versions?: string[] | null,
>     aliases?: string[] | null,
>     description?: string | null,
>     do_not_use_when?: string[] | null,
>     done_when?: string[] | null,
>     environments?: {
>       aliases?: string[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     failures?: {
>       recover?: string[] | null,
>       when?: string | null
>     }[] | null,
>     kind?: string | null,
>     name?: string | null,
>     outputs?: string[] | null,
>     package_name?: string | null,
>     preconditions?: string[] | null,
>     procedure?: {
>       decision?: string | null,
>       expect?: string[] | null,
>       instruction?: string | null
>     }[] | null,
>     related_skills?: {
>       relation?: string | null,
>       skill?: string | null,
>       version?: string | null
>     }[] | null,
>     sections?: {
>       heading?: string | null,
>       id?: string | null,
>       markdown?: string | null
>     }[] | null,
>     stop_when?: string[] | null,
>     task_family?: string | null,
>     tools?: {
>       aliases?: string[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     use_when?: string[] | null
>   } | null,
>   markdown?: string | null,
>   self_contained?: boolean | null,
>   version?: number | null
> } | null
> ```

***

### skills.versions.exports.create

`agents.skills.versions.exports.create`

Export an Agent Skill version. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.versions.exports.create({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', version: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `version` | `number` | Yes | Skill version |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `completed_at` | `string \| null` | No | The time the task reached a terminal status; absent while it is still in progress. |
| `created_at` | `string \| null` | No | The time the task was created. |
| `error` | `object \| null` | No | — |
| `progress` | `object \| null` | No | — |
| `result` | `object \| null` | No | — |
| `started_at` | `string \| null` | No | The time a worker began processing the task; absent until then. |
| `status` | `string \| null` | No | The service returns the task state. Valid values are pending, processing, succeeded, partial, and failed. A task has no canceled state. When a batch becomes canceled, its batch.process task becomes failed, and the task error code is batch\_canceled. |
| `type` | `string \| null` | No | The kind of asynchronous operation the task represents. |
| `updated_at` | `string \| null` | No | The time the task was last updated. |
| `uuid` | `string \| null` | No | The unique identifier of the task, used to poll its status. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: Record<string, any> | null,
>   message?: string | null,
>   param?: string | null,
>   request_id?: string | null
> } | null
> ```

> [accordion] progress full type
>
> ```ts theme={null}
> {
>   stage?: string | null
> } | null
> ```

> [accordion] result full type
>
> ```ts theme={null}
> {
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     failed_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null,
>     violated_count?: number | null
>   } | null,
>   edge_uuid?: string | null,
>   edges?: {
>     edge_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   }[] | null,
>   episode_uuid?: string | null,
>   episodes?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     episode_uuid?: string | null
>   }[] | null,
>   hyperedge_uuid?: string | null,
>   skill_uuid?: string | null,
>   source_node_uuid?: string | null,
>   target_node_uuid?: string | null
> } | null
> ```

***

### skills.versions.exports.get

`agents.skills.versions.exports.get`

Download an Agent Skill export. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.versions.exports.get({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	version: 1,
	task_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `version` | `number` | Yes | Skill version |
| `task_uuid` | `string` | Yes | Export Task UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### skills.versions.get

`agents.skills.versions.get`

Get Agent Skill Version. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.versions.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', version: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `version` | `number` | Yes | Skill version |
| `markdown_format` | `agent \| full` | No | — |
| `include` | `contract` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contract` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `definition` | `object \| null` | No | — |
| `markdown` | `string \| null` | No | Markdown is the agent view of the Skill unless the request selects `markdown_format=full`. |
| `self_contained` | `boolean \| null` | No | The service reports whether the Skill can run without external context. |
| `version` | `number \| null` | No | The service returns the Skill version number. |

> [accordion] contract full type
>
> ```ts theme={null}
> {
>   aliases?: string[] | null,
>   applicability?: {
>     agent_versions?: string[] | null,
>     citations?: string[] | null,
>     models?: {
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null
>   } | null,
>   citations?: string[] | null,
>   confidence?: number | null,
>   contraindications?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   customer_sections?: {
>     heading?: string | null,
>     markdown?: string | null,
>     schema_version?: string | null,
>     section_id?: string | null
>   }[] | null,
>   dependencies?: {
>     package_name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   description?: string | null,
>   environments?: {
>     aliases?: string[] | null,
>     citations?: string[] | null,
>     name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   evidence?: {
>     attempt_family_id?: string | null,
>     id?: string | null,
>     polarity?: string | null,
>     source_id?: string | null,
>     source_kind?: string | null,
>     trace_id?: string | null
>   }[] | null,
>   failures?: {
>     condition?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null,
>     recovery?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null
>   }[] | null,
>   invocation?: {
>     conditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     summary?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null
>   } | null,
>   kind?: string | null,
>   name?: string | null,
>   origin?: string | null,
>   outputs?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   package_name?: string | null,
>   preconditions?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   procedure?: {
>     decision?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null,
>     expected_observations?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     instruction?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null
>   }[] | null,
>   relations?: {
>     citations?: string[] | null,
>     kind?: string | null,
>     target_package_name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   schema_version?: string | null,
>   success_criteria?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   task_family?: string | null,
>   termination_conditions?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   tools?: {
>     aliases?: string[] | null,
>     citations?: string[] | null,
>     name?: string | null,
>     version_constraint?: string | null
>   }[] | null
> } | null
> ```

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   agent_versions?: string[] | null,
>   aliases?: string[] | null,
>   description?: string | null,
>   do_not_use_when?: string[] | null,
>   done_when?: string[] | null,
>   environments?: {
>     aliases?: string[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   failures?: {
>     recover?: string[] | null,
>     when?: string | null
>   }[] | null,
>   kind?: string | null,
>   name?: string | null,
>   outputs?: string[] | null,
>   package_name?: string | null,
>   preconditions?: string[] | null,
>   procedure?: {
>     decision?: string | null,
>     expect?: string[] | null,
>     instruction?: string | null
>   }[] | null,
>   related_skills?: {
>     relation?: string | null,
>     skill?: string | null,
>     version?: string | null
>   }[] | null,
>   sections?: {
>     heading?: string | null,
>     id?: string | null,
>     markdown?: string | null
>   }[] | null,
>   stop_when?: string[] | null,
>   task_family?: string | null,
>   tools?: {
>     aliases?: string[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   use_when?: string[] | null
> } | null
> ```

***

### skills.versions.list

`agents.skills.versions.list`

List Agent Skill Versions. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.skills.versions.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `markdown_format` | `agent \| full` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null` | No | — |
| `total_size` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   contract?: {
>     aliases?: string[] | null,
>     applicability?: {
>       agent_versions?: string[] | null,
>       citations?: string[] | null,
>       models?: {
>         name?: string | null,
>         version_constraint?: string | null
>       }[] | null
>     } | null,
>     citations?: string[] | null,
>     confidence?: number | null,
>     contraindications?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     customer_sections?: {
>       heading?: string | null,
>       markdown?: string | null,
>       schema_version?: string | null,
>       section_id?: string | null
>     }[] | null,
>     dependencies?: {
>       package_name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     description?: string | null,
>     environments?: {
>       aliases?: string[] | null,
>       citations?: string[] | null,
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     evidence?: {
>       attempt_family_id?: string | null,
>       id?: string | null,
>       polarity?: string | null,
>       source_id?: string | null,
>       source_kind?: string | null,
>       trace_id?: string | null
>     }[] | null,
>     failures?: {
>       condition?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null,
>       recovery?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null
>     }[] | null,
>     invocation?: {
>       conditions?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null,
>       summary?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null
>     } | null,
>     kind?: string | null,
>     name?: string | null,
>     origin?: string | null,
>     outputs?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     package_name?: string | null,
>     preconditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     procedure?: {
>       decision?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null,
>       expected_observations?: {
>         citations?: string[] | null,
>         text?: string | null
>       }[] | null,
>       instruction?: {
>         citations?: string[] | null,
>         text?: string | null
>       } | null
>     }[] | null,
>     relations?: {
>       citations?: string[] | null,
>       kind?: string | null,
>       target_package_name?: string | null,
>       version_constraint?: string | null
>     }[] | null,
>     schema_version?: string | null,
>     success_criteria?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     task_family?: string | null,
>     termination_conditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     tools?: {
>       aliases?: string[] | null,
>       citations?: string[] | null,
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null
>   } | null,
>   created_at?: string | null,
>   definition?: {
>     agent_versions?: string[] | null,
>     aliases?: string[] | null,
>     description?: string | null,
>     do_not_use_when?: string[] | null,
>     done_when?: string[] | null,
>     environments?: {
>       aliases?: string[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     failures?: {
>       recover?: string[] | null,
>       when?: string | null
>     }[] | null,
>     kind?: string | null,
>     name?: string | null,
>     outputs?: string[] | null,
>     package_name?: string | null,
>     preconditions?: string[] | null,
>     procedure?: {
>       decision?: string | null,
>       expect?: string[] | null,
>       instruction?: string | null
>     }[] | null,
>     related_skills?: {
>       relation?: string | null,
>       skill?: string | null,
>       version?: string | null
>     }[] | null,
>     sections?: {
>       heading?: string | null,
>       id?: string | null,
>       markdown?: string | null
>     }[] | null,
>     stop_when?: string[] | null,
>     task_family?: string | null,
>     tools?: {
>       aliases?: string[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     use_when?: string[] | null
>   } | null,
>   markdown?: string | null,
>   self_contained?: boolean | null,
>   version?: number | null
> }[] | null
> ```

***

### skills.versions.restore

`agents.skills.versions.restore`

Restore Agent Skill Version. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.skills.versions.restore({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	skill_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	expected_version: 1,
	version: 1,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `skill_uuid` | `string` | Yes | Skill UUID, or the 8-character short\_id |
| `expected_version` | `number` | Yes | The developer supplies the current Skill version to protect against concurrent edits. |
| `version` | `number` | Yes | The developer supplies the Skill version to restore. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contract` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `definition` | `object \| null` | No | — |
| `markdown` | `string \| null` | No | Markdown is the agent view of the Skill unless the request selects `markdown_format=full`. |
| `self_contained` | `boolean \| null` | No | The service reports whether the Skill can run without external context. |
| `version` | `number \| null` | No | The service returns the Skill version number. |

> [accordion] contract full type
>
> ```ts theme={null}
> {
>   aliases?: string[] | null,
>   applicability?: {
>     agent_versions?: string[] | null,
>     citations?: string[] | null,
>     models?: {
>       name?: string | null,
>       version_constraint?: string | null
>     }[] | null
>   } | null,
>   citations?: string[] | null,
>   confidence?: number | null,
>   contraindications?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   customer_sections?: {
>     heading?: string | null,
>     markdown?: string | null,
>     schema_version?: string | null,
>     section_id?: string | null
>   }[] | null,
>   dependencies?: {
>     package_name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   description?: string | null,
>   environments?: {
>     aliases?: string[] | null,
>     citations?: string[] | null,
>     name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   evidence?: {
>     attempt_family_id?: string | null,
>     id?: string | null,
>     polarity?: string | null,
>     source_id?: string | null,
>     source_kind?: string | null,
>     trace_id?: string | null
>   }[] | null,
>   failures?: {
>     condition?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null,
>     recovery?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null
>   }[] | null,
>   invocation?: {
>     conditions?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     summary?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null
>   } | null,
>   kind?: string | null,
>   name?: string | null,
>   origin?: string | null,
>   outputs?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   package_name?: string | null,
>   preconditions?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   procedure?: {
>     decision?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null,
>     expected_observations?: {
>       citations?: string[] | null,
>       text?: string | null
>     }[] | null,
>     instruction?: {
>       citations?: string[] | null,
>       text?: string | null
>     } | null
>   }[] | null,
>   relations?: {
>     citations?: string[] | null,
>     kind?: string | null,
>     target_package_name?: string | null,
>     version_constraint?: string | null
>   }[] | null,
>   schema_version?: string | null,
>   success_criteria?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   task_family?: string | null,
>   termination_conditions?: {
>     citations?: string[] | null,
>     text?: string | null
>   }[] | null,
>   tools?: {
>     aliases?: string[] | null,
>     citations?: string[] | null,
>     name?: string | null,
>     version_constraint?: string | null
>   }[] | null
> } | null
> ```

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   agent_versions?: string[] | null,
>   aliases?: string[] | null,
>   description?: string | null,
>   do_not_use_when?: string[] | null,
>   done_when?: string[] | null,
>   environments?: {
>     aliases?: string[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   failures?: {
>     recover?: string[] | null,
>     when?: string | null
>   }[] | null,
>   kind?: string | null,
>   name?: string | null,
>   outputs?: string[] | null,
>   package_name?: string | null,
>   preconditions?: string[] | null,
>   procedure?: {
>     decision?: string | null,
>     expect?: string[] | null,
>     instruction?: string | null
>   }[] | null,
>   related_skills?: {
>     relation?: string | null,
>     skill?: string | null,
>     version?: string | null
>   }[] | null,
>   sections?: {
>     heading?: string | null,
>     id?: string | null,
>     markdown?: string | null
>   }[] | null,
>   stop_when?: string[] | null,
>   task_family?: string | null,
>   tools?: {
>     aliases?: string[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   use_when?: string[] | null
> } | null
> ```

***

### taskFamilies.list

`agents.taskFamilies.list`

List Agent Task Families. (POST /agents/\{agent\_uuid}/task-families/list)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.taskFamilies.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The discovered task families on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | The service returns the total number of discovered task families within the owning Agent. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   created_at?: string | null,
>   description?: string | null,
>   descriptor_version?: number | null,
>   distinguishing_tools?: string[] | null,
>   not_for?: string | null,
>   slug?: string | null,
>   updated_at?: string | null,
>   use_when?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### taskFamilies.rename

`agents.taskFamilies.rename`

Rename Agent Task Family. (POST /agents/\{agent\_uuid}/task-families/rename)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.taskFamilies.rename({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', from_slug: 'example', to_slug: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `from_slug` | `string` | Yes | The current slug of the live descriptor. |
| `to_slug` | `string` | Yes | The new slug, or the slug of the live descriptor to merge into. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `merged` | `boolean \| null` | No | True when the source descriptor merged into an existing one. |
| `task_family` | `object \| null` | No | — |

> [accordion] task\_family full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   created_at?: string | null,
>   description?: string | null,
>   descriptor_version?: number | null,
>   distinguishing_tools?: string[] | null,
>   not_for?: string | null,
>   slug?: string | null,
>   updated_at?: string | null,
>   use_when?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### traceImports.create

`agents.traceImports.create`

Create a trace import. Create a scheduled import or queue a one-time import. A scheduled import returns HTTP 201 with import. A one-time import returns HTTP 202 with import, run, and task. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traceImports.create({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `connection_uuid` | `string` | No | The developer selects the configured provider connection. |
| `learn_from` | `boolean` | No | LearnFrom controls whether imported evidence can support Skills. |
| `mapping` | `object` | No | — |
| `name` | `string` | No | Name is the import display name. |
| `on_source_change` | `ignore \| replace` | No | — |
| `provider_project_id` | `string` | No | The developer selects the project to import from the provider. |
| `require_review` | `boolean` | No | RequireReview requires review for candidates backed by this import. |
| `schedule` | `object` | No | — |
| `selection` | `object` | No | — |

> [accordion] mapping full type
>
> ```ts theme={null}
> {
>   content?: {
>     include_system_messages?: boolean,
>     metadata_keys?: string[]
>   },
>   include_outcomes?: (succeeded | failed | partial | abandoned | unknown)[],
>   objective?: {
>     key?: string,
>     source?: first_user_message | root_input | metadata
>   },
>   outcome?: {
>     failed_below?: number,
>     key?: string,
>     name?: string,
>     rule?: score | metadata | error,
>     succeeded_at_or_above?: number,
>     values?: Record<string, string>
>   }[],
>   score_verifier?: boolean,
>   task_family?: {
>     fallback?: string,
>     key?: string,
>     prefix?: string,
>     source?: fixed | metadata | tag_prefix | name | infer,
>     value?: string
>   }
> }
> ```

> [accordion] schedule full type
>
> ```ts theme={null}
> {
>   interval_hours: number,
>   max_open_hours?: number,
>   settle_minutes?: number,
>   start_from: string
> }
> ```

> [accordion] selection full type
>
> ```ts theme={null}
> {
>   filter?: {
>     has_error?: boolean,
>     metadata?: Record<string, any>,
>     name?: string,
>     scores?: {
>       max?: number,
>       min?: number,
>       name?: string
>     }[],
>     started_after?: string,
>     started_before?: string,
>     tags_all?: string[],
>     tags_any?: string[]
>   },
>   trace_ids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `import` | `object \| null` | No | — |
| `run` | `object \| null` | No | — |
| `task` | `object \| null` | No | — |

> [accordion] import full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   connection_uuid?: string | null,
>   created_at?: string | null,
>   imported_trace_count?: number | null,
>   last_run?: {
>     completed_at?: string | null,
>     started_at?: string | null,
>     status?: string | null,
>     trigger?: string | null,
>     uuid?: string | null
>   } | null,
>   learn_from?: boolean | null,
>   mapping?: {
>     content?: {
>       include_system_messages?: boolean | null,
>       metadata_keys?: string[] | null
>     } | null,
>     include_outcomes?: string[] | null,
>     objective?: {
>       key?: string | null,
>       source?: string | null
>     } | null,
>     outcome?: {
>       failed_below?: number | null,
>       key?: string | null,
>       name?: string | null,
>       rule?: string | null,
>       succeeded_at_or_above?: number | null,
>       values?: Record<string, string> | null
>     }[] | null,
>     score_verifier?: boolean | null,
>     task_family?: {
>       fallback?: string | null,
>       key?: string | null,
>       prefix?: string | null,
>       source?: string | null,
>       value?: string | null
>     } | null
>   } | null,
>   name?: string | null,
>   next_run_at?: string | null,
>   on_source_change?: string | null,
>   pause_reason?: string | null,
>   provider?: string | null,
>   provider_organization_id?: string | null,
>   provider_project_id?: string | null,
>   require_review?: boolean | null,
>   revision?: number | null,
>   schedule?: {
>     interval_hours?: number | null,
>     max_open_hours?: number | null,
>     settle_minutes?: number | null,
>     start_from?: string | null
>   } | null,
>   selection?: {
>     filter?: {
>       has_error?: boolean | null,
>       metadata?: Record<string, any> | null,
>       name?: string | null,
>       scores?: {
>         max?: number | null,
>         min?: number | null,
>         name?: string | null
>       }[] | null,
>       started_after?: string | null,
>       started_before?: string | null,
>       tags_all?: string[] | null,
>       tags_any?: string[] | null
>     } | null,
>     trace_ids?: string[] | null
>   } | null,
>   source_cursor_updated_at?: string | null,
>   status?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] run full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   counts?: Record<string, number> | null,
>   created_at?: string | null,
>   due_at?: string | null,
>   error_code?: string | null,
>   import_uuid?: string | null,
>   more_available?: boolean | null,
>   skip_reasons?: Record<string, number> | null,
>   started_at?: string | null,
>   status?: string | null,
>   task_uuid?: string | null,
>   trigger?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### traceImports.delete

`agents.traceImports.delete`

Delete a trace import. Set traces=delete to queue asynchronous Trace deletion. The default keeps Traces. Example query: ?traces=delete. Agent Skills is in closed release: accounts without access get 403 permission\_denied. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.agents.traceImports.delete({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |
| `traces` | `keep \| delete` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `completed_at` | `string \| null` | No | The time the task reached a terminal status; absent while it is still in progress. |
| `created_at` | `string \| null` | No | The time the task was created. |
| `error` | `object \| null` | No | — |
| `progress` | `object \| null` | No | — |
| `result` | `object \| null` | No | — |
| `started_at` | `string \| null` | No | The time a worker began processing the task; absent until then. |
| `status` | `string \| null` | No | The service returns the task state. Valid values are pending, processing, succeeded, partial, and failed. A task has no canceled state. When a batch becomes canceled, its batch.process task becomes failed, and the task error code is batch\_canceled. |
| `type` | `string \| null` | No | The kind of asynchronous operation the task represents. |
| `updated_at` | `string \| null` | No | The time the task was last updated. |
| `uuid` | `string \| null` | No | The unique identifier of the task, used to poll its status. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: Record<string, any> | null,
>   message?: string | null,
>   param?: string | null,
>   request_id?: string | null
> } | null
> ```

> [accordion] progress full type
>
> ```ts theme={null}
> {
>   stage?: string | null
> } | null
> ```

> [accordion] result full type
>
> ```ts theme={null}
> {
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     failed_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null,
>     violated_count?: number | null
>   } | null,
>   edge_uuid?: string | null,
>   edges?: {
>     edge_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   }[] | null,
>   episode_uuid?: string | null,
>   episodes?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     episode_uuid?: string | null
>   }[] | null,
>   hyperedge_uuid?: string | null,
>   skill_uuid?: string | null,
>   source_node_uuid?: string | null,
>   target_node_uuid?: string | null
> } | null
> ```

***

### traceImports.get

`agents.traceImports.get`

Get a trace import. Read one trace import. The response does not include its source cursor. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traceImports.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | AgentUUID is the owning Agent identifier. |
| `connection_uuid` | `string \| null` | No | The service returns the configured provider connection used by this import. |
| `created_at` | `string \| null` | No | CreatedAt is the resource creation time. |
| `imported_trace_count` | `number \| null` | No | ImportedTraceCount is the number of Traces currently owned by this import. |
| `last_run` | `object \| null` | No | — |
| `learn_from` | `boolean \| null` | No | LearnFrom reports whether imported evidence can support Skills. |
| `mapping` | `object \| null` | No | — |
| `name` | `string \| null` | No | Name is the import display name. |
| `next_run_at` | `string \| null` | No | NextRunAt is the next scheduled run time. |
| `on_source_change` | `string \| null` | No | — |
| `pause_reason` | `string \| null` | No | — |
| `provider` | `string \| null` | No | Provider is the Braintrust or LangSmith provider. |
| `provider_organization_id` | `string \| null` | No | ProviderOrganizationID is the provider organization identifier. |
| `provider_project_id` | `string \| null` | No | The service returns the provider project selected for this import. |
| `require_review` | `boolean \| null` | No | RequireReview reports whether candidate review is required. |
| `revision` | `number \| null` | No | Revision is the import update revision. |
| `schedule` | `object \| null` | No | — |
| `selection` | `object \| null` | No | — |
| `source_cursor_updated_at` | `string \| null` | No | SourceCursorUpdatedAt is the last source cursor update time. |
| `status` | `string \| null` | No | Status is the import status. |
| `updated_at` | `string \| null` | No | UpdatedAt is the last resource update time. |
| `uuid` | `string \| null` | No | UUID is the trace import identifier. |

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   started_at?: string | null,
>   status?: string | null,
>   trigger?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] mapping full type
>
> ```ts theme={null}
> {
>   content?: {
>     include_system_messages?: boolean | null,
>     metadata_keys?: string[] | null
>   } | null,
>   include_outcomes?: string[] | null,
>   objective?: {
>     key?: string | null,
>     source?: string | null
>   } | null,
>   outcome?: {
>     failed_below?: number | null,
>     key?: string | null,
>     name?: string | null,
>     rule?: string | null,
>     succeeded_at_or_above?: number | null,
>     values?: Record<string, string> | null
>   }[] | null,
>   score_verifier?: boolean | null,
>   task_family?: {
>     fallback?: string | null,
>     key?: string | null,
>     prefix?: string | null,
>     source?: string | null,
>     value?: string | null
>   } | null
> } | null
> ```

> [accordion] schedule full type
>
> ```ts theme={null}
> {
>   interval_hours?: number | null,
>   max_open_hours?: number | null,
>   settle_minutes?: number | null,
>   start_from?: string | null
> } | null
> ```

> [accordion] selection full type
>
> ```ts theme={null}
> {
>   filter?: {
>     has_error?: boolean | null,
>     metadata?: Record<string, any> | null,
>     name?: string | null,
>     scores?: {
>       max?: number | null,
>       min?: number | null,
>       name?: string | null
>     }[] | null,
>     started_after?: string | null,
>     started_before?: string | null,
>     tags_all?: string[] | null,
>     tags_any?: string[] | null
>   } | null,
>   trace_ids?: string[] | null
> } | null
> ```

***

### traceImports.list

`agents.traceImports.list`

List trace imports. List trace imports that belong to this Agent. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traceImports.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | Items contains trace imports on this page. Example: \[\{"uuid":"332c28e1-e6a7-4bca-97b2-ef1ec82c65fa","name":"Support traces"}]. |
| `next_cursor` | `string \| null` | No | NextCursor is the cursor for the next page. |
| `total_size` | `number \| null` | No | TotalSize is the number of matching imports. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   connection_uuid?: string | null,
>   created_at?: string | null,
>   imported_trace_count?: number | null,
>   last_run?: {
>     completed_at?: string | null,
>     started_at?: string | null,
>     status?: string | null,
>     trigger?: string | null,
>     uuid?: string | null
>   } | null,
>   learn_from?: boolean | null,
>   mapping?: {
>     content?: {
>       include_system_messages?: boolean | null,
>       metadata_keys?: string[] | null
>     } | null,
>     include_outcomes?: string[] | null,
>     objective?: {
>       key?: string | null,
>       source?: string | null
>     } | null,
>     outcome?: {
>       failed_below?: number | null,
>       key?: string | null,
>       name?: string | null,
>       rule?: string | null,
>       succeeded_at_or_above?: number | null,
>       values?: Record<string, string> | null
>     }[] | null,
>     score_verifier?: boolean | null,
>     task_family?: {
>       fallback?: string | null,
>       key?: string | null,
>       prefix?: string | null,
>       source?: string | null,
>       value?: string | null
>     } | null
>   } | null,
>   name?: string | null,
>   next_run_at?: string | null,
>   on_source_change?: string | null,
>   pause_reason?: string | null,
>   provider?: string | null,
>   provider_organization_id?: string | null,
>   provider_project_id?: string | null,
>   require_review?: boolean | null,
>   revision?: number | null,
>   schedule?: {
>     interval_hours?: number | null,
>     max_open_hours?: number | null,
>     settle_minutes?: number | null,
>     start_from?: string | null
>   } | null,
>   selection?: {
>     filter?: {
>       has_error?: boolean | null,
>       metadata?: Record<string, any> | null,
>       name?: string | null,
>       scores?: {
>         max?: number | null,
>         min?: number | null,
>         name?: string | null
>       }[] | null,
>       started_after?: string | null,
>       started_before?: string | null,
>       tags_all?: string[] | null,
>       tags_any?: string[] | null
>     } | null,
>     trace_ids?: string[] | null
>   } | null,
>   source_cursor_updated_at?: string | null,
>   status?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### traceImports.pause

`agents.traceImports.pause`

Pause a trace import. Pause a scheduled trace import. One-time imports cannot be paused. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traceImports.pause({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | AgentUUID is the owning Agent identifier. |
| `connection_uuid` | `string \| null` | No | The service returns the configured provider connection used by this import. |
| `created_at` | `string \| null` | No | CreatedAt is the resource creation time. |
| `imported_trace_count` | `number \| null` | No | ImportedTraceCount is the number of Traces currently owned by this import. |
| `last_run` | `object \| null` | No | — |
| `learn_from` | `boolean \| null` | No | LearnFrom reports whether imported evidence can support Skills. |
| `mapping` | `object \| null` | No | — |
| `name` | `string \| null` | No | Name is the import display name. |
| `next_run_at` | `string \| null` | No | NextRunAt is the next scheduled run time. |
| `on_source_change` | `string \| null` | No | — |
| `pause_reason` | `string \| null` | No | — |
| `provider` | `string \| null` | No | Provider is the Braintrust or LangSmith provider. |
| `provider_organization_id` | `string \| null` | No | ProviderOrganizationID is the provider organization identifier. |
| `provider_project_id` | `string \| null` | No | The service returns the provider project selected for this import. |
| `require_review` | `boolean \| null` | No | RequireReview reports whether candidate review is required. |
| `revision` | `number \| null` | No | Revision is the import update revision. |
| `schedule` | `object \| null` | No | — |
| `selection` | `object \| null` | No | — |
| `source_cursor_updated_at` | `string \| null` | No | SourceCursorUpdatedAt is the last source cursor update time. |
| `status` | `string \| null` | No | Status is the import status. |
| `updated_at` | `string \| null` | No | UpdatedAt is the last resource update time. |
| `uuid` | `string \| null` | No | UUID is the trace import identifier. |

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   started_at?: string | null,
>   status?: string | null,
>   trigger?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] mapping full type
>
> ```ts theme={null}
> {
>   content?: {
>     include_system_messages?: boolean | null,
>     metadata_keys?: string[] | null
>   } | null,
>   include_outcomes?: string[] | null,
>   objective?: {
>     key?: string | null,
>     source?: string | null
>   } | null,
>   outcome?: {
>     failed_below?: number | null,
>     key?: string | null,
>     name?: string | null,
>     rule?: string | null,
>     succeeded_at_or_above?: number | null,
>     values?: Record<string, string> | null
>   }[] | null,
>   score_verifier?: boolean | null,
>   task_family?: {
>     fallback?: string | null,
>     key?: string | null,
>     prefix?: string | null,
>     source?: string | null,
>     value?: string | null
>   } | null
> } | null
> ```

> [accordion] schedule full type
>
> ```ts theme={null}
> {
>   interval_hours?: number | null,
>   max_open_hours?: number | null,
>   settle_minutes?: number | null,
>   start_from?: string | null
> } | null
> ```

> [accordion] selection full type
>
> ```ts theme={null}
> {
>   filter?: {
>     has_error?: boolean | null,
>     metadata?: Record<string, any> | null,
>     name?: string | null,
>     scores?: {
>       max?: number | null,
>       min?: number | null,
>       name?: string | null
>     }[] | null,
>     started_after?: string | null,
>     started_before?: string | null,
>     tags_all?: string[] | null,
>     tags_any?: string[] | null
>   } | null,
>   trace_ids?: string[] | null
> } | null
> ```

***

### traceImports.resume

`agents.traceImports.resume`

Resume a trace import. Resume a scheduled trace import. Zep verifies credentials first when they caused the pause. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traceImports.resume({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | AgentUUID is the owning Agent identifier. |
| `connection_uuid` | `string \| null` | No | The service returns the configured provider connection used by this import. |
| `created_at` | `string \| null` | No | CreatedAt is the resource creation time. |
| `imported_trace_count` | `number \| null` | No | ImportedTraceCount is the number of Traces currently owned by this import. |
| `last_run` | `object \| null` | No | — |
| `learn_from` | `boolean \| null` | No | LearnFrom reports whether imported evidence can support Skills. |
| `mapping` | `object \| null` | No | — |
| `name` | `string \| null` | No | Name is the import display name. |
| `next_run_at` | `string \| null` | No | NextRunAt is the next scheduled run time. |
| `on_source_change` | `string \| null` | No | — |
| `pause_reason` | `string \| null` | No | — |
| `provider` | `string \| null` | No | Provider is the Braintrust or LangSmith provider. |
| `provider_organization_id` | `string \| null` | No | ProviderOrganizationID is the provider organization identifier. |
| `provider_project_id` | `string \| null` | No | The service returns the provider project selected for this import. |
| `require_review` | `boolean \| null` | No | RequireReview reports whether candidate review is required. |
| `revision` | `number \| null` | No | Revision is the import update revision. |
| `schedule` | `object \| null` | No | — |
| `selection` | `object \| null` | No | — |
| `source_cursor_updated_at` | `string \| null` | No | SourceCursorUpdatedAt is the last source cursor update time. |
| `status` | `string \| null` | No | Status is the import status. |
| `updated_at` | `string \| null` | No | UpdatedAt is the last resource update time. |
| `uuid` | `string \| null` | No | UUID is the trace import identifier. |

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   started_at?: string | null,
>   status?: string | null,
>   trigger?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] mapping full type
>
> ```ts theme={null}
> {
>   content?: {
>     include_system_messages?: boolean | null,
>     metadata_keys?: string[] | null
>   } | null,
>   include_outcomes?: string[] | null,
>   objective?: {
>     key?: string | null,
>     source?: string | null
>   } | null,
>   outcome?: {
>     failed_below?: number | null,
>     key?: string | null,
>     name?: string | null,
>     rule?: string | null,
>     succeeded_at_or_above?: number | null,
>     values?: Record<string, string> | null
>   }[] | null,
>   score_verifier?: boolean | null,
>   task_family?: {
>     fallback?: string | null,
>     key?: string | null,
>     prefix?: string | null,
>     source?: string | null,
>     value?: string | null
>   } | null
> } | null
> ```

> [accordion] schedule full type
>
> ```ts theme={null}
> {
>   interval_hours?: number | null,
>   max_open_hours?: number | null,
>   settle_minutes?: number | null,
>   start_from?: string | null
> } | null
> ```

> [accordion] selection full type
>
> ```ts theme={null}
> {
>   filter?: {
>     has_error?: boolean | null,
>     metadata?: Record<string, any> | null,
>     name?: string | null,
>     scores?: {
>       max?: number | null,
>       min?: number | null,
>       name?: string | null
>     }[] | null,
>     started_after?: string | null,
>     started_before?: string | null,
>     tags_all?: string[] | null,
>     tags_any?: string[] | null
>   } | null,
>   trace_ids?: string[] | null
> } | null
> ```

***

### traceImports.runs.create

`agents.traceImports.runs.create`

Create a trace import run. Create a pending run and its Task. This operation does not start the run. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traceImports.runs.create({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `completed_at` | `string \| null` | No | The time the task reached a terminal status; absent while it is still in progress. |
| `created_at` | `string \| null` | No | The time the task was created. |
| `error` | `object \| null` | No | — |
| `progress` | `object \| null` | No | — |
| `result` | `object \| null` | No | — |
| `started_at` | `string \| null` | No | The time a worker began processing the task; absent until then. |
| `status` | `string \| null` | No | The service returns the task state. Valid values are pending, processing, succeeded, partial, and failed. A task has no canceled state. When a batch becomes canceled, its batch.process task becomes failed, and the task error code is batch\_canceled. |
| `type` | `string \| null` | No | The kind of asynchronous operation the task represents. |
| `updated_at` | `string \| null` | No | The time the task was last updated. |
| `uuid` | `string \| null` | No | The unique identifier of the task, used to poll its status. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: Record<string, any> | null,
>   message?: string | null,
>   param?: string | null,
>   request_id?: string | null
> } | null
> ```

> [accordion] progress full type
>
> ```ts theme={null}
> {
>   stage?: string | null
> } | null
> ```

> [accordion] result full type
>
> ```ts theme={null}
> {
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     failed_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null,
>     violated_count?: number | null
>   } | null,
>   edge_uuid?: string | null,
>   edges?: {
>     edge_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   }[] | null,
>   episode_uuid?: string | null,
>   episodes?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     episode_uuid?: string | null
>   }[] | null,
>   hyperedge_uuid?: string | null,
>   skill_uuid?: string | null,
>   source_node_uuid?: string | null,
>   target_node_uuid?: string | null
> } | null
> ```

***

### traceImports.runs.get

`agents.traceImports.runs.get`

Get a trace import run. Read one run that belongs to this trace import. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traceImports.runs.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', run_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |
| `run_uuid` | `string` | Yes | Run UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `completed_at` | `string \| null` | No | CompletedAt is the run completion time, when present. |
| `counts` | `Record<string, number> \| null` | No | Counts contains run totals by result type. |
| `created_at` | `string \| null` | No | CreatedAt is the run creation time. |
| `due_at` | `string \| null` | No | DueAt is the scheduled run time, when present. |
| `error_code` | `string \| null` | No | ErrorCode is the safe run error code, when present. |
| `import_uuid` | `string \| null` | No | The service returns the UUID of the import that owns this run. |
| `more_available` | `boolean \| null` | No | MoreAvailable reports whether more matching traces remain. |
| `skip_reasons` | `Record<string, number> \| null` | No | SkipReasons contains skip totals by reason. |
| `started_at` | `string \| null` | No | StartedAt is the run start time, when present. |
| `status` | `string \| null` | No | Status is the run status. |
| `task_uuid` | `string \| null` | No | The service returns the Task UUID for this import run. |
| `trigger` | `string \| null` | No | Trigger is the event that created the run. |
| `uuid` | `string \| null` | No | UUID is the run identifier. |

***

### traceImports.runs.items.list

`agents.traceImports.runs.items.list`

List trace import run items. List trace results for this run. Run items do not include source payload. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traceImports.runs.items.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', run_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |
| `run_uuid` | `string` | Yes | Run UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | Items contains run items on this page. Example: \[\{"trace\_id":"trace\_123","status":"imported"}]. |
| `next_cursor` | `string \| null` | No | NextCursor is the cursor for the next page. |
| `total_size` | `number \| null` | No | TotalSize is the number of matching run items. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   reason?: string | null,
>   source_revision?: string | null,
>   status?: string | null,
>   trace_id?: string | null,
>   trace_uuid?: string | null
> }[] | null
> ```

***

### traceImports.runs.list

`agents.traceImports.runs.list`

List trace import runs. List runs that belong to this trace import. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traceImports.runs.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | Items contains runs on this page. Example: \[\{"uuid":"ea7e2724-9bfd-4ca1-aa5c-40a1dd72a688","status":"pending"}]. |
| `next_cursor` | `string \| null` | No | NextCursor is the cursor for the next page. |
| `total_size` | `number \| null` | No | TotalSize is the number of matching runs. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   counts?: Record<string, number> | null,
>   created_at?: string | null,
>   due_at?: string | null,
>   error_code?: string | null,
>   import_uuid?: string | null,
>   more_available?: boolean | null,
>   skip_reasons?: Record<string, number> | null,
>   started_at?: string | null,
>   status?: string | null,
>   task_uuid?: string | null,
>   trigger?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### traceImports.update

`agents.traceImports.update`

Update a trace import. Use expected\_revision to reject a stale update. Example request: \{"expected\_revision":1,"name":"Updated support traces"}. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traceImports.update({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', import_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `import_uuid` | `string` | Yes | Trace import UUID |
| `expected_revision` | `number` | No | ExpectedRevision is the current import revision. |
| `learn_from` | `boolean` | No | LearnFrom is the new learning setting, when supplied. |
| `mapping` | `object` | No | — |
| `name` | `string` | No | Name is the new import name, when supplied. |
| `on_source_change` | `ignore \| replace` | No | OnSourceChange is the new change policy, when supplied. |
| `require_review` | `boolean` | No | RequireReview is the new review setting, when supplied. |
| `schedule` | `object` | No | — |
| `selection` | `object` | No | — |

> [accordion] mapping full type
>
> ```ts theme={null}
> {
>   content?: {
>     include_system_messages?: boolean,
>     metadata_keys?: string[]
>   },
>   include_outcomes?: (succeeded | failed | partial | abandoned | unknown)[],
>   objective?: {
>     key?: string,
>     source?: first_user_message | root_input | metadata
>   },
>   outcome?: {
>     failed_below?: number,
>     key?: string,
>     name?: string,
>     rule?: score | metadata | error,
>     succeeded_at_or_above?: number,
>     values?: Record<string, string>
>   }[],
>   score_verifier?: boolean,
>   task_family?: {
>     fallback?: string,
>     key?: string,
>     prefix?: string,
>     source?: fixed | metadata | tag_prefix | name | infer,
>     value?: string
>   }
> }
> ```

> [accordion] schedule full type
>
> ```ts theme={null}
> {
>   interval_hours: number,
>   max_open_hours?: number,
>   settle_minutes?: number,
>   start_from: string
> }
> ```

> [accordion] selection full type
>
> ```ts theme={null}
> {
>   filter?: {
>     has_error?: boolean,
>     metadata?: Record<string, any>,
>     name?: string,
>     scores?: {
>       max?: number,
>       min?: number,
>       name?: string
>     }[],
>     started_after?: string,
>     started_before?: string,
>     tags_all?: string[],
>     tags_any?: string[]
>   },
>   trace_ids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | AgentUUID is the owning Agent identifier. |
| `connection_uuid` | `string \| null` | No | The service returns the configured provider connection used by this import. |
| `created_at` | `string \| null` | No | CreatedAt is the resource creation time. |
| `imported_trace_count` | `number \| null` | No | ImportedTraceCount is the number of Traces currently owned by this import. |
| `last_run` | `object \| null` | No | — |
| `learn_from` | `boolean \| null` | No | LearnFrom reports whether imported evidence can support Skills. |
| `mapping` | `object \| null` | No | — |
| `name` | `string \| null` | No | Name is the import display name. |
| `next_run_at` | `string \| null` | No | NextRunAt is the next scheduled run time. |
| `on_source_change` | `string \| null` | No | — |
| `pause_reason` | `string \| null` | No | — |
| `provider` | `string \| null` | No | Provider is the Braintrust or LangSmith provider. |
| `provider_organization_id` | `string \| null` | No | ProviderOrganizationID is the provider organization identifier. |
| `provider_project_id` | `string \| null` | No | The service returns the provider project selected for this import. |
| `require_review` | `boolean \| null` | No | RequireReview reports whether candidate review is required. |
| `revision` | `number \| null` | No | Revision is the import update revision. |
| `schedule` | `object \| null` | No | — |
| `selection` | `object \| null` | No | — |
| `source_cursor_updated_at` | `string \| null` | No | SourceCursorUpdatedAt is the last source cursor update time. |
| `status` | `string \| null` | No | Status is the import status. |
| `updated_at` | `string \| null` | No | UpdatedAt is the last resource update time. |
| `uuid` | `string \| null` | No | UUID is the trace import identifier. |

> [accordion] last\_run full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   started_at?: string | null,
>   status?: string | null,
>   trigger?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] mapping full type
>
> ```ts theme={null}
> {
>   content?: {
>     include_system_messages?: boolean | null,
>     metadata_keys?: string[] | null
>   } | null,
>   include_outcomes?: string[] | null,
>   objective?: {
>     key?: string | null,
>     source?: string | null
>   } | null,
>   outcome?: {
>     failed_below?: number | null,
>     key?: string | null,
>     name?: string | null,
>     rule?: string | null,
>     succeeded_at_or_above?: number | null,
>     values?: Record<string, string> | null
>   }[] | null,
>   score_verifier?: boolean | null,
>   task_family?: {
>     fallback?: string | null,
>     key?: string | null,
>     prefix?: string | null,
>     source?: string | null,
>     value?: string | null
>   } | null
> } | null
> ```

> [accordion] schedule full type
>
> ```ts theme={null}
> {
>   interval_hours?: number | null,
>   max_open_hours?: number | null,
>   settle_minutes?: number | null,
>   start_from?: string | null
> } | null
> ```

> [accordion] selection full type
>
> ```ts theme={null}
> {
>   filter?: {
>     has_error?: boolean | null,
>     metadata?: Record<string, any> | null,
>     name?: string | null,
>     scores?: {
>       max?: number | null,
>       min?: number | null,
>       name?: string | null
>     }[] | null,
>     started_after?: string | null,
>     started_before?: string | null,
>     tags_all?: string[] | null,
>     tags_any?: string[] | null
>   } | null,
>   trace_ids?: string[] | null
> } | null
> ```

***

### traces.abandon

`agents.traces.abandon`

Abandon Agent Trace. (POST /agents/\{agent\_uuid}/traces/\{trace\_uuid}/abandon)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traces.abandon({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', highest_accepted_sequence: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `assertion_uuid` | `string` | No | — |
| `expected_revision` | `number` | No | — |
| `highest_accepted_sequence` | `number` | Yes | — |
| `missing_sequence_ranges` | `object[]` | No | — |
| `reason` | `string` | No | — |
| `verification` | `none \| agent \| tool \| customer \| external` | No | — |

> [accordion] missing\_sequence\_ranges full type
>
> ```ts theme={null}
> {
>   first: number,
>   last: number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |
| `trace` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] trace full type
>
> ```ts theme={null}
> {
>   abandoned_at?: string | null,
>   agent_uuid?: string | null,
>   attempt_family_uuid?: string | null,
>   closed_at?: string | null,
>   created_at?: string | null,
>   internal?: {
>     assertion_uuid?: string | null,
>     closing_sequence?: number | null,
>     current_summary_version?: number | null,
>     last_task_uuid?: string | null,
>     next_sequence?: number | null,
>     processing_state?: string | null
>   } | null,
>   learn_from?: boolean | null,
>   learn_from_reason?: string | null,
>   metadata?: Record<string, any> | null,
>   objective?: string | null,
>   outcome?: string | null,
>   parent_trace_uuid?: string | null,
>   revision?: number | null,
>   source?: {
>     connection_uuid?: string | null,
>     import_uuid?: string | null,
>     imported_at?: string | null,
>     kind?: string | null,
>     provider?: string | null,
>     provider_project_id?: string | null,
>     run_uuid?: string | null,
>     scores?: Record<string, number> | null,
>     source_changed?: boolean | null,
>     source_revision?: string | null,
>     source_url?: string | null,
>     trace_ended_at?: string | null,
>     trace_id?: string | null,
>     trace_started_at?: string | null
>   } | null,
>   status?: string | null,
>   task_family?: string | null,
>   task_family_inference?: {
>     assigned_at?: string | null,
>     classifier_version?: string | null,
>     confidence?: number | null,
>     descriptor_version?: number | null,
>     learning_reusable?: boolean | null,
>     state?: string | null
>   } | null,
>   task_family_source?: string | null,
>   trace_id?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   verification?: string | null
> } | null
> ```

***

### traces.appendEvent

`agents.traces.appendEvent`

Append Agent Trace Event. A tool call and its result can share a tool\_call\_id. For example, append \{"event\_type":"tool\_call","tool\_call\_id":"call\_8f2b","content":"Search orders","context":\{"tools":\[\{"name":"search\_orders"}]}} and \{"event\_type":"tool\_result","tool\_call\_id":"call\_8f2b","content":"Order…

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traces.appendEvent({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', event_type: 'input_reference' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `content` | `string` | No | — |
| `context` | `object` | No | — |
| `event_id` | `string` | No | — |
| `event_type` | `input_reference \| observation \| decision \| tool_call \| tool_result \| artifact \| checkpoint \| feedback \| correction \| reflection \| verification` | Yes | — |
| `metadata` | `Record<string, any>` | No | Metadata is developer data. Skills learning does not read it. |
| `occurred_at` | `string` | No | — |
| `sequence` | `number` | No | — |
| `sources` | `object[]` | No | — |
| `tool_call_id` | `string` | No | ToolCallID is the ID that the agent framework gives a tool call. Use the same ID on the tool\_call and tool\_result events. It is valid only on these event types. A result without a matching call is valid. OpenAI uses tool\_calls\[].id, Anthropic uses the tool\_use block id, and LangChain uses ToolMessage.tool\_call\_id. |

> [accordion] context full type
>
> ```ts theme={null}
> {
>   artifacts?: {
>     name: string,
>     version?: string
>   }[],
>   environments?: {
>     name: string,
>     version?: string
>   }[],
>   model?: {
>     name: string,
>     version?: string
>   },
>   tools?: {
>     name: string,
>     version?: string
>   }[],
>   verification?: none | agent | tool | customer | external
> }
> ```

> [accordion] sources full type
>
> ```ts theme={null}
> {
>   copy_mode?: reference | copied,
>   kind: string,
>   retention_mode?: delete_with_source | keep,
>   uuid: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | — |
| `content` | `string \| null` | No | — |
| `context` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `event_id` | `string \| null` | No | — |
| `event_type` | `string \| null` | No | — |
| `failed_at` | `string \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | Metadata is developer data. Skills learning does not read it. |
| `occurred_at` | `string \| null` | No | — |
| `processed_at` | `string \| null` | No | — |
| `processing_state` | `string \| null` | No | — |
| `sequence` | `number \| null` | No | — |
| `sources` | `object[] \| null` | No | — |
| `tool_call_id` | `string \| null` | No | ToolCallID is the ID that the agent framework gives a tool call. Use the same ID on the tool\_call and tool\_result events. It is valid only on these event types. A result without a matching call is valid. OpenAI uses tool\_calls\[].id, Anthropic uses the tool\_use block id, and LangChain uses ToolMessage.tool\_call\_id. |
| `trace_uuid` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `uuid` | `string \| null` | No | — |

> [accordion] context full type
>
> ```ts theme={null}
> {
>   artifacts?: {
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   environments?: {
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   model?: {
>     name?: string | null,
>     version?: string | null
>   } | null,
>   tools?: {
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   verification?: string | null
> } | null
> ```

> [accordion] sources full type
>
> ```ts theme={null}
> {
>   copy_mode?: string | null,
>   kind?: string | null,
>   retention_mode?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### traces.close

`agents.traces.close`

Close Agent Trace. (POST /agents/\{agent\_uuid}/traces/\{trace\_uuid}/close)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traces.close({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `closing_sequence` | `number` | No | — |
| `expected_revision` | `number` | No | — |
| `missing_sequence_ranges` | `object[]` | No | — |
| `outcome` | `succeeded \| failed \| partial \| abandoned \| unknown` | No | — |
| `reason` | `string` | No | — |
| `verification` | `none \| agent \| tool \| customer \| external` | No | — |
| `verifier` | `object` | No | — |
| `verifier_id` | `string` | No | — |

> [accordion] missing\_sequence\_ranges full type
>
> ```ts theme={null}
> {
>   first: number,
>   last: number
> }[]
> ```

> [accordion] verifier full type
>
> ```ts theme={null}
> {
>   assertion_id?: string,
>   class?: string,
>   evidence_reference?: string,
>   outcome?: succeeded | failed | partial | abandoned | unknown,
>   verifier_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |
| `trace` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] trace full type
>
> ```ts theme={null}
> {
>   abandoned_at?: string | null,
>   agent_uuid?: string | null,
>   attempt_family_uuid?: string | null,
>   closed_at?: string | null,
>   created_at?: string | null,
>   internal?: {
>     assertion_uuid?: string | null,
>     closing_sequence?: number | null,
>     current_summary_version?: number | null,
>     last_task_uuid?: string | null,
>     next_sequence?: number | null,
>     processing_state?: string | null
>   } | null,
>   learn_from?: boolean | null,
>   learn_from_reason?: string | null,
>   metadata?: Record<string, any> | null,
>   objective?: string | null,
>   outcome?: string | null,
>   parent_trace_uuid?: string | null,
>   revision?: number | null,
>   source?: {
>     connection_uuid?: string | null,
>     import_uuid?: string | null,
>     imported_at?: string | null,
>     kind?: string | null,
>     provider?: string | null,
>     provider_project_id?: string | null,
>     run_uuid?: string | null,
>     scores?: Record<string, number> | null,
>     source_changed?: boolean | null,
>     source_revision?: string | null,
>     source_url?: string | null,
>     trace_ended_at?: string | null,
>     trace_id?: string | null,
>     trace_started_at?: string | null
>   } | null,
>   status?: string | null,
>   task_family?: string | null,
>   task_family_inference?: {
>     assigned_at?: string | null,
>     classifier_version?: string | null,
>     confidence?: number | null,
>     descriptor_version?: number | null,
>     learning_reusable?: boolean | null,
>     state?: string | null
>   } | null,
>   task_family_source?: string | null,
>   trace_id?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   verification?: string | null
> } | null
> ```

***

### traces.correctTaskFamily

`agents.traces.correctTaskFamily`

Correct Agent Trace Task Family. (POST /agents/\{agent\_uuid}/traces/\{trace\_uuid}/correct-task-family)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traces.correctTaskFamily({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	expected_revision: 1,
	reason: 'example',
	task_family: 'example',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `expected_revision` | `number` | Yes | The current Trace revision used for optimistic concurrency. |
| `reason` | `string` | Yes | Why the terminal Trace classification is being corrected. |
| `task_family` | `string \| null` | Yes | Replacement task-family slug. Set to null to clear it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |
| `trace` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] trace full type
>
> ```ts theme={null}
> {
>   abandoned_at?: string | null,
>   agent_uuid?: string | null,
>   attempt_family_uuid?: string | null,
>   closed_at?: string | null,
>   created_at?: string | null,
>   internal?: {
>     assertion_uuid?: string | null,
>     closing_sequence?: number | null,
>     current_summary_version?: number | null,
>     last_task_uuid?: string | null,
>     next_sequence?: number | null,
>     processing_state?: string | null
>   } | null,
>   learn_from?: boolean | null,
>   learn_from_reason?: string | null,
>   metadata?: Record<string, any> | null,
>   objective?: string | null,
>   outcome?: string | null,
>   parent_trace_uuid?: string | null,
>   revision?: number | null,
>   source?: {
>     connection_uuid?: string | null,
>     import_uuid?: string | null,
>     imported_at?: string | null,
>     kind?: string | null,
>     provider?: string | null,
>     provider_project_id?: string | null,
>     run_uuid?: string | null,
>     scores?: Record<string, number> | null,
>     source_changed?: boolean | null,
>     source_revision?: string | null,
>     source_url?: string | null,
>     trace_ended_at?: string | null,
>     trace_id?: string | null,
>     trace_started_at?: string | null
>   } | null,
>   status?: string | null,
>   task_family?: string | null,
>   task_family_inference?: {
>     assigned_at?: string | null,
>     classifier_version?: string | null,
>     confidence?: number | null,
>     descriptor_version?: number | null,
>     learning_reusable?: boolean | null,
>     state?: string | null
>   } | null,
>   task_family_source?: string | null,
>   trace_id?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   verification?: string | null
> } | null
> ```

***

### traces.create

`agents.traces.create`

Create Agent Trace. (POST /agents/\{agent\_uuid}/traces)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traces.create({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', objective: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `learn_from` | `boolean` | No | The developer supplies whether eligible evidence may participate in learning. Defaults to true. |
| `metadata` | `Record<string, any>` | No | Developer metadata used to organize and filter Traces. |
| `objective` | `string` | Yes | The developer describes the task instance. The create request requires a non-empty value but does not check its size. An AppendAgentTraceEventRequest returns 400 if the Trace objective exceeds 8 KiB (8,192 bytes). |
| `parent_trace_uuid` | `string` | No | The developer supplies the parent Trace UUID when this attempt retries an earlier attempt. |
| `task_family` | `string` | No | The developer may set a task-family slug. If the developer omits it, Agent Skills assigns the Trace to a task family automatically. If Agent Skills cannot assign a task family, the `task_family_inference` field of the Trace is `unassigned`. A BYOM configuration requires `task_family`. A strict-residency deployment requires `task_family`. Without task\_family in either case, the API returns 400 `invalid_request` with the message `task_family is required`. The slug must contain 1 to 128 lowercase letters, digits, `.`, `_`, `/`, or `-`. It must start with a lowercase letter or digit. |
| `trace_id` | `string` | No | The developer may set an identifier that is unique within the Agent. A retry with the same create parameters returns 200 and the existing Trace. Different parameters return 409. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `abandoned_at` | `string \| null` | No | The time the Trace was abandoned. |
| `agent_uuid` | `string \| null` | No | The service returns the owning Agent UUID. |
| `attempt_family_uuid` | `string \| null` | No | The service returns the stable retry-family identity shared by attempts. |
| `closed_at` | `string \| null` | No | The time the Trace closed. |
| `created_at` | `string \| null` | No | The time the Trace was created. |
| `internal` | `object \| null` | No | — |
| `learn_from` | `boolean \| null` | No | The service returns whether eligible evidence may participate in learning. |
| `learn_from_reason` | `string \| null` | No | The service returns why the Trace is not eligible for learning, when it is not eligible. |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used for exact containment filters. |
| `objective` | `string \| null` | No | The service returns the task-instance objective captured for this attempt. |
| `outcome` | `string \| null` | No | — |
| `parent_trace_uuid` | `string \| null` | No | The service returns the parent attempt when this Trace is a retry. |
| `revision` | `number \| null` | No | The service returns the current revision for the next update or lifecycle command. |
| `source` | `object \| null` | No | — |
| `status` | `string \| null` | No | — |
| `task_family` | `string \| null` | No | The service returns the declared or assigned task-family slug, when one is available. |
| `task_family_inference` | `object \| null` | No | — |
| `task_family_source` | `string \| null` | No | The service returns how it selected the task family. Valid values are declared, import\_rule, and inferred. |
| `trace_id` | `string \| null` | No | The developer may set an identifier that is unique within the Agent. A retry with the same create parameters returns 200 and the existing Trace. Different parameters return 409. |
| `updated_at` | `string \| null` | No | The time the Trace was last updated. |
| `uuid` | `string \| null` | No | The service returns the stable Trace UUID. |
| `verification` | `string \| null` | No | — |

> [accordion] internal full type
>
> ```ts theme={null}
> {
>   assertion_uuid?: string | null,
>   closing_sequence?: number | null,
>   current_summary_version?: number | null,
>   last_task_uuid?: string | null,
>   next_sequence?: number | null,
>   processing_state?: string | null
> } | null
> ```

> [accordion] source full type
>
> ```ts theme={null}
> {
>   connection_uuid?: string | null,
>   import_uuid?: string | null,
>   imported_at?: string | null,
>   kind?: string | null,
>   provider?: string | null,
>   provider_project_id?: string | null,
>   run_uuid?: string | null,
>   scores?: Record<string, number> | null,
>   source_changed?: boolean | null,
>   source_revision?: string | null,
>   source_url?: string | null,
>   trace_ended_at?: string | null,
>   trace_id?: string | null,
>   trace_started_at?: string | null
> } | null
> ```

> [accordion] task\_family\_inference full type
>
> ```ts theme={null}
> {
>   assigned_at?: string | null,
>   classifier_version?: string | null,
>   confidence?: number | null,
>   descriptor_version?: number | null,
>   learning_reusable?: boolean | null,
>   state?: string | null
> } | null
> ```

***

### traces.delete

`agents.traces.delete`

Delete Agent Trace. Cannot be undone. (DELETE /agents/\{agent\_uuid}/traces/\{trace\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.agents.traces.delete({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_revision: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `expected_revision` | `number` | Yes | The developer supplies the current revision for optimistic concurrency. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `affected_skills` | `number \| null` | No | The service returns the number of Skills affected by this deletion. |
| `deletion_uuid` | `string \| null` | No | The service returns the UUID of the deletion operation. |
| `skill_repair_task` | `object \| null` | No | — |
| `summary_repair_task` | `object \| null` | No | — |
| `trace` | `object \| null` | No | — |

> [accordion] skill\_repair\_task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] summary\_repair\_task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] trace full type
>
> ```ts theme={null}
> {
>   abandoned_at?: string | null,
>   agent_uuid?: string | null,
>   attempt_family_uuid?: string | null,
>   closed_at?: string | null,
>   created_at?: string | null,
>   internal?: {
>     assertion_uuid?: string | null,
>     closing_sequence?: number | null,
>     current_summary_version?: number | null,
>     last_task_uuid?: string | null,
>     next_sequence?: number | null,
>     processing_state?: string | null
>   } | null,
>   learn_from?: boolean | null,
>   learn_from_reason?: string | null,
>   metadata?: Record<string, any> | null,
>   objective?: string | null,
>   outcome?: string | null,
>   parent_trace_uuid?: string | null,
>   revision?: number | null,
>   source?: {
>     connection_uuid?: string | null,
>     import_uuid?: string | null,
>     imported_at?: string | null,
>     kind?: string | null,
>     provider?: string | null,
>     provider_project_id?: string | null,
>     run_uuid?: string | null,
>     scores?: Record<string, number> | null,
>     source_changed?: boolean | null,
>     source_revision?: string | null,
>     source_url?: string | null,
>     trace_ended_at?: string | null,
>     trace_id?: string | null,
>     trace_started_at?: string | null
>   } | null,
>   status?: string | null,
>   task_family?: string | null,
>   task_family_inference?: {
>     assigned_at?: string | null,
>     classifier_version?: string | null,
>     confidence?: number | null,
>     descriptor_version?: number | null,
>     learning_reusable?: boolean | null,
>     state?: string | null
>   } | null,
>   task_family_source?: string | null,
>   trace_id?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   verification?: string | null
> } | null
> ```

***

### traces.deleteEvent

`agents.traces.deleteEvent`

Delete Agent Trace Event. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.agents.traces.deleteEvent({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	event_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	expected_revision: 1,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `event_uuid` | `string` | Yes | Event UUID |
| `expected_revision` | `number` | Yes | The developer supplies the current revision for optimistic concurrency. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `affected_skills` | `number \| null` | No | The service returns the number of Skills affected by this deletion. |
| `deletion_uuid` | `string \| null` | No | The service returns the UUID of the deletion operation. |
| `skill_repair_task` | `object \| null` | No | — |
| `summary_repair_task` | `object \| null` | No | — |
| `trace` | `object \| null` | No | — |

> [accordion] skill\_repair\_task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] summary\_repair\_task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] trace full type
>
> ```ts theme={null}
> {
>   abandoned_at?: string | null,
>   agent_uuid?: string | null,
>   attempt_family_uuid?: string | null,
>   closed_at?: string | null,
>   created_at?: string | null,
>   internal?: {
>     assertion_uuid?: string | null,
>     closing_sequence?: number | null,
>     current_summary_version?: number | null,
>     last_task_uuid?: string | null,
>     next_sequence?: number | null,
>     processing_state?: string | null
>   } | null,
>   learn_from?: boolean | null,
>   learn_from_reason?: string | null,
>   metadata?: Record<string, any> | null,
>   objective?: string | null,
>   outcome?: string | null,
>   parent_trace_uuid?: string | null,
>   revision?: number | null,
>   source?: {
>     connection_uuid?: string | null,
>     import_uuid?: string | null,
>     imported_at?: string | null,
>     kind?: string | null,
>     provider?: string | null,
>     provider_project_id?: string | null,
>     run_uuid?: string | null,
>     scores?: Record<string, number> | null,
>     source_changed?: boolean | null,
>     source_revision?: string | null,
>     source_url?: string | null,
>     trace_ended_at?: string | null,
>     trace_id?: string | null,
>     trace_started_at?: string | null
>   } | null,
>   status?: string | null,
>   task_family?: string | null,
>   task_family_inference?: {
>     assigned_at?: string | null,
>     classifier_version?: string | null,
>     confidence?: number | null,
>     descriptor_version?: number | null,
>     learning_reusable?: boolean | null,
>     state?: string | null
>   } | null,
>   task_family_source?: string | null,
>   trace_id?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   verification?: string | null
> } | null
> ```

***

### traces.get

`agents.traces.get`

Get Agent Trace. (GET /agents/\{agent\_uuid}/traces/\{trace\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traces.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `abandoned_at` | `string \| null` | No | The time the Trace was abandoned. |
| `agent_uuid` | `string \| null` | No | The service returns the owning Agent UUID. |
| `attempt_family_uuid` | `string \| null` | No | The service returns the stable retry-family identity shared by attempts. |
| `closed_at` | `string \| null` | No | The time the Trace closed. |
| `created_at` | `string \| null` | No | The time the Trace was created. |
| `internal` | `object \| null` | No | — |
| `learn_from` | `boolean \| null` | No | The service returns whether eligible evidence may participate in learning. |
| `learn_from_reason` | `string \| null` | No | The service returns why the Trace is not eligible for learning, when it is not eligible. |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used for exact containment filters. |
| `objective` | `string \| null` | No | The service returns the task-instance objective captured for this attempt. |
| `outcome` | `string \| null` | No | — |
| `parent_trace_uuid` | `string \| null` | No | The service returns the parent attempt when this Trace is a retry. |
| `revision` | `number \| null` | No | The service returns the current revision for the next update or lifecycle command. |
| `source` | `object \| null` | No | — |
| `status` | `string \| null` | No | — |
| `task_family` | `string \| null` | No | The service returns the declared or assigned task-family slug, when one is available. |
| `task_family_inference` | `object \| null` | No | — |
| `task_family_source` | `string \| null` | No | The service returns how it selected the task family. Valid values are declared, import\_rule, and inferred. |
| `trace_id` | `string \| null` | No | The developer may set an identifier that is unique within the Agent. A retry with the same create parameters returns 200 and the existing Trace. Different parameters return 409. |
| `updated_at` | `string \| null` | No | The time the Trace was last updated. |
| `uuid` | `string \| null` | No | The service returns the stable Trace UUID. |
| `verification` | `string \| null` | No | — |

> [accordion] internal full type
>
> ```ts theme={null}
> {
>   assertion_uuid?: string | null,
>   closing_sequence?: number | null,
>   current_summary_version?: number | null,
>   last_task_uuid?: string | null,
>   next_sequence?: number | null,
>   processing_state?: string | null
> } | null
> ```

> [accordion] source full type
>
> ```ts theme={null}
> {
>   connection_uuid?: string | null,
>   import_uuid?: string | null,
>   imported_at?: string | null,
>   kind?: string | null,
>   provider?: string | null,
>   provider_project_id?: string | null,
>   run_uuid?: string | null,
>   scores?: Record<string, number> | null,
>   source_changed?: boolean | null,
>   source_revision?: string | null,
>   source_url?: string | null,
>   trace_ended_at?: string | null,
>   trace_id?: string | null,
>   trace_started_at?: string | null
> } | null
> ```

> [accordion] task\_family\_inference full type
>
> ```ts theme={null}
> {
>   assigned_at?: string | null,
>   classifier_version?: string | null,
>   confidence?: number | null,
>   descriptor_version?: number | null,
>   learning_reusable?: boolean | null,
>   state?: string | null
> } | null
> ```

***

### traces.getSummary

`agents.traces.getSummary`

Get Current Agent Trace Summary. (GET /agents/\{agent\_uuid}/traces/\{trace\_uuid}/summary)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traces.getSummary({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | The service returns the UUID of the owning Agent. |
| `assertion_uuid` | `string \| null` | No | The service returns the verification assertion linked to this evidence. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `creation_reason` | `string \| null` | No | — |
| `first_occurred_at` | `string \| null` | No | The service returns when the first event occurred. |
| `first_sequence` | `number \| null` | No | The service returns the first event sequence included in this summary. |
| `last_occurred_at` | `string \| null` | No | The service returns when the last event occurred. |
| `last_sequence` | `number \| null` | No | The service returns the last event sequence included in this summary. |
| `omitted_sequence_ranges` | `object[] \| null` | No | The service returns event sequence ranges that this summary omits. |
| `outcome` | `string \| null` | No | — |
| `parent_version_uuid` | `string \| null` | No | The service returns the UUID of the parent summary version, when one exists. |
| `structured_summary` | `object \| null` | No | — |
| `text` | `string \| null` | No | The service returns text that a person can read. |
| `trace_uuid` | `string \| null` | No | The service returns the UUID of the source Trace. |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this summary version. |
| `verification` | `string \| null` | No | — |
| `version` | `number \| null` | No | The service returns this summary version number. |

> [accordion] omitted\_sequence\_ranges full type
>
> ```ts theme={null}
> {
>   first_sequence?: number | null,
>   last_sequence?: number | null,
>   reason?: string | null
> }[] | null
> ```

> [accordion] structured\_summary full type
>
> ```ts theme={null}
> {
>   ambiguities?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   }[] | null,
>   approach?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   }[] | null,
>   artifacts?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   candidate_lessons?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   }[] | null,
>   corrections?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   }[] | null,
>   coverage?: {
>     excerpted_events?: {
>       content_bytes?: number | null,
>       event_id?: string | null,
>       omitted_byte_ranges?: {
>         end?: number | null,
>         start?: number | null
>       }[] | null,
>       sequence?: number | null
>     }[] | null,
>     first_sequence?: number | null,
>     last_sequence?: number | null,
>     omitted_sequence_ranges?: {
>       first_sequence?: number | null,
>       last_sequence?: number | null,
>       reason?: string | null
>     }[] | null
>   } | null,
>   effective_steps?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   }[] | null,
>   environments?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   errors?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   }[] | null,
>   event_time_basis?: string | null,
>   first_event_time?: string | null,
>   ineffective_steps?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   }[] | null,
>   last_event_time?: string | null,
>   objective?: string | null,
>   recoveries?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   }[] | null,
>   reported_outcome?: string | null,
>   result?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     text?: string | null
>   } | null,
>   task_family?: string | null,
>   tools?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     name?: string | null,
>     version?: string | null
>   }[] | null,
>   verification?: {
>     citations?: {
>       event_id?: string | null,
>       sequence?: number | null
>     }[] | null,
>     details?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     status?: string | null,
>     verifier_ids?: string[] | null
>   } | null
> } | null
> ```

***

### traces.list

`agents.traces.list`

List Agent Traces. (POST /agents/\{agent\_uuid}/traces/list)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traces.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `created_at \| updated_at` | No | — |
| `order` | `asc \| desc` | No | — |
| `import_uuid` | `string` | No | Filter by owning Trace import UUID |
| `source_kind` | `native \| trace_import` | No | — |
| `metadata` | `Record<string, any>` | No | Filters to Traces whose metadata contains these key-value pairs. |
| `outcome` | `succeeded \| failed \| partial \| abandoned \| unknown` | No | — |
| `parent_trace_uuid` | `string` | No | Filters to direct retries of this parent Trace. |
| `status` | `open \| closing \| closed \| abandoned \| deleted` | No | — |
| `task_family` | `string` | No | Filters to an exact task-family slug. |
| `verification` | `none \| agent \| tool \| customer \| external` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The Traces on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | The total number of Traces matching the filters within the owning Agent. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   abandoned_at?: string | null,
>   agent_uuid?: string | null,
>   attempt_family_uuid?: string | null,
>   closed_at?: string | null,
>   created_at?: string | null,
>   internal?: {
>     assertion_uuid?: string | null,
>     closing_sequence?: number | null,
>     current_summary_version?: number | null,
>     last_task_uuid?: string | null,
>     next_sequence?: number | null,
>     processing_state?: string | null
>   } | null,
>   learn_from?: boolean | null,
>   learn_from_reason?: string | null,
>   metadata?: Record<string, any> | null,
>   objective?: string | null,
>   outcome?: string | null,
>   parent_trace_uuid?: string | null,
>   revision?: number | null,
>   source?: {
>     connection_uuid?: string | null,
>     import_uuid?: string | null,
>     imported_at?: string | null,
>     kind?: string | null,
>     provider?: string | null,
>     provider_project_id?: string | null,
>     run_uuid?: string | null,
>     scores?: Record<string, number> | null,
>     source_changed?: boolean | null,
>     source_revision?: string | null,
>     source_url?: string | null,
>     trace_ended_at?: string | null,
>     trace_id?: string | null,
>     trace_started_at?: string | null
>   } | null,
>   status?: string | null,
>   task_family?: string | null,
>   task_family_inference?: {
>     assigned_at?: string | null,
>     classifier_version?: string | null,
>     confidence?: number | null,
>     descriptor_version?: number | null,
>     learning_reusable?: boolean | null,
>     state?: string | null
>   } | null,
>   task_family_source?: string | null,
>   trace_id?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   verification?: string | null
> }[] | null
> ```

***

### traces.listEvents

`agents.traces.listEvents`

List Agent Trace Events. (GET /agents/\{agent\_uuid}/traces/\{trace\_uuid}/events)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traces.listEvents({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The service returns the events in this page. |
| `next_cursor` | `string \| null` | No | The service returns the cursor for the next page, when one exists. |
| `total_size` | `number \| null` | No | The service returns the total number of items. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   content?: string | null,
>   context?: {
>     artifacts?: {
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     environments?: {
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     model?: {
>       name?: string | null,
>       version?: string | null
>     } | null,
>     tools?: {
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     verification?: string | null
>   } | null,
>   created_at?: string | null,
>   event_id?: string | null,
>   event_type?: string | null,
>   failed_at?: string | null,
>   metadata?: Record<string, any> | null,
>   occurred_at?: string | null,
>   processed_at?: string | null,
>   processing_state?: string | null,
>   sequence?: number | null,
>   sources?: {
>     copy_mode?: string | null,
>     kind?: string | null,
>     retention_mode?: string | null,
>     uuid?: string | null
>   }[] | null,
>   tool_call_id?: string | null,
>   trace_uuid?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### traces.listSummaryVersions

`agents.traces.listSummaryVersions`

List Agent Trace Summary Versions. (GET /agents/\{agent\_uuid}/traces/\{trace\_uuid}/summary/versions)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.traces.listSummaryVersions({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The service returns the summary versions in this page. |
| `next_cursor` | `string \| null` | No | The service returns the cursor for the next page, when one exists. |
| `total_size` | `number \| null` | No | The service returns the total number of matching items. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   assertion_uuid?: string | null,
>   created_at?: string | null,
>   creation_reason?: string | null,
>   first_occurred_at?: string | null,
>   first_sequence?: number | null,
>   last_occurred_at?: string | null,
>   last_sequence?: number | null,
>   omitted_sequence_ranges?: {
>     first_sequence?: number | null,
>     last_sequence?: number | null,
>     reason?: string | null
>   }[] | null,
>   outcome?: string | null,
>   parent_version_uuid?: string | null,
>   structured_summary?: {
>     ambiguities?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     approach?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     artifacts?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     candidate_lessons?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     corrections?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     coverage?: {
>       excerpted_events?: {
>         content_bytes?: number | null,
>         event_id?: string | null,
>         omitted_byte_ranges?: {
>           end?: number | null,
>           start?: number | null
>         }[] | null,
>         sequence?: number | null
>       }[] | null,
>       first_sequence?: number | null,
>       last_sequence?: number | null,
>       omitted_sequence_ranges?: {
>         first_sequence?: number | null,
>         last_sequence?: number | null,
>         reason?: string | null
>       }[] | null
>     } | null,
>     effective_steps?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     environments?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     errors?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     event_time_basis?: string | null,
>     first_event_time?: string | null,
>     ineffective_steps?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     last_event_time?: string | null,
>     objective?: string | null,
>     recoveries?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     }[] | null,
>     reported_outcome?: string | null,
>     result?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       text?: string | null
>     } | null,
>     task_family?: string | null,
>     tools?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       name?: string | null,
>       version?: string | null
>     }[] | null,
>     verification?: {
>       citations?: {
>         event_id?: string | null,
>         sequence?: number | null
>       }[] | null,
>       details?: {
>         citations?: {
>           event_id?: string | null,
>           sequence?: number | null
>         }[] | null,
>         text?: string | null
>       }[] | null,
>       status?: string | null,
>       verifier_ids?: string[] | null
>     } | null
>   } | null,
>   text?: string | null,
>   trace_uuid?: string | null,
>   uuid?: string | null,
>   verification?: string | null,
>   version?: number | null
> }[] | null
> ```

***

### traces.reopen

`agents.traces.reopen`

Reopen Agent Trace. (POST /agents/\{agent\_uuid}/traces/\{trace\_uuid}/reopen)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traces.reopen({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_revision: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `expected_revision` | `number` | Yes | The current Trace revision used for optimistic concurrency. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `abandoned_at` | `string \| null` | No | The time the Trace was abandoned. |
| `agent_uuid` | `string \| null` | No | The service returns the owning Agent UUID. |
| `attempt_family_uuid` | `string \| null` | No | The service returns the stable retry-family identity shared by attempts. |
| `closed_at` | `string \| null` | No | The time the Trace closed. |
| `created_at` | `string \| null` | No | The time the Trace was created. |
| `internal` | `object \| null` | No | — |
| `learn_from` | `boolean \| null` | No | The service returns whether eligible evidence may participate in learning. |
| `learn_from_reason` | `string \| null` | No | The service returns why the Trace is not eligible for learning, when it is not eligible. |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used for exact containment filters. |
| `objective` | `string \| null` | No | The service returns the task-instance objective captured for this attempt. |
| `outcome` | `string \| null` | No | — |
| `parent_trace_uuid` | `string \| null` | No | The service returns the parent attempt when this Trace is a retry. |
| `revision` | `number \| null` | No | The service returns the current revision for the next update or lifecycle command. |
| `source` | `object \| null` | No | — |
| `status` | `string \| null` | No | — |
| `task_family` | `string \| null` | No | The service returns the declared or assigned task-family slug, when one is available. |
| `task_family_inference` | `object \| null` | No | — |
| `task_family_source` | `string \| null` | No | The service returns how it selected the task family. Valid values are declared, import\_rule, and inferred. |
| `trace_id` | `string \| null` | No | The developer may set an identifier that is unique within the Agent. A retry with the same create parameters returns 200 and the existing Trace. Different parameters return 409. |
| `updated_at` | `string \| null` | No | The time the Trace was last updated. |
| `uuid` | `string \| null` | No | The service returns the stable Trace UUID. |
| `verification` | `string \| null` | No | — |

> [accordion] internal full type
>
> ```ts theme={null}
> {
>   assertion_uuid?: string | null,
>   closing_sequence?: number | null,
>   current_summary_version?: number | null,
>   last_task_uuid?: string | null,
>   next_sequence?: number | null,
>   processing_state?: string | null
> } | null
> ```

> [accordion] source full type
>
> ```ts theme={null}
> {
>   connection_uuid?: string | null,
>   import_uuid?: string | null,
>   imported_at?: string | null,
>   kind?: string | null,
>   provider?: string | null,
>   provider_project_id?: string | null,
>   run_uuid?: string | null,
>   scores?: Record<string, number> | null,
>   source_changed?: boolean | null,
>   source_revision?: string | null,
>   source_url?: string | null,
>   trace_ended_at?: string | null,
>   trace_id?: string | null,
>   trace_started_at?: string | null
> } | null
> ```

> [accordion] task\_family\_inference full type
>
> ```ts theme={null}
> {
>   assigned_at?: string | null,
>   classifier_version?: string | null,
>   confidence?: number | null,
>   descriptor_version?: number | null,
>   learning_reusable?: boolean | null,
>   state?: string | null
> } | null
> ```

***

### traces.update

`agents.traces.update`

Update Agent Trace. (PATCH /agents/\{agent\_uuid}/traces/\{trace\_uuid})

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.traces.update({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	trace_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	expected_revision: 1,
	task_family: 'example',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `trace_uuid` | `string` | Yes | Trace UUID |
| `expected_revision` | `number` | Yes | The current Trace revision used for optimistic concurrency. |
| `task_family` | `string \| null` | Yes | Replacement task-family slug. Set to null to clear it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `abandoned_at` | `string \| null` | No | The time the Trace was abandoned. |
| `agent_uuid` | `string \| null` | No | The service returns the owning Agent UUID. |
| `attempt_family_uuid` | `string \| null` | No | The service returns the stable retry-family identity shared by attempts. |
| `closed_at` | `string \| null` | No | The time the Trace closed. |
| `created_at` | `string \| null` | No | The time the Trace was created. |
| `internal` | `object \| null` | No | — |
| `learn_from` | `boolean \| null` | No | The service returns whether eligible evidence may participate in learning. |
| `learn_from_reason` | `string \| null` | No | The service returns why the Trace is not eligible for learning, when it is not eligible. |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used for exact containment filters. |
| `objective` | `string \| null` | No | The service returns the task-instance objective captured for this attempt. |
| `outcome` | `string \| null` | No | — |
| `parent_trace_uuid` | `string \| null` | No | The service returns the parent attempt when this Trace is a retry. |
| `revision` | `number \| null` | No | The service returns the current revision for the next update or lifecycle command. |
| `source` | `object \| null` | No | — |
| `status` | `string \| null` | No | — |
| `task_family` | `string \| null` | No | The service returns the declared or assigned task-family slug, when one is available. |
| `task_family_inference` | `object \| null` | No | — |
| `task_family_source` | `string \| null` | No | The service returns how it selected the task family. Valid values are declared, import\_rule, and inferred. |
| `trace_id` | `string \| null` | No | The developer may set an identifier that is unique within the Agent. A retry with the same create parameters returns 200 and the existing Trace. Different parameters return 409. |
| `updated_at` | `string \| null` | No | The time the Trace was last updated. |
| `uuid` | `string \| null` | No | The service returns the stable Trace UUID. |
| `verification` | `string \| null` | No | — |

> [accordion] internal full type
>
> ```ts theme={null}
> {
>   assertion_uuid?: string | null,
>   closing_sequence?: number | null,
>   current_summary_version?: number | null,
>   last_task_uuid?: string | null,
>   next_sequence?: number | null,
>   processing_state?: string | null
> } | null
> ```

> [accordion] source full type
>
> ```ts theme={null}
> {
>   connection_uuid?: string | null,
>   import_uuid?: string | null,
>   imported_at?: string | null,
>   kind?: string | null,
>   provider?: string | null,
>   provider_project_id?: string | null,
>   run_uuid?: string | null,
>   scores?: Record<string, number> | null,
>   source_changed?: boolean | null,
>   source_revision?: string | null,
>   source_url?: string | null,
>   trace_ended_at?: string | null,
>   trace_id?: string | null,
>   trace_started_at?: string | null
> } | null
> ```

> [accordion] task\_family\_inference full type
>
> ```ts theme={null}
> {
>   assigned_at?: string | null,
>   classifier_version?: string | null,
>   confidence?: number | null,
>   descriptor_version?: number | null,
>   learning_reusable?: boolean | null,
>   state?: string | null
> } | null
> ```

***

### update

`agents.update`

Update Agent. (PATCH /agents/\{agent\_uuid})

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.update({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_revision: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `deployment_id` | `string \| null` | No | The customer deployment this Agent represents. Set to null to clear it. |
| `description` | `string \| null` | No | A human-readable description of the Agent. Set to null to clear it. |
| `expected_revision` | `number` | Yes | The current Agent revision used for optimistic concurrency. |
| `memory_settings` | `object \| null` | No | — |
| `metadata` | `object \| null` | No | Replacement developer metadata. Set to null to clear it. |
| `name` | `string` | No | The Agent's display name. |
| `version` | `string \| null` | No | The customer deployment version this Agent represents. Set to null to clear it. |

> [accordion] memory\_settings full type
>
> ```ts theme={null}
> {
>   admission_evaluation_requirements?: {
>     requirements: {
>       controlled?: boolean,
>       environment?: string,
>       evaluated_by: string,
>       evaluator_version: string,
>       result: string
>     }[],
>     task_family: string
>   }[],
>   approval?: manual | auto,
>   approval_minimum_attempt_families?: number,
>   approval_required_tools?: string[],
>   auto_approval_task_families?: string[],
>   compilation_mode?: scheduled | manual | on_close,
>   provisional_expiry_days?: number,
>   provisional_skill_limit?: number,
>   retention_days?: number
> } | null
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string \| null` | No | The developer-assigned Agent identifier, unique within the project. |
| `created_at` | `string \| null` | No | The time the Agent was created. |
| `deployment_id` | `string \| null` | No | The customer deployment this Agent represents. |
| `description` | `string \| null` | No | A human-readable description of the Agent. |
| `memory_settings` | `object \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used to organize and filter Agents. |
| `name` | `string \| null` | No | The Agent's display name. |
| `revision` | `number \| null` | No | The revision required by the next update or delete request. |
| `security_domain` | `string \| null` | No | The immutable boundary within which Skills may be synthesized. |
| `status` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | The time the Agent was last updated. |
| `uuid` | `string \| null` | No | The stable identifier of the Agent. |
| `version` | `string \| null` | No | The customer deployment version this Agent represents. |

> [accordion] memory\_settings full type
>
> ```ts theme={null}
> {
>   admission_evaluation_requirements?: {
>     requirements?: {
>       controlled?: boolean | null,
>       environment?: string | null,
>       evaluated_by?: string | null,
>       evaluator_version?: string | null,
>       result?: string | null
>     }[] | null,
>     task_family?: string | null
>   }[] | null,
>   approval?: string | null,
>   approval_minimum_attempt_families?: number | null,
>   approval_required_tools?: string[] | null,
>   auto_approval_task_families?: string[] | null,
>   compilation_mode?: string | null,
>   provisional_expiry_days?: number | null,
>   provisional_skill_limit?: number | null,
>   retention_days?: number | null
> } | null
> ```

***

### verifiers.get

`agents.verifiers.get`

Get Agent Verifier. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.verifiers.get({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', verifier_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `verifier_uuid` | `string` | Yes | Verifier UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | The owning Agent UUID. |
| `capabilities` | `Record<string, any> \| null` | No | Structured capabilities reported by the verifier integration. |
| `class` | `string \| null` | No | The immutable verifier class. |
| `created_at` | `string \| null` | No | The time the registration was created. |
| `created_by` | `object \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used to organize the registration. |
| `permitted_strengths` | `string[] \| null` | No | Verification strengths this registration may assert. |
| `principal_bindings` | `object[] \| null` | No | Exact authenticated principals permitted to submit verifier assertions. |
| `revision` | `number \| null` | No | The revision required by the next update or revoke request. |
| `revoked_at` | `string \| null` | No | The time the registration was revoked. |
| `status` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | The time the registration was last updated. |
| `uuid` | `string \| null` | No | The stable verifier registration UUID. |
| `verifier_id` | `string \| null` | No | The developer-assigned verifier identifier, unique within the Agent. |

> [accordion] created\_by full type
>
> ```ts theme={null}
> {
>   principal_id?: string | null,
>   principal_type?: string | null
> } | null
> ```

> [accordion] principal\_bindings full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   effective_strength?: string | null,
>   principal_id?: string | null,
>   principal_type?: string | null
> }[] | null
> ```

***

### verifiers.invalidateEvidence

`agents.verifiers.invalidateEvidence`

Invalidate Agent Verifier Evidence. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.agents.verifiers.invalidateEvidence({
	agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	verifier_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	reason: 'example',
	verifier_revisions: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `verifier_uuid` | `string` | Yes | Verifier UUID |
| `reason` | `string` | Yes | The developer supplies why evidence from these verifier revisions is invalid. |
| `verifier_revisions` | `number[]` | Yes | Verifier revisions whose accepted evidence is no longer valid. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `affected_skill_uuids` | `string[] \| null` | No | The service returns UUIDs of Skills affected by this invalidation. |
| `agent_uuid` | `string \| null` | No | The service returns the UUID of the owning Agent. |
| `created_at` | `string \| null` | No | The service returns when Zep created this resource. |
| `created_by` | `object \| null` | No | — |
| `reason` | `string \| null` | No | The service returns why the Verifier revisions were invalidated. |
| `task` | `object \| null` | No | — |
| `uuid` | `string \| null` | No | The service returns the UUID that identifies this resource. |
| `verifier_revisions` | `number[] \| null` | No | The service returns revisions of the Verifiers affected by this invalidation. |
| `verifier_uuid` | `string \| null` | No | The service returns the UUID of the Verifier linked to this invalidation. |

> [accordion] created\_by full type
>
> ```ts theme={null}
> {
>   principal_id?: string | null,
>   principal_type?: string | null
> } | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### verifiers.list

`agents.verifiers.list`

List Agent Verifiers. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.agents.verifiers.list({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Page cursor |
| `class` | `string` | No | Filters to an exact immutable verifier class. |
| `principal_id` | `string` | No | Filters to registrations bound to this exact principal identifier. |
| `principal_type` | `string` | No | Filters to registrations bound to this principal type. |
| `status` | `active \| revoked` | No | — |
| `verifier_id` | `string` | No | Filters to an exact developer-assigned verifier identifier. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null` | No | — |
| `total_size` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   agent_uuid?: string | null,
>   capabilities?: Record<string, any> | null,
>   class?: string | null,
>   created_at?: string | null,
>   created_by?: {
>     principal_id?: string | null,
>     principal_type?: string | null
>   } | null,
>   metadata?: Record<string, any> | null,
>   permitted_strengths?: string[] | null,
>   principal_bindings?: {
>     created_at?: string | null,
>     effective_strength?: string | null,
>     principal_id?: string | null,
>     principal_type?: string | null
>   }[] | null,
>   revision?: number | null,
>   revoked_at?: string | null,
>   status?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   verifier_id?: string | null
> }[] | null
> ```

***

### verifiers.revoke

`agents.verifiers.revoke`

Revoke Agent Verifier. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.agents.verifiers.revoke({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', verifier_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_revision: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `verifier_uuid` | `string` | Yes | Verifier UUID |
| `expected_revision` | `number` | Yes | The current verifier revision used for optimistic concurrency. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | The owning Agent UUID. |
| `capabilities` | `Record<string, any> \| null` | No | Structured capabilities reported by the verifier integration. |
| `class` | `string \| null` | No | The immutable verifier class. |
| `created_at` | `string \| null` | No | The time the registration was created. |
| `created_by` | `object \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used to organize the registration. |
| `permitted_strengths` | `string[] \| null` | No | Verification strengths this registration may assert. |
| `principal_bindings` | `object[] \| null` | No | Exact authenticated principals permitted to submit verifier assertions. |
| `revision` | `number \| null` | No | The revision required by the next update or revoke request. |
| `revoked_at` | `string \| null` | No | The time the registration was revoked. |
| `status` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | The time the registration was last updated. |
| `uuid` | `string \| null` | No | The stable verifier registration UUID. |
| `verifier_id` | `string \| null` | No | The developer-assigned verifier identifier, unique within the Agent. |

> [accordion] created\_by full type
>
> ```ts theme={null}
> {
>   principal_id?: string | null,
>   principal_type?: string | null
> } | null
> ```

> [accordion] principal\_bindings full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   effective_strength?: string | null,
>   principal_id?: string | null,
>   principal_type?: string | null
> }[] | null
> ```

***

### verifiers.update

`agents.verifiers.update`

Update Agent Verifier. Agent Skills is in closed release: accounts without access get 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.agents.verifiers.update({ agent_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', verifier_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', expected_revision: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string` | Yes | Agent UUID |
| `verifier_uuid` | `string` | Yes | Verifier UUID |
| `capabilities` | `object \| null` | No | Replacement capabilities. Set to null to clear them. |
| `expected_revision` | `number` | Yes | The current verifier revision used for optimistic concurrency. |
| `metadata` | `object \| null` | No | Replacement metadata. Set to null to clear it. |
| `permitted_strengths` | `(tool_verified \| customer_verified \| externally_verified)[]` | No | Replacement permitted strengths. The list cannot be empty or null. |
| `principal_bindings` | `object[]` | No | Replacement exact principal bindings. The list cannot be empty or null. |

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] principal\_bindings full type
>
> ```ts theme={null}
> {
>   effective_strength: tool_verified | customer_verified | externally_verified,
>   principal_id: string,
>   principal_type: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_uuid` | `string \| null` | No | The owning Agent UUID. |
| `capabilities` | `Record<string, any> \| null` | No | Structured capabilities reported by the verifier integration. |
| `class` | `string \| null` | No | The immutable verifier class. |
| `created_at` | `string \| null` | No | The time the registration was created. |
| `created_by` | `object \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | Developer metadata used to organize the registration. |
| `permitted_strengths` | `string[] \| null` | No | Verification strengths this registration may assert. |
| `principal_bindings` | `object[] \| null` | No | Exact authenticated principals permitted to submit verifier assertions. |
| `revision` | `number \| null` | No | The revision required by the next update or revoke request. |
| `revoked_at` | `string \| null` | No | The time the registration was revoked. |
| `status` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | The time the registration was last updated. |
| `uuid` | `string \| null` | No | The stable verifier registration UUID. |
| `verifier_id` | `string \| null` | No | The developer-assigned verifier identifier, unique within the Agent. |

> [accordion] created\_by full type
>
> ```ts theme={null}
> {
>   principal_id?: string | null,
>   principal_type?: string | null
> } | null
> ```

> [accordion] principal\_bindings full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   effective_strength?: string | null,
>   principal_id?: string | null,
>   principal_type?: string | null
> }[] | null
> ```

***

## Batches

### addItems

`batches.addItems`

Add batch items. (POST /batches/\{batch\_uuid}/items)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.batches.addItems({
	batch_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	items: [{ type: 'graph_episode' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batch_uuid` | `string` | Yes | Batch UUID |
| `items` | `object[]` | Yes | The batch items to append, each identified by its type field. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   content?: string,
>   data?: string,
>   data_type?: text | json | message | fact_triple,
>   document_id?: string,
>   graph_uuid?: string,
>   metadata?: Record<string, any>,
>   name?: string,
>   reference_time?: string,
>   role?: system | assistant | user | function | tool,
>   source_description?: string,
>   thread_uuid?: string,
>   type: graph_episode | thread_message,
>   user_uuid?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The batch items that were added, in the order they were appended. |
| `rejected_items` | `object[] \| null` | No | The request items that were rejected because their graph was not found. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null
>   } | null,
>   created_at?: string | null,
>   episode_uuid?: string | null,
>   error?: {
>     code?: string | null,
>     message?: string | null
>   } | null,
>   graph_uuid?: string | null,
>   sequence_index?: number | null,
>   source_uuid?: string | null,
>   status?: string | null,
>   thread_uuid?: string | null,
>   type?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

> [accordion] rejected\_items full type
>
> ```ts theme={null}
> {
>   index?: number | null,
>   reason?: string | null
> }[] | null
> ```

***

### create

`batches.create`

Create batch. (POST /batches)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.batches.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ignore_roles` | `string[]` | No | Message roles to skip during graph extraction for thread message items in this batch. |
| `metadata` | `Record<string, any>` | No | Metadata to store on the batch. |
| `strict_ontology` | `boolean` | No | When true, prevents extraction of generic entity nodes that do not match the configured ontology for episodes in this batch. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the batch was created. |
| `metadata` | `Record<string, any> \| null` | No | Custom metadata associated with the batch, supplied when it was created. |
| `progress` | `object \| null` | No | — |
| `status` | `string \| null` | No | The processing status of the batch: draft, invalid, queued, processing, succeeded, partial, failed, or canceled. |
| `strict_ontology` | `boolean \| null` | No | Whether ontology enforcement is applied when this batch is processed, rejecting entities that do not match the configured ontology. |
| `uuid` | `string \| null` | No | The unique identifier of the batch. |

> [accordion] progress full type
>
> ```ts theme={null}
> {
>   failed_items?: number | null,
>   processing_items?: number | null,
>   stage?: string | null,
>   succeeded_items?: number | null,
>   total_items?: number | null
> } | null
> ```

***

### delete

`batches.delete`

Delete batch. Cannot be undone. (DELETE /batches/\{batch\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.batches.delete({ batch_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batch_uuid` | `string` | Yes | Batch UUID |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`batches.get`

Get batch. (GET /batches/\{batch\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.batches.get({ batch_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batch_uuid` | `string` | Yes | Batch UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the batch was created. |
| `metadata` | `Record<string, any> \| null` | No | Custom metadata associated with the batch, supplied when it was created. |
| `progress` | `object \| null` | No | — |
| `status` | `string \| null` | No | The processing status of the batch: draft, invalid, queued, processing, succeeded, partial, failed, or canceled. |
| `strict_ontology` | `boolean \| null` | No | Whether ontology enforcement is applied when this batch is processed, rejecting entities that do not match the configured ontology. |
| `uuid` | `string \| null` | No | The unique identifier of the batch. |

> [accordion] progress full type
>
> ```ts theme={null}
> {
>   failed_items?: number | null,
>   processing_items?: number | null,
>   stage?: string | null,
>   succeeded_items?: number | null,
>   total_items?: number | null
> } | null
> ```

***

### list

`batches.list`

List batches. (GET /batches)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.batches.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `status` | `draft \| invalid \| queued \| processing \| succeeded \| partial \| failed \| canceled` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The batches on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | The total number of batches that match the request. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   metadata?: Record<string, any> | null,
>   progress?: {
>     failed_items?: number | null,
>     processing_items?: number | null,
>     stage?: string | null,
>     succeeded_items?: number | null,
>     total_items?: number | null
>   } | null,
>   status?: string | null,
>   strict_ontology?: boolean | null,
>   uuid?: string | null
> }[] | null
> ```

***

### listItems

`batches.listItems`

List batch items. (GET /batches/\{batch\_uuid}/items)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.batches.listItems({ batch_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batch_uuid` | `string` | Yes | Batch UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The batch items on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | The total number of items in the batch that match the request. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null
>   } | null,
>   created_at?: string | null,
>   episode_uuid?: string | null,
>   error?: {
>     code?: string | null,
>     message?: string | null
>   } | null,
>   graph_uuid?: string | null,
>   sequence_index?: number | null,
>   source_uuid?: string | null,
>   status?: string | null,
>   thread_uuid?: string | null,
>   type?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### process

`batches.process`

Process batch. (POST /batches/\{batch\_uuid}/process)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.batches.process({ batch_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batch_uuid` | `string` | Yes | Batch UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `batch` | `object \| null` | No | — |
| `task` | `object \| null` | No | — |

> [accordion] batch full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   metadata?: Record<string, any> | null,
>   progress?: {
>     failed_items?: number | null,
>     processing_items?: number | null,
>     stage?: string | null,
>     succeeded_items?: number | null,
>     total_items?: number | null
>   } | null,
>   status?: string | null,
>   strict_ontology?: boolean | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

## Context Templates

### create

`contextTemplates.create`

Create context template. (POST /context-templates)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.contextTemplates.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | A unique, human-readable name for the template. |
| `template` | `string` | No | The template content used to render context blocks. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the template was created. |
| `name` | `string \| null` | No | The name of the context template. |
| `template` | `string \| null` | No | The template content. |
| `uuid` | `string \| null` | No | The unique identifier of the context template. |

***

### delete

`contextTemplates.delete`

Delete context template. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.contextTemplates.delete({ template_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_uuid` | `string` | Yes | Template UUID |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`contextTemplates.get`

Get context template. (GET /context-templates/\{template\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.contextTemplates.get({ template_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_uuid` | `string` | Yes | Template UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the template was created. |
| `name` | `string \| null` | No | The name of the context template. |
| `template` | `string \| null` | No | The template content. |
| `uuid` | `string \| null` | No | The unique identifier of the context template. |

***

### list

`contextTemplates.list`

List context templates. (POST /context-templates/list)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.contextTemplates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `name` | `string` | No | Filters results to the context template with this exact name. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The context templates on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | The total number of context templates that match the request. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   name?: string | null,
>   template?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### update

`contextTemplates.update`

Update context template. (PUT /context-templates/\{template\_uuid})

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.contextTemplates.update({ template_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_uuid` | `string` | Yes | Template UUID |
| `name` | `string` | No | A unique, human-readable name for the template. |
| `template` | `string` | No | The template content used to render context blocks. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the template was created. |
| `name` | `string \| null` | No | The name of the context template. |
| `template` | `string \| null` | No | The template content. |
| `uuid` | `string \| null` | No | The unique identifier of the context template. |

***

## Debug Logs

### enable

`debugLogs.enable`

Enable debug logging. Enables debug logging for the project for one hour, or for 24 hours on the Enterprise plan. Episodes ingested while debug logging is enabled have a debug log (see graph.episode.get\_debug\_logs).

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.debugLogs.enable({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `duration_seconds` | `number \| null` | No | The number of seconds that debug logging stays enabled. |
| `ingestion_trace_enabled` | `boolean \| null` | No | Tells if ingestion tracing was also enabled. Ingestion tracing is available on the Flex, Flex Plus, and Enterprise plans. |

***

## Graphs

### clone

`graphs.clone`

Clone graph. (POST /graphs/\{graph\_uuid}/clone)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.clone({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph` | `object \| null` | No | — |
| `task` | `object \| null` | No | — |

> [accordion] graph full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   description?: string | null,
>   graph_id?: string | null,
>   name?: string | null,
>   time_zone?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> } | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### create

`graphs.create`

Create graph. (POST /graphs)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `content_policy` | `object` | No | — |
| `description` | `string` | No | A description of the graph. |
| `name` | `string` | No | A display name for the graph. |
| `time_zone` | `string` | No | The graph's IANA time zone. |

> [accordion] content\_policy full type
>
> ```ts theme={null}
> {
>   categories?: {
>     description?: string,
>     key?: string
>   }[],
>   project_revision?: number,
>   rules?: {
>     action?: exclude | include,
>     category_key?: string,
>     condition?: string,
>     description?: string,
>     edge_types?: string[],
>     entity_types?: string[],
>     patterns?: string[],
>     permitted_examples?: string[],
>     prohibited_examples?: string[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the graph was created. |
| `description` | `string \| null` | No | A description of the graph. |
| `graph_id` | `string \| null` | No | The developer-assigned identifier of the graph, present only for standard graphs. |
| `name` | `string \| null` | No | The display name of the graph. |
| `time_zone` | `string \| null` | No | The graph's IANA time zone. |
| `type` | `string \| null` | No | The kind of graph: user for a user's personal graph, or standard for a named graph created directly. |
| `updated_at` | `string \| null` | No | The time the graph was last updated. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user this graph belongs to, present only for a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the graph. |

***

### delete

`graphs.delete`

Delete graph. Cannot be undone. (DELETE /graphs/\{graph\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.graphs.delete({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### documentSummaries.list

`graphs.documentSummaries.list`

List document summaries. Lists the document summaries of a graph and returns one page of results. The default page\_size is 50, and the maximum page\_size is 100. You can sort by uuid or created\_at. The default sort is uuid in descending order.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.documentSummaries.list({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `uuid \| created_at` | No | — |
| `order` | `asc \| desc` | No | — |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The document summaries on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   document_id?: string | null,
>   last_summarized_at?: string | null,
>   last_summarized_episode_valid_at?: string | null,
>   summary?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### edges.add

`graphs.edges.add`

Add edges. Adds 1 to 100 edges. A name creates a node when deduplicate is false. When deduplicate is true, Zep matches a node by name first.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.edges.add({
	graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	edges: [{
		fact: 'example',
		fact_name: 'example',
		source_node: {},
		target_node: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `deduplicate` | `boolean` | No | When true, Zep compares each edge with graph edges and can merge a duplicate or invalidate a contradicted edge. This adds an LLM call per edge. The default is false. |
| `edges` | `object[]` | Yes | The edges to add to the graph. The request accepts 1 to 100 edges. |

> [accordion] edges full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any>,
>   expired_at?: string,
>   fact: string,
>   fact_name: string,
>   invalid_at?: string,
>   metadata?: Record<string, any>,
>   source_node: {
>     attributes?: Record<string, any>,
>     labels?: string[],
>     name?: string,
>     summary?: string,
>     uuid?: string
>   },
>   target_node: {
>     attributes?: Record<string, any>,
>     labels?: string[],
>     name?: string,
>     summary?: string,
>     uuid?: string
>   },
>   valid_at?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `edges` | `object[] \| null` | No | The accept-time acknowledgements in request order. |
| `task` | `object \| null` | No | — |

> [accordion] edges full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   expired_at?: string | null,
>   fact?: string | null,
>   fact_name?: string | null,
>   invalid_at?: string | null,
>   metadata?: Record<string, any> | null,
>   source_node?: {
>     attributes?: Record<string, any> | null,
>     labels?: string[] | null,
>     name?: string | null,
>     summary?: string | null,
>     uuid?: string | null
>   } | null,
>   source_node_uuid?: string | null,
>   target_node?: {
>     attributes?: Record<string, any> | null,
>     labels?: string[] | null,
>     name?: string | null,
>     summary?: string | null,
>     uuid?: string | null
>   } | null,
>   target_node_uuid?: string | null,
>   uuid?: string | null,
>   valid_at?: string | null
> }[] | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### edges.delete

`graphs.edges.delete`

Delete edge. Cannot be undone. (DELETE /graphs/\{graph\_uuid}/edges/\{edge\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.graphs.edges.delete({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', edge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `edge_uuid` | `string` | Yes | Edge UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### edges.get

`graphs.edges.get`

Get edge. (GET /graphs/\{graph\_uuid}/edges/\{edge\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.edges.get({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', edge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `edge_uuid` | `string` | Yes | Edge UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, any> \| null` | No | Additional attributes of the edge. |
| `created_at` | `string \| null` | No | The time the edge was created. |
| `episode_uuids` | `string[] \| null` | No | The episodes this edge was derived from. |
| `expired_at` | `string \| null` | No | The time the fact was superseded or removed. |
| `fact` | `string \| null` | No | The natural-language fact this edge represents. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this edge belongs to. |
| `hyperedge_uuid` | `string \| null` | No | The unique identifier of the hyperedge this edge is a member of. Omitted when the edge is not part of a hyperedge. |
| `invalid_at` | `string \| null` | No | The time at which the fact stopped being true. |
| `name` | `string \| null` | No | The name of the edge, in upper snake case, for example RELATES\_TO. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `scope` | `string \| null` | No | The kind of edge this is, for example entity or episodic. |
| `score` | `number \| null` | No | The ranking score returned with every search result; omitted when the edge appears in a plain list rather than a search result. |
| `source_node_labels` | `string[] \| null` | No | The current labels of the source node. This is read at request time rather than stored on the edge, and is omitted when the source node cannot be resolved. |
| `source_node_name` | `string \| null` | No | The current name of the source node. This is read at request time rather than stored on the edge, and is omitted when the source node cannot be resolved. |
| `source_node_uuid` | `string \| null` | No | The unique identifier of the edge's source node. |
| `target_node_labels` | `string[] \| null` | No | The current labels of the target node. This is read at request time rather than stored on the edge, and is omitted when the target node cannot be resolved. |
| `target_node_name` | `string \| null` | No | The current name of the target node. This is read at request time rather than stored on the edge, and is omitted when the target node cannot be resolved. |
| `target_node_uuid` | `string \| null` | No | The unique identifier of the edge's target node. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the edge. |
| `valid_at` | `string \| null` | No | The time from which the fact is considered true. |

***

### edges.list

`graphs.edges.list`

List edges. Lists the edges of a graph and returns one page of results. The default page\_size is 50, and the maximum page\_size is 100. You can sort by uuid, created\_at, or valid\_at. The default sort is uuid in descending order. An edge with no valid\_at sorts as if its valid\_at is 1970-01-01T00:00:00Z.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.edges.list({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `uuid \| created_at \| valid_at` | No | — |
| `order` | `asc \| desc` | No | — |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   connected_node_uuids?: string[],
>   content_policy_violated?: boolean,
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   edge_types?: string[],
>   edge_uuids?: string[],
>   episode_uuids?: string[],
>   exclude_edge_types?: string[],
>   exclude_node_labels?: string[],
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   node_labels?: string[],
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[],
>   source_node_uuids?: string[],
>   target_node_uuids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The edges on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   episode_uuids?: string[] | null,
>   expired_at?: string | null,
>   fact?: string | null,
>   graph_uuid?: string | null,
>   hyperedge_uuid?: string | null,
>   invalid_at?: string | null,
>   name?: string | null,
>   relevance?: number | null,
>   scope?: string | null,
>   score?: number | null,
>   source_node_labels?: string[] | null,
>   source_node_name?: string | null,
>   source_node_uuid?: string | null,
>   target_node_labels?: string[] | null,
>   target_node_name?: string | null,
>   target_node_uuid?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null,
>   valid_at?: string | null
> }[] | null
> ```

***

### edges.update

`graphs.edges.update`

Update edge. Updates one edge. When the edge belongs to a hyperedge, changing fact rewrites it on every member of that hyperedge in one all-or-nothing write, because the members share it. Attribute-only edits touch this edge alone.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.edges.update({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', edge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `edge_uuid` | `string` | Yes | Edge UUID |
| `attributes` | `object \| null` | No | Additional attributes to merge onto the edge; a key set to null is removed. |
| `fact` | `string` | No | The fact text describing the relationship between the source and target nodes. |

> [accordion] attributes full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, any> \| null` | No | Additional attributes of the edge. |
| `created_at` | `string \| null` | No | The time the edge was created. |
| `episode_uuids` | `string[] \| null` | No | The episodes this edge was derived from. |
| `expired_at` | `string \| null` | No | The time the fact was superseded or removed. |
| `fact` | `string \| null` | No | The natural-language fact this edge represents. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this edge belongs to. |
| `hyperedge_uuid` | `string \| null` | No | The unique identifier of the hyperedge this edge is a member of. Omitted when the edge is not part of a hyperedge. |
| `invalid_at` | `string \| null` | No | The time at which the fact stopped being true. |
| `name` | `string \| null` | No | The name of the edge, in upper snake case, for example RELATES\_TO. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `scope` | `string \| null` | No | The kind of edge this is, for example entity or episodic. |
| `score` | `number \| null` | No | The ranking score returned with every search result; omitted when the edge appears in a plain list rather than a search result. |
| `source_node_labels` | `string[] \| null` | No | The current labels of the source node. This is read at request time rather than stored on the edge, and is omitted when the source node cannot be resolved. |
| `source_node_name` | `string \| null` | No | The current name of the source node. This is read at request time rather than stored on the edge, and is omitted when the source node cannot be resolved. |
| `source_node_uuid` | `string \| null` | No | The unique identifier of the edge's source node. |
| `target_node_labels` | `string[] \| null` | No | The current labels of the target node. This is read at request time rather than stored on the edge, and is omitted when the target node cannot be resolved. |
| `target_node_name` | `string \| null` | No | The current name of the target node. This is read at request time rather than stored on the edge, and is omitted when the target node cannot be resolved. |
| `target_node_uuid` | `string \| null` | No | The unique identifier of the edge's target node. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the edge. |
| `valid_at` | `string \| null` | No | The time from which the fact is considered true. |

***

### episodes.add

`graphs.episodes.add`

Add episode. (POST /graphs/\{graph\_uuid}/episodes)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.episodes.add({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', data: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `data` | `string` | Yes | The episode content to add to the graph. |
| `document_id` | `string` | No | Groups this episode as a chunk of a document on the graph. |
| `metadata` | `Record<string, any>` | No | Metadata to store on the episode. Max 10 keys. Values must be strings, numbers, booleans, or arrays of scalars. |
| `reference_time` | `string` | No | The episode's reference time, used for temporal reasoning rather than ingestion time. Defaults to the ingestion time. |
| `source_description` | `string` | No | A description of the source of this episode. |
| `strict_ontology` | `boolean` | No | When true, prevents extraction of generic entity nodes that do not match the configured ontology. |
| `type` | `text \| json \| message` | No | The data format of the episode: text, json, or message. Defaults to text. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `episode` | `object \| null` | No | — |
| `task` | `object \| null` | No | — |

> [accordion] episode full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null
>   } | null,
>   created_at?: string | null,
>   document_id?: string | null,
>   expired_at?: string | null,
>   graph_uuid?: string | null,
>   metadata?: Record<string, any> | null,
>   processed?: boolean | null,
>   reference_time?: string | null,
>   relevance?: number | null,
>   role?: string | null,
>   role_name?: string | null,
>   score?: number | null,
>   source?: string | null,
>   source_description?: string | null,
>   thread_uuid?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null,
>   wait_status?: string | null
> } | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### episodes.delete

`graphs.episodes.delete`

Delete episode. Cannot be undone. (DELETE /graphs/\{graph\_uuid}/episodes/\{episode\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.graphs.episodes.delete({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', episode_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `episode_uuid` | `string` | Yes | Episode UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### episodes.get

`graphs.episodes.get`

Get episode. (GET /graphs/\{graph\_uuid}/episodes/\{episode\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.episodes.get({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', episode_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `episode_uuid` | `string` | Yes | Episode UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string \| null` | No | The raw content of the episode. |
| `content_policy` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | The time Zep received the episode. |
| `document_id` | `string \| null` | No | The developer-assigned identifier of the document this episode belongs to, present only for episodes added to a document. |
| `expired_at` | `string \| null` | No | The time when Zep stopped the processing of the episode because the episode waited for more than 7 days. An expired episode is not in the graph. Add the episode again to process it. The field is omitted for an episode that did not expire. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this episode belongs to. |
| `metadata` | `Record<string, any> \| null` | No | Custom metadata associated with the episode. |
| `processed` | `boolean \| null` | No | Whether the episode has finished graph extraction and indexing. |
| `reference_time` | `string \| null` | No | The episode's reference time, used for temporal reasoning: the time that the developer supplied on add, or the ingestion time when the developer supplied no time. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `role` | `string \| null` | No | — |
| `role_name` | `string \| null` | No | The free-form display name of the episode's sender, present only when the episode was added as a message. |
| `score` | `number \| null` | No | The ranking score returned with every search result; omitted when the episode appears in a plain list rather than a search result. |
| `source` | `string \| null` | No | — |
| `source_description` | `string \| null` | No | A free-form description of where the episode's content came from. |
| `thread_uuid` | `string \| null` | No | The thread this episode belongs to, present only for episodes added to a thread. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the episode. |
| `wait_status` | `string \| null` | No | — |

> [accordion] content\_policy full type
>
> ```ts theme={null}
> {
>   category_keys?: string[] | null,
>   dropped_count?: number | null,
>   retained_count?: number | null,
>   revision?: number | null,
>   status?: string | null,
>   violated?: boolean | null
> } | null
> ```

***

### episodes.getDebugLogs

`graphs.episodes.getDebugLogs`

Get episode debug logs. Returns the ingestion workflow log of an episode. The log exists only when debug logging was enabled for the project when the episode was ingested (see debug\_log.enable).

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.episodes.getDebugLogs({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', episode_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `episode_uuid` | `string` | Yes | Episode UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `completed_at` | `string \| null` | No | The time the ingestion workflow completed, present only after completion. |
| `entries` | `object[] \| null` | No | The log entries, oldest first. |
| `error` | `string \| null` | No | The error message, present only when the status is error. |
| `started_at` | `string \| null` | No | The time the ingestion workflow started. |
| `status` | `string \| null` | No | — |

> [accordion] entries full type
>
> ```ts theme={null}
> {
>   level?: string | null,
>   logged_at?: string | null,
>   message?: string | null
> }[] | null
> ```

***

### episodes.list

`graphs.episodes.list`

List episodes. Lists the episodes of a graph. filters.mentioned\_node\_uuids restricts the results to episodes that mention any of the listed node UUIDs. The list can also contain episode UUIDs: an episode UUID matches that episode, so one request can return a known set of episodes. At most 256 entries.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.episodes.list({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `created_at \| uuid` | No | — |
| `order` | `asc \| desc` | No | — |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   content_policy_violated?: boolean,
>   document_id?: string,
>   mentioned_node_uuids?: string[],
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The episodes on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null
>   } | null,
>   created_at?: string | null,
>   document_id?: string | null,
>   expired_at?: string | null,
>   graph_uuid?: string | null,
>   metadata?: Record<string, any> | null,
>   processed?: boolean | null,
>   reference_time?: string | null,
>   relevance?: number | null,
>   role?: string | null,
>   role_name?: string | null,
>   score?: number | null,
>   source?: string | null,
>   source_description?: string | null,
>   thread_uuid?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null,
>   wait_status?: string | null
> }[] | null
> ```

***

### episodes.listIngestionTraces

`graphs.episodes.listIngestionTraces`

List episode ingestion traces. Returns the ingestion traces of an episode, oldest first. Each trace records the input and the output of one ingestion step, with an explanation on each output entry that has one.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.episodes.listIngestionTraces({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', episode_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `episode_uuid` | `string` | Yes | Episode UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The ingestion traces on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   error?: string | null,
>   input?: {
>     candidate_edges?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_uuids?: string[] | null,
>       expired_at?: string | null,
>       explanation?: string | null,
>       fact?: string | null,
>       invalid_at?: string | null,
>       name?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null,
>       uuid?: string | null,
>       valid_at?: string | null
>     }[] | null,
>     candidate_nodes?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_indexes?: number[] | null,
>       explanation?: string | null,
>       labels?: string[] | null,
>       name?: string | null,
>       summary?: string | null,
>       uuid?: string | null
>     }[] | null,
>     custom_instructions?: string[] | null,
>     edge_types?: {
>       description?: string | null,
>       name?: string | null,
>       properties?: {
>         description?: string | null,
>         name?: string | null,
>         protected?: boolean | null,
>         type?: string | null
>       }[] | null,
>       source_targets?: {
>         source?: string | null,
>         target?: string | null
>       }[] | null
>     }[] | null,
>     entity_types?: {
>       description?: string | null,
>       identity_properties?: string[] | null,
>       name?: string | null,
>       parent?: string | null,
>       properties?: {
>         description?: string | null,
>         name?: string | null,
>         protected?: boolean | null,
>         type?: string | null
>       }[] | null
>     }[] | null,
>     episode_content?: string | null,
>     episodes?: {
>       content?: string | null,
>       source?: string | null,
>       uuid?: string | null,
>       valid_at?: string | null
>     }[] | null,
>     extracted_edges?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_uuids?: string[] | null,
>       expired_at?: string | null,
>       explanation?: string | null,
>       fact?: string | null,
>       invalid_at?: string | null,
>       name?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null,
>       uuid?: string | null,
>       valid_at?: string | null
>     }[] | null,
>     extracted_nodes?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_indexes?: number[] | null,
>       explanation?: string | null,
>       labels?: string[] | null,
>       name?: string | null,
>       summary?: string | null,
>       uuid?: string | null
>     }[] | null,
>     ignore_default_ontology?: boolean | null,
>     previous_episodes?: {
>       content?: string | null,
>       source?: string | null,
>       uuid?: string | null,
>       valid_at?: string | null
>     }[] | null,
>     protected_attribute_conflicts?: {
>       attribute?: string | null,
>       extracted_value?: any | null,
>       node_uuid?: string | null,
>       stored_value?: any | null
>     }[] | null,
>     resolved_nodes?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_indexes?: number[] | null,
>       explanation?: string | null,
>       labels?: string[] | null,
>       name?: string | null,
>       summary?: string | null,
>       uuid?: string | null
>     }[] | null
>   } | null,
>   output?: {
>     candidate_outcomes?: {
>       candidate_uuid?: string | null,
>       extracted_uuid?: string | null,
>       outcome?: string | null
>     }[] | null,
>     edge_invalidations?: {
>       invalidated_edge_uuid?: string | null,
>       invalidating_edges?: {
>         explanation?: string | null,
>         uuid?: string | null
>       }[] | null
>     }[] | null,
>     edges?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_uuids?: string[] | null,
>       expired_at?: string | null,
>       explanation?: string | null,
>       fact?: string | null,
>       invalid_at?: string | null,
>       name?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null,
>       uuid?: string | null,
>       valid_at?: string | null
>     }[] | null,
>     extracted_edges?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_uuids?: string[] | null,
>       expired_at?: string | null,
>       explanation?: string | null,
>       fact?: string | null,
>       invalid_at?: string | null,
>       name?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null,
>       uuid?: string | null,
>       valid_at?: string | null
>     }[] | null,
>     extracted_nodes?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_indexes?: number[] | null,
>       explanation?: string | null,
>       labels?: string[] | null,
>       name?: string | null,
>       summary?: string | null,
>       uuid?: string | null
>     }[] | null,
>     new_edges?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_uuids?: string[] | null,
>       expired_at?: string | null,
>       explanation?: string | null,
>       fact?: string | null,
>       invalid_at?: string | null,
>       name?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null,
>       uuid?: string | null,
>       valid_at?: string | null
>     }[] | null,
>     node_duplicates?: {
>       existing_node?: {
>         attributes?: Record<string, any> | null,
>         created_at?: string | null,
>         episode_indexes?: number[] | null,
>         explanation?: string | null,
>         labels?: string[] | null,
>         name?: string | null,
>         summary?: string | null,
>         uuid?: string | null
>       } | null,
>       extracted_node?: {
>         attributes?: Record<string, any> | null,
>         created_at?: string | null,
>         episode_indexes?: number[] | null,
>         explanation?: string | null,
>         labels?: string[] | null,
>         name?: string | null,
>         summary?: string | null,
>         uuid?: string | null
>       } | null
>     }[] | null,
>     node_resolutions?: {
>       explanation?: string | null,
>       extracted_node_uuid?: string | null,
>       resolved_node_uuid?: string | null
>     }[] | null,
>     nodes?: {
>       attributes?: Record<string, any> | null,
>       created_at?: string | null,
>       episode_indexes?: number[] | null,
>       explanation?: string | null,
>       labels?: string[] | null,
>       name?: string | null,
>       summary?: string | null,
>       uuid?: string | null
>     }[] | null
>   } | null,
>   status?: string | null,
>   step?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### episodes.update

`graphs.episodes.update`

Update episode. (PATCH /graphs/\{graph\_uuid}/episodes/\{episode\_uuid})

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.episodes.update({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', episode_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `episode_uuid` | `string` | Yes | Episode UUID |
| `metadata` | `object \| null` | No | Metadata to merge onto the episode; a key set to null is removed. Max 10 keys after the merge. Values must be strings, numbers, booleans, or arrays of scalars. |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string \| null` | No | The raw content of the episode. |
| `content_policy` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | The time Zep received the episode. |
| `document_id` | `string \| null` | No | The developer-assigned identifier of the document this episode belongs to, present only for episodes added to a document. |
| `expired_at` | `string \| null` | No | The time when Zep stopped the processing of the episode because the episode waited for more than 7 days. An expired episode is not in the graph. Add the episode again to process it. The field is omitted for an episode that did not expire. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this episode belongs to. |
| `metadata` | `Record<string, any> \| null` | No | Custom metadata associated with the episode. |
| `processed` | `boolean \| null` | No | Whether the episode has finished graph extraction and indexing. |
| `reference_time` | `string \| null` | No | The episode's reference time, used for temporal reasoning: the time that the developer supplied on add, or the ingestion time when the developer supplied no time. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `role` | `string \| null` | No | — |
| `role_name` | `string \| null` | No | The free-form display name of the episode's sender, present only when the episode was added as a message. |
| `score` | `number \| null` | No | The ranking score returned with every search result; omitted when the episode appears in a plain list rather than a search result. |
| `source` | `string \| null` | No | — |
| `source_description` | `string \| null` | No | A free-form description of where the episode's content came from. |
| `thread_uuid` | `string \| null` | No | The thread this episode belongs to, present only for episodes added to a thread. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the episode. |
| `wait_status` | `string \| null` | No | — |

> [accordion] content\_policy full type
>
> ```ts theme={null}
> {
>   category_keys?: string[] | null,
>   dropped_count?: number | null,
>   retained_count?: number | null,
>   revision?: number | null,
>   status?: string | null,
>   violated?: boolean | null
> } | null
> ```

***

### get

`graphs.get`

Get graph. (GET /graphs/\{graph\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.get({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the graph was created. |
| `description` | `string \| null` | No | A description of the graph. |
| `graph_id` | `string \| null` | No | The developer-assigned identifier of the graph, present only for standard graphs. |
| `name` | `string \| null` | No | The display name of the graph. |
| `time_zone` | `string \| null` | No | The graph's IANA time zone. |
| `type` | `string \| null` | No | The kind of graph: user for a user's personal graph, or standard for a named graph created directly. |
| `updated_at` | `string \| null` | No | The time the graph was last updated. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user this graph belongs to, present only for a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the graph. |

***

### getContentPolicy

`graphs.getContentPolicy`

Get graph content policy. Experimental: the request, the response, and the behavior of this operation can change. Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.getContentPolicy({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bound_at` | `string \| null` | No | When the graph bound the policy. |
| `categories` | `object[] \| null` | No | The categories of the policy. |
| `created_at` | `string \| null` | No | When this policy set was created. |
| `project_revision` | `number \| null` | No | The project revision number this graph bound at creation. It always equals revision. |
| `revision` | `number \| null` | No | The project revision number. 0 is the empty policy of a new project. |
| `rules` | `object[] \| null` | No | The rules of the policy. |
| `uuid` | `string \| null` | No | The identifier of this policy set. A project revision and every graph that binds it without additions share one uuid. |

> [accordion] categories full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   id?: string | null,
>   key?: string | null
> }[] | null
> ```

> [accordion] rules full type
>
> ```ts theme={null}
> {
>   action?: string | null,
>   category_key?: string | null,
>   condition?: string | null,
>   description?: string | null,
>   edge_types?: string[] | null,
>   entity_types?: string[] | null,
>   id?: string | null,
>   patterns?: string[] | null,
>   permitted_examples?: string[] | null,
>   prohibited_examples?: string[] | null
> }[] | null
> ```

***

### getContext

`graphs.getContext`

Assemble graph context. (POST /graphs/\{graph\_uuid}/context)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.getContext({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', query: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `filters` | `object` | No | — |
| `include_results` | `boolean` | No | When true, includes the raw graph results selected for the context block. |
| `max_characters` | `number` | No | The maximum number of characters in the assembled context block. |
| `query` | `string` | Yes | The search query used to assemble the context block. |
| `recency_bias` | `off \| mild \| strong` | No | Adjusts result selection to favor more recent graph data. |
| `template_uuid` | `string` | No | The UUID of a context template used to render the context block. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   connected_node_uuids?: string[],
>   content_policy_violated?: boolean,
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   edge_types?: string[],
>   edge_uuids?: string[],
>   episode_uuids?: string[],
>   exclude_edge_types?: string[],
>   exclude_node_labels?: string[],
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   node_labels?: string[],
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[],
>   source_node_uuids?: string[],
>   target_node_uuids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `context` | `string \| null` | No | The assembled context block of facts, entities, observations, and thread summaries. Pass it through the model provider's untrusted-data channel. |
| `results` | `object \| null` | No | — |
| `truncated` | `boolean \| null` | No | Whether the character budget limited the size of the context block. |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   edges?: {
>     attributes?: Record<string, any> | null,
>     created_at?: string | null,
>     episode_uuids?: string[] | null,
>     expired_at?: string | null,
>     fact?: string | null,
>     graph_uuid?: string | null,
>     hyperedge_uuid?: string | null,
>     invalid_at?: string | null,
>     name?: string | null,
>     relevance?: number | null,
>     scope?: string | null,
>     score?: number | null,
>     selection_rank?: number | null,
>     source_node_labels?: string[] | null,
>     source_node_name?: string | null,
>     source_node_uuid?: string | null,
>     target_node_labels?: string[] | null,
>     target_node_name?: string | null,
>     target_node_uuid?: string | null,
>     user_uuid?: string | null,
>     uuid?: string | null,
>     valid_at?: string | null
>   }[] | null,
>   episodes?: {
>     content?: string | null,
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null
>     } | null,
>     created_at?: string | null,
>     document_id?: string | null,
>     expired_at?: string | null,
>     graph_uuid?: string | null,
>     metadata?: Record<string, any> | null,
>     processed?: boolean | null,
>     reference_time?: string | null,
>     relevance?: number | null,
>     role?: string | null,
>     role_name?: string | null,
>     score?: number | null,
>     selection_rank?: number | null,
>     source?: string | null,
>     source_description?: string | null,
>     thread_uuid?: string | null,
>     user_uuid?: string | null,
>     uuid?: string | null,
>     wait_status?: string | null
>   }[] | null,
>   nodes?: {
>     attributes?: Record<string, any> | null,
>     created_at?: string | null,
>     degree?: number | null,
>     episode_uuids?: string[] | null,
>     episode_uuids_truncated?: boolean | null,
>     graph_uuid?: string | null,
>     labels?: string[] | null,
>     name?: string | null,
>     relevance?: number | null,
>     score?: number | null,
>     selection_rank?: number | null,
>     summary?: string | null,
>     user_uuid?: string | null,
>     uuid?: string | null
>   }[] | null,
>   observations?: {
>     attributes?: Record<string, any> | null,
>     created_at?: string | null,
>     episode_uuids?: string[] | null,
>     graph_uuid?: string | null,
>     labels?: string[] | null,
>     name?: string | null,
>     relevance?: number | null,
>     score?: number | null,
>     selection_rank?: number | null,
>     summary?: string | null,
>     user_uuid?: string | null,
>     uuid?: string | null
>   }[] | null,
>   thread_summaries?: {
>     created_at?: string | null,
>     graph_uuid?: string | null,
>     last_summarized_at?: string | null,
>     last_summarized_episode_valid_at?: string | null,
>     relevance?: number | null,
>     score?: number | null,
>     selection_rank?: number | null,
>     summary?: string | null,
>     thread_uuid?: string | null,
>     uuid?: string | null
>   }[] | null
> } | null
> ```

***

### getInclusionRules

`graphs.getInclusionRules`

Get graph inclusion rules. Returns the graph rules, for example \{"inclusion\_rules":\[],"inherited":true}. A free project answered 404 not\_found to both the read and the write (11-27): the feature may need enabling on the account.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.getInclusionRules({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | Graph UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inclusion_rules` | `object[] \| null` | No | InclusionRules replaces the complete rule set at this scope. |
| `inherited` | `boolean \| null` | No | Inherited identifies a graph that uses project defaults. |

> [accordion] inclusion\_rules full type
>
> ```ts theme={null}
> {
>   condition?: string | null,
>   effect?: string | null,
>   name?: string | null,
>   target?: string | null,
>   types?: string[] | null
> }[] | null
> ```

***

### getInstructions

`graphs.getInstructions`

Get graph instructions. (GET /graphs/\{graph\_uuid}/instructions)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.getInstructions({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[] \| null` | No | The custom extraction instructions in effect at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### getKnowledge

`graphs.getKnowledge`

Get graph knowledge. Returns the domain knowledge in effect at this scope. The knowledge\_api account flag must be enabled. Response example: \{"knowledge":\[\{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.getKnowledge({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph or its user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Inherited is true when the graph uses the project entries. |
| `knowledge` | `object[] \| null` | No | The domain knowledge entries in effect at this scope. |

> [accordion] knowledge full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### getObservationSteering

`graphs.getObservationSteering`

Get graph observation steering. (GET /graphs/\{graph\_uuid}/observation-steering)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.getObservationSteering({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instruction` | `string \| null` | No | The natural-language instruction steering how observations are generated at this scope. |
| `types` | `object[] \| null` | No | The named observation types, each with a description, that generation should steer toward at this scope. |

> [accordion] types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### getOntology

`graphs.getOntology`

Get graph ontology. (GET /graphs/\{graph\_uuid}/ontology)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.getOntology({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `edge_type_hierarchy` | `object \| null` | No | The edge type hierarchy. Omitted when the ontology has no edge subtypes. |
| `edge_types` | `object[] \| null` | No | The edge types defined in the ontology in effect at this scope. |
| `entity_type_hierarchy` | `object \| null` | No | The entity type hierarchy. Omitted when the ontology has no entity subtypes. |
| `entity_types` | `object[] \| null` | No | The entity types defined in the ontology in effect at this scope. |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |

> [accordion] edge\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] edge\_types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null,
>   properties?: {
>     description?: string | null,
>     name?: string | null,
>     protected?: boolean | null,
>     type?: string | null
>   }[] | null,
>   source_targets?: {
>     source?: string | null,
>     target?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] entity\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] entity\_types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   identity_properties?: string[] | null,
>   name?: string | null,
>   properties?: {
>     description?: string | null,
>     name?: string | null,
>     protected?: boolean | null,
>     type?: string | null
>   }[] | null
> }[] | null
> ```

***

### getSubgraph

`graphs.getSubgraph`

Get subgraph. (POST /graphs/\{graph\_uuid}/subgraph)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.getSubgraph({
	graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	seed_node_uuids: ['3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `depth` | `number` | No | The maximum traversal depth from the seed nodes. Defaults to 1. |
| `direction` | `in \| out \| both` | No | The edge orientation to follow during expansion: in, out, or both. Defaults to both. |
| `filters` | `object` | No | — |
| `max_edges` | `number` | No | The maximum number of edges in the response. Defaults to 200. |
| `max_nodes` | `number` | No | The maximum number of nodes in the response. Defaults to 100. |
| `seed_node_uuids` | `string[]` | Yes | The node UUIDs to expand from, in traversal-priority order. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   connected_node_uuids?: string[],
>   content_policy_violated?: boolean,
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   edge_types?: string[],
>   edge_uuids?: string[],
>   episode_uuids?: string[],
>   exclude_edge_types?: string[],
>   exclude_node_labels?: string[],
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   node_labels?: string[],
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[],
>   source_node_uuids?: string[],
>   target_node_uuids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `edges` | `object[] \| null` | No | Every traversed edge that passed the request filters; both endpoints of every edge are present in nodes. |
| `nodes` | `object[] \| null` | No | Every admitted seed node and every node reached within the traversal budget. |
| `truncated` | `boolean \| null` | No | Whether any budget or limit reduced the result. |
| `truncation_reason` | `string \| null` | No | The binding limit that caused truncation, such as max\_nodes or max\_edges; present only when truncated is true. |

> [accordion] edges full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   episode_uuids?: string[] | null,
>   expired_at?: string | null,
>   fact?: string | null,
>   graph_uuid?: string | null,
>   hyperedge_uuid?: string | null,
>   invalid_at?: string | null,
>   name?: string | null,
>   relevance?: number | null,
>   scope?: string | null,
>   score?: number | null,
>   source_node_labels?: string[] | null,
>   source_node_name?: string | null,
>   source_node_uuid?: string | null,
>   target_node_labels?: string[] | null,
>   target_node_name?: string | null,
>   target_node_uuid?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null,
>   valid_at?: string | null
> }[] | null
> ```

> [accordion] nodes full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   degree?: number | null,
>   episode_uuids?: string[] | null,
>   episode_uuids_truncated?: boolean | null,
>   graph_uuid?: string | null,
>   labels?: string[] | null,
>   name?: string | null,
>   relevance?: number | null,
>   score?: number | null,
>   summary?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### hyperedges.add

`graphs.hyperedges.add`

Add hyperedge. Creates one hyperedge: a fact that relates more than two nodes, written onto one member edge per node pair. The member edges must span at least three distinct nodes, since two nodes are a pair of edges rather than a hyperedge; a single pair uses graph.edge.add.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.hyperedges.add({
	graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	edges: [{
		name: 'example',
		source_node: {},
		target_node: {},
	}],
	fact: 'example',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `attributes` | `Record<string, any>` | No | Additional attributes to store on every member edge. |
| `edges` | `object[]` | Yes | The member edges to create. Each pair becomes one edge carrying the shared fact. |
| `expired_at` | `string` | No | The time at which the fact was superseded or invalidated. |
| `fact` | `string` | Yes | The natural-language fact, written onto every member edge. |
| `invalid_at` | `string` | No | The time at which the fact stopped being true. |
| `metadata` | `Record<string, any>` | No | Metadata attached to the episode created for this hyperedge. |
| `valid_at` | `string` | No | The time at which the fact became true. |

> [accordion] edges full type
>
> ```ts theme={null}
> {
>   name: string,
>   source_node: {
>     attributes?: Record<string, any>,
>     labels?: string[],
>     name?: string,
>     summary?: string,
>     uuid?: string
>   },
>   target_node: {
>     attributes?: Record<string, any>,
>     labels?: string[],
>     name?: string,
>     summary?: string,
>     uuid?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `hyperedge` | `object \| null` | No | — |
| `task` | `object \| null` | No | — |

> [accordion] hyperedge full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   edges?: {
>     name?: string | null,
>     source_node?: {
>       attributes?: Record<string, any> | null,
>       labels?: string[] | null,
>       name?: string | null,
>       summary?: string | null,
>       uuid?: string | null
>     } | null,
>     target_node?: {
>       attributes?: Record<string, any> | null,
>       labels?: string[] | null,
>       name?: string | null,
>       summary?: string | null,
>       uuid?: string | null
>     } | null,
>     uuid?: string | null
>   }[] | null,
>   expired_at?: string | null,
>   fact?: string | null,
>   invalid_at?: string | null,
>   metadata?: Record<string, any> | null,
>   uuid?: string | null,
>   valid_at?: string | null
> } | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### hyperedges.createEdge

`graphs.hyperedges.createEdge`

Add hyperedge member. Adds one member edge to an existing hyperedge. The new member inherits the hyperedge's fact and timestamps and joins its episodes, so only its own name and node pair are supplied. The response contains the UUID that Zep assigned and the name and nodes that you supplied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.hyperedges.createEdge({
	graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	hyperedge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	name: 'example',
	source_node: {},
	target_node: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `hyperedge_uuid` | `string` | Yes | Hyperedge UUID |
| `name` | `string` | Yes | The name of the new member edge, in upper snake case. |
| `source_node` | `object` | Yes | — |
| `target_node` | `object` | Yes | — |

> [accordion] source\_node full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any>,
>   labels?: string[],
>   name?: string,
>   summary?: string,
>   uuid?: string
> }
> ```

> [accordion] target\_node full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any>,
>   labels?: string[],
>   name?: string,
>   summary?: string,
>   uuid?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `edge` | `object \| null` | No | — |
| `task` | `object \| null` | No | — |

> [accordion] edge full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   expired_at?: string | null,
>   fact?: string | null,
>   fact_name?: string | null,
>   invalid_at?: string | null,
>   metadata?: Record<string, any> | null,
>   source_node?: {
>     attributes?: Record<string, any> | null,
>     labels?: string[] | null,
>     name?: string | null,
>     summary?: string | null,
>     uuid?: string | null
>   } | null,
>   source_node_uuid?: string | null,
>   target_node?: {
>     attributes?: Record<string, any> | null,
>     labels?: string[] | null,
>     name?: string | null,
>     summary?: string | null,
>     uuid?: string | null
>   } | null,
>   target_node_uuid?: string | null,
>   uuid?: string | null,
>   valid_at?: string | null
> } | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### hyperedges.delete

`graphs.hyperedges.delete`

Delete hyperedge. Deletes every member edge of the hyperedge. After the task completes the hyperedge and each of its members are gone. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.graphs.hyperedges.delete({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', hyperedge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `hyperedge_uuid` | `string` | Yes | Hyperedge UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### hyperedges.deleteEdge

`graphs.hyperedges.deleteEdge`

Delete hyperedge member. Removes one member edge from the hyperedge. The remaining members stay in the hyperedge, and deleting the last member removes the hyperedge itself. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.graphs.hyperedges.deleteEdge({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', hyperedge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', edge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `hyperedge_uuid` | `string` | Yes | Hyperedge UUID |
| `edge_uuid` | `string` | Yes | Edge UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### hyperedges.get

`graphs.hyperedges.get`

Get hyperedge. Returns one hyperedge assembled from its member edges. The fact and the validity timestamps are shared by every member and are reported on the hyperedge; each member reports only its own name and endpoints.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.hyperedges.get({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', hyperedge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `hyperedge_uuid` | `string` | Yes | Hyperedge UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the hyperedge was created. Every member edge shares this value. |
| `edges` | `object[] \| null` | No | The member edges, ordered by uuid. Each carries only its own identity and endpoints; the shared fact and timestamps are on the hyperedge. |
| `expired_at` | `string \| null` | No | The time the fact was superseded or removed. |
| `fact` | `string \| null` | No | The natural-language fact this hyperedge represents. Every member edge carries the same fact. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this hyperedge belongs to. |
| `invalid_at` | `string \| null` | No | The time at which the fact stopped being true. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the hyperedge. |
| `valid_at` | `string \| null` | No | The time from which the fact is considered true. |

> [accordion] edges full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   source_node_uuid?: string | null,
>   target_node_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### hyperedges.list

`graphs.hyperedges.list`

List hyperedges. Returns the graph's hyperedges. A hyperedge is listed while it has at least one member edge. Supported filters are node\_uuids, edge\_uuids and episode\_uuids: a hyperedge matches a list when any of its members does, and must match every list supplied.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.hyperedges.list({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `uuid \| created_at` | No | — |
| `order` | `asc \| desc` | No | — |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   edge_uuids?: string[],
>   episode_uuids?: string[],
>   node_uuids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   edges?: {
>     name?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null,
>     uuid?: string | null
>   }[] | null,
>   expired_at?: string | null,
>   fact?: string | null,
>   graph_uuid?: string | null,
>   invalid_at?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null,
>   valid_at?: string | null
> }[] | null
> ```

***

### hyperedges.update

`graphs.hyperedges.update`

Update hyperedge. Updates the shared fact and writes it onto every member edge in one all-or-nothing write: either every member carries the new fact or none does. Only fact is accepted, because it is the only field the members share.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.hyperedges.update({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', hyperedge_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `hyperedge_uuid` | `string` | Yes | Hyperedge UUID |
| `fact` | `string` | No | The natural-language fact, rewritten onto every member edge. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the hyperedge was created. Every member edge shares this value. |
| `edges` | `object[] \| null` | No | The member edges, ordered by uuid. Each carries only its own identity and endpoints; the shared fact and timestamps are on the hyperedge. |
| `expired_at` | `string \| null` | No | The time the fact was superseded or removed. |
| `fact` | `string \| null` | No | The natural-language fact this hyperedge represents. Every member edge carries the same fact. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this hyperedge belongs to. |
| `invalid_at` | `string \| null` | No | The time at which the fact stopped being true. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the hyperedge. |
| `valid_at` | `string \| null` | No | The time from which the fact is considered true. |

> [accordion] edges full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   source_node_uuid?: string | null,
>   target_node_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### list

`graphs.list`

List graphs. (POST /graphs/list)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `created_at \| name \| uuid` | No | — |
| `order` | `asc \| desc` | No | — |
| `search` | `string` | No | Filters results to graphs whose name, description, or graph ID contains this text. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The graphs on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | The total number of graphs that match the request. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   description?: string | null,
>   graph_id?: string | null,
>   name?: string | null,
>   time_zone?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### listContentPolicyEvents

`graphs.listContentPolicyEvents`

List graph content policy events. Experimental: the request, the response, and the behavior of this operation can change. Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.listContentPolicyEvents({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   drop_reason?: match | indeterminate | oversize | dependent,
>   episode_uuid?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The events on this page, newest first. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of events that match the filters. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   artifact_kind?: string | null,
>   category_keys?: string[] | null,
>   decided_at?: string | null,
>   drop_reason?: string | null,
>   episode_uuid?: string | null,
>   id?: string | null,
>   matched_by?: string[] | null,
>   revision?: number | null,
>   rule_ids?: string[] | null
> }[] | null
> ```

***

### listMetadataKeys

`graphs.listMetadataKeys`

List graph metadata keys. Returns the append-only metadata keys recorded for a graph. A key can remain in the list after no episode or message uses it.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.listMetadataKeys({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of keys per page. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The append-only keys recorded for the graph. A key can remain after no episode or message uses it. |
| `next_cursor` | `string \| null` | No | The cursor for the next page, when more keys exist. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   key?: string | null
> }[] | null
> ```

***

### lookup

`graphs.lookup`

Lookup graph by developer id. (POST /graphs/lookup)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.lookup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_id` | `string` | No | The developer-assigned graph ID to resolve to a UUID. Mutually exclusive with user\_id and thread\_id. |
| `thread_id` | `string` | No | The developer-assigned thread ID to resolve to a UUID. Mutually exclusive with user\_id and graph\_id. |
| `user_id` | `string` | No | The developer-assigned user ID to resolve to a UUID. Mutually exclusive with thread\_id and graph\_id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the graph was created. |
| `description` | `string \| null` | No | A description of the graph. |
| `graph_id` | `string \| null` | No | The developer-assigned identifier of the graph, present only for standard graphs. |
| `name` | `string \| null` | No | The display name of the graph. |
| `time_zone` | `string \| null` | No | The graph's IANA time zone. |
| `type` | `string \| null` | No | The kind of graph: user for a user's personal graph, or standard for a named graph created directly. |
| `updated_at` | `string \| null` | No | The time the graph was last updated. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user this graph belongs to, present only for a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the graph. |

***

### nodes.add

`graphs.nodes.add`

Add nodes. (POST /graphs/\{graph\_uuid}/nodes)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.nodes.add({
	graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	nodes: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `nodes` | `object[]` | Yes | The nodes to add to the graph. |

> [accordion] nodes full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any>,
>   label?: string,
>   metadata?: Record<string, any>,
>   name: string,
>   summary?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nodes` | `object[] \| null` | No | An accept-time acknowledgement of the nodes you submitted, each carrying its assigned identifier and the fields you supplied, not the full stored node. |
| `task` | `object \| null` | No | — |

> [accordion] nodes full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   label?: string | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   summary?: string | null,
>   uuid?: string | null
> }[] | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### nodes.delete

`graphs.nodes.delete`

Delete node. Cannot be undone. (DELETE /graphs/\{graph\_uuid}/nodes/\{node\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.graphs.nodes.delete({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', node_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `node_uuid` | `string` | Yes | Node UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### nodes.get

`graphs.nodes.get`

Get node. (GET /graphs/\{graph\_uuid}/nodes/\{node\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.nodes.get({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', node_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `node_uuid` | `string` | Yes | Node UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, any> \| null` | No | Additional attributes of the node, as defined by its entity type. |
| `created_at` | `string \| null` | No | The time the node was created. |
| `degree` | `number \| null` | No | The count of live entity edges that touch this node, in both directions. Present only when the list request orders by `degree`. |
| `episode_uuids` | `string[] \| null` | No | The UUIDs of the live episodes that mention this node, newest first. The list is complete when `episode_uuids_truncated` is false. The list holds the newest 100 when the node has more than 100 source episodes; list episodes with the `mentioned_node_uuids` filter to read them all. |
| `episode_uuids_truncated` | `boolean \| null` | No | True when the node has more than 100 source episodes, so `episode_uuids` holds only the newest 100, or when provenance is unavailable. False means `episode_uuids` is the complete set. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this node belongs to. |
| `labels` | `string[] \| null` | No | The entity type labels assigned to the node. |
| `name` | `string \| null` | No | The name of the entity that the node represents. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `score` | `number \| null` | No | The ranking score returned with every search result; omitted when the node appears in a plain list rather than a search result. |
| `summary` | `string \| null` | No | A generated summary of the entity that the node represents. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The node UUID, assigned by Zep. |

***

### nodes.list

`graphs.nodes.list`

List nodes. Lists the nodes of a graph and returns one page of results. The default page\_size is 50, and the maximum page\_size is 100. You can sort by uuid, created\_at, or degree. The default sort is uuid in descending order.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.nodes.list({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `uuid \| created_at \| degree` | No | — |
| `order` | `asc \| desc` | No | — |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   connected_node_uuids?: string[],
>   content_policy_violated?: boolean,
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   edge_types?: string[],
>   edge_uuids?: string[],
>   episode_uuids?: string[],
>   exclude_edge_types?: string[],
>   exclude_node_labels?: string[],
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   node_labels?: string[],
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[],
>   source_node_uuids?: string[],
>   target_node_uuids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The nodes on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   degree?: number | null,
>   episode_uuids?: string[] | null,
>   episode_uuids_truncated?: boolean | null,
>   graph_uuid?: string | null,
>   labels?: string[] | null,
>   name?: string | null,
>   relevance?: number | null,
>   score?: number | null,
>   summary?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### nodes.listNeighbors

`graphs.nodes.listNeighbors`

List node neighbors. (POST /graphs/\{graph\_uuid}/nodes/\{node\_uuid}/neighbors)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.nodes.listNeighbors({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', node_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `node_uuid` | `string` | Yes | Node UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `uuid \| created_at` | No | — |
| `order` | `asc \| desc` | No | — |
| `direction` | `in \| out \| both` | No | The edge orientation to follow from the node: in, out, or both. |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   connected_node_uuids?: string[],
>   content_policy_violated?: boolean,
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   edge_types?: string[],
>   edge_uuids?: string[],
>   episode_uuids?: string[],
>   exclude_edge_types?: string[],
>   exclude_node_labels?: string[],
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   node_labels?: string[],
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[],
>   source_node_uuids?: string[],
>   target_node_uuids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The neighboring nodes and their connecting edges on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   edges?: {
>     attributes?: Record<string, any> | null,
>     created_at?: string | null,
>     episode_uuids?: string[] | null,
>     expired_at?: string | null,
>     fact?: string | null,
>     graph_uuid?: string | null,
>     hyperedge_uuid?: string | null,
>     invalid_at?: string | null,
>     name?: string | null,
>     relevance?: number | null,
>     scope?: string | null,
>     score?: number | null,
>     source_node_labels?: string[] | null,
>     source_node_name?: string | null,
>     source_node_uuid?: string | null,
>     target_node_labels?: string[] | null,
>     target_node_name?: string | null,
>     target_node_uuid?: string | null,
>     user_uuid?: string | null,
>     uuid?: string | null,
>     valid_at?: string | null
>   }[] | null,
>   node?: {
>     attributes?: Record<string, any> | null,
>     created_at?: string | null,
>     degree?: number | null,
>     episode_uuids?: string[] | null,
>     episode_uuids_truncated?: boolean | null,
>     graph_uuid?: string | null,
>     labels?: string[] | null,
>     name?: string | null,
>     relevance?: number | null,
>     score?: number | null,
>     summary?: string | null,
>     user_uuid?: string | null,
>     uuid?: string | null
>   } | null
> }[] | null
> ```

***

### nodes.update

`graphs.nodes.update`

Update node. (PATCH /graphs/\{graph\_uuid}/nodes/\{node\_uuid})

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.nodes.update({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', node_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `node_uuid` | `string` | Yes | Node UUID |
| `attributes` | `object \| null` | No | Additional attributes to merge onto the node; a key set to null is removed. |
| `name` | `string` | No | The node's name. |
| `summary` | `string` | No | A summary of the node. |

> [accordion] attributes full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, any> \| null` | No | Additional attributes of the node, as defined by its entity type. |
| `created_at` | `string \| null` | No | The time the node was created. |
| `degree` | `number \| null` | No | The count of live entity edges that touch this node, in both directions. Present only when the list request orders by `degree`. |
| `episode_uuids` | `string[] \| null` | No | The UUIDs of the live episodes that mention this node, newest first. The list is complete when `episode_uuids_truncated` is false. The list holds the newest 100 when the node has more than 100 source episodes; list episodes with the `mentioned_node_uuids` filter to read them all. |
| `episode_uuids_truncated` | `boolean \| null` | No | True when the node has more than 100 source episodes, so `episode_uuids` holds only the newest 100, or when provenance is unavailable. False means `episode_uuids` is the complete set. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this node belongs to. |
| `labels` | `string[] \| null` | No | The entity type labels assigned to the node. |
| `name` | `string \| null` | No | The name of the entity that the node represents. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `score` | `number \| null` | No | The ranking score returned with every search result; omitted when the node appears in a plain list rather than a search result. |
| `summary` | `string \| null` | No | A generated summary of the entity that the node represents. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The node UUID, assigned by Zep. |

***

### observations.get

`graphs.observations.get`

Get observation. (GET /graphs/\{graph\_uuid}/observations/\{observation\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.observations.get({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', observation_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `observation_uuid` | `string` | Yes | Observation UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, any> \| null` | No | Additional attributes of the derived node, as defined by its entity type. |
| `created_at` | `string \| null` | No | The time the observation was created. |
| `episode_uuids` | `string[] \| null` | No | The unique identifiers of the episodes that support this observation. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this observation belongs to. |
| `labels` | `string[] \| null` | No | The labels identifying the type of this observation. |
| `name` | `string \| null` | No | The name of the observation. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `score` | `number \| null` | No | The ranking score returned with every search result; omitted when the observation appears in a plain list rather than a search result. |
| `summary` | `string \| null` | No | A generated summary of the observation. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the observation, assigned by Zep. |

***

### observations.list

`graphs.observations.list`

List observations. Lists the observations of a graph and returns one page of results. The default page\_size is 50, and the maximum page\_size is 100. You can sort by uuid or created\_at. The default sort is uuid in descending order.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.observations.list({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `uuid \| created_at` | No | — |
| `order` | `asc \| desc` | No | — |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The observations on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   episode_uuids?: string[] | null,
>   graph_uuid?: string | null,
>   labels?: string[] | null,
>   name?: string | null,
>   relevance?: number | null,
>   score?: number | null,
>   summary?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### query

`graphs.query`

Query a graph. Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.query({
	graph_uuids: ['3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c'],
	query: 'example',
	stream: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `generate_answer` | `boolean` | No | When true, a model also writes an answer from the retrieved records. The default is false: the response has the records and no answer. |
| `graph_uuids` | `string[]` | Yes | The graph UUIDs to query. The current release accepts one UUID. |
| `guidance` | `string` | No | Optional caller guidance for the answer. The agent treats it as untrusted text. |
| `mode` | `fast \| deep` | No | — |
| `query` | `string` | Yes | The natural-language query for the graph. |
| `stream` | `true` | Yes | When true, return the retrieval calls as server-sent events. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `text` | `string` | Yes | The response body as text. |
| `contentType` | `string \| null` | Yes | The content type Zep answered with. |

***

### searchEdges

`graphs.searchEdges`

Search edges. Edge search does not support node\_labels, exclude\_node\_labels, or content\_policy\_violated. content\_policy\_violated is supported on episode search only. An edge has two nodes, so a node label filter is not defined for edge search.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.searchEdges({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', query: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page. |
| `cursor` | `string` | No | Opaque page cursor |
| `query` | `string` | Yes | The search query. |
| `bfs_origin_node_uuids` | `string[]` | No | Nodes used as BFS origins for graph-distance-aware retrieval. |
| `center_node_uuid` | `string` | No | The node to rank results by distance from. Required when reranker is node\_distance. |
| `filter_low_quality_results` | `boolean` | No | The default is false. When true, Zep removes low-quality results at the knee of the cross-encoder score curve. The filter never removes a result with a score of 0.9 or more. It keeps at least 5 results, or all results when fewer than 5 are available. The filter only removes results, so a page still returns up to page\_size results. Use this field only with reranker cross\_encoder. It is not supported for episode search. Invalid combinations return a 400 error. The cutoff is approximate, not guaranteed. When the cross-encoder does not score the results, for example after a timeout, Zep returns the results without the filter. |
| `filters` | `object` | No | — |
| `mmr_lambda` | `number` | No | The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. |
| `reranker` | `rrf \| mmr \| node_distance \| episode_mentions \| cross_encoder` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   connected_node_uuids?: string[],
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   edge_types?: string[],
>   edge_uuids?: string[],
>   episode_uuids?: string[],
>   exclude_edge_types?: string[],
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[],
>   source_node_uuids?: string[],
>   target_node_uuids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The edges on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   episode_uuids?: string[] | null,
>   expired_at?: string | null,
>   fact?: string | null,
>   graph_uuid?: string | null,
>   hyperedge_uuid?: string | null,
>   invalid_at?: string | null,
>   name?: string | null,
>   relevance?: number | null,
>   scope?: string | null,
>   score?: number | null,
>   source_node_labels?: string[] | null,
>   source_node_name?: string | null,
>   source_node_uuid?: string | null,
>   target_node_labels?: string[] | null,
>   target_node_name?: string | null,
>   target_node_uuid?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null,
>   valid_at?: string | null
> }[] | null
> ```

***

### searchEpisodes

`graphs.searchEpisodes`

Search episodes. Episode search supports only the metadata\_filters and content\_policy\_violated filters. Every other filter returns unsupported\_filter.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.searchEpisodes({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', query: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page. |
| `cursor` | `string` | No | Opaque page cursor |
| `query` | `string` | Yes | The search query. |
| `bfs_origin_node_uuids` | `string[]` | No | Nodes used as BFS origins for graph-distance-aware retrieval. |
| `center_node_uuid` | `string` | No | The node to rank results by distance from. Required when reranker is node\_distance. |
| `filter_low_quality_results` | `boolean` | No | The default is false. When true, Zep removes low-quality results at the knee of the cross-encoder score curve. The filter never removes a result with a score of 0.9 or more. It keeps at least 5 results, or all results when fewer than 5 are available. The filter only removes results, so a page still returns up to page\_size results. Use this field only with reranker cross\_encoder. It is not supported for episode search. Invalid combinations return a 400 error. The cutoff is approximate, not guaranteed. When the cross-encoder does not score the results, for example after a timeout, Zep returns the results without the filter. |
| `filters` | `object` | No | — |
| `mmr_lambda` | `number` | No | The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. |
| `reranker` | `rrf \| mmr \| node_distance \| episode_mentions \| cross_encoder` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   content_policy_violated?: boolean,
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The episodes on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null
>   } | null,
>   created_at?: string | null,
>   document_id?: string | null,
>   expired_at?: string | null,
>   graph_uuid?: string | null,
>   metadata?: Record<string, any> | null,
>   processed?: boolean | null,
>   reference_time?: string | null,
>   relevance?: number | null,
>   role?: string | null,
>   role_name?: string | null,
>   score?: number | null,
>   source?: string | null,
>   source_description?: string | null,
>   thread_uuid?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null,
>   wait_status?: string | null
> }[] | null
> ```

***

### searchNodes

`graphs.searchNodes`

Search nodes. Node search does not support edge\_types, exclude\_edge\_types, edge\_uuids, connected\_node\_uuids, source\_node\_uuids, target\_node\_uuids, date\_filters, or content\_policy\_violated. content\_policy\_violated is supported on episode search only. The edge filters select edges.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.searchNodes({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', query: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page. |
| `cursor` | `string` | No | Opaque page cursor |
| `query` | `string` | Yes | The search query. |
| `bfs_origin_node_uuids` | `string[]` | No | Nodes used as BFS origins for graph-distance-aware retrieval. |
| `center_node_uuid` | `string` | No | The node to rank results by distance from. Required when reranker is node\_distance. |
| `filter_low_quality_results` | `boolean` | No | The default is false. When true, Zep removes low-quality results at the knee of the cross-encoder score curve. The filter never removes a result with a score of 0.9 or more. It keeps at least 5 results, or all results when fewer than 5 are available. The filter only removes results, so a page still returns up to page\_size results. Use this field only with reranker cross\_encoder. It is not supported for episode search. Invalid combinations return a 400 error. The cutoff is approximate, not guaranteed. When the cross-encoder does not score the results, for example after a timeout, Zep returns the results without the filter. |
| `filters` | `object` | No | — |
| `mmr_lambda` | `number` | No | The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. |
| `reranker` | `rrf \| mmr \| node_distance \| episode_mentions \| cross_encoder` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   episode_uuids?: string[],
>   exclude_node_labels?: string[],
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   node_labels?: string[],
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The nodes on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   degree?: number | null,
>   episode_uuids?: string[] | null,
>   episode_uuids_truncated?: boolean | null,
>   graph_uuid?: string | null,
>   labels?: string[] | null,
>   name?: string | null,
>   relevance?: number | null,
>   score?: number | null,
>   summary?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### searchObservations

`graphs.searchObservations`

Search observations. Observation search supports no filters. Every filter returns unsupported\_filter.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.searchObservations({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', query: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page. |
| `cursor` | `string` | No | Opaque page cursor |
| `query` | `string` | Yes | The search query. |
| `bfs_origin_node_uuids` | `string[]` | No | Nodes used as BFS origins for graph-distance-aware retrieval. |
| `center_node_uuid` | `string` | No | The node to rank results by distance from. Required when reranker is node\_distance. |
| `filter_low_quality_results` | `boolean` | No | The default is false. When true, Zep removes low-quality results at the knee of the cross-encoder score curve. The filter never removes a result with a score of 0.9 or more. It keeps at least 5 results, or all results when fewer than 5 are available. The filter only removes results, so a page still returns up to page\_size results. Use this field only with reranker cross\_encoder. It is not supported for episode search. Invalid combinations return a 400 error. The cutoff is approximate, not guaranteed. When the cross-encoder does not score the results, for example after a timeout, Zep returns the results without the filter. |
| `filters` | `object` | No | — |
| `mmr_lambda` | `number` | No | The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. |
| `reranker` | `rrf \| mmr \| node_distance \| episode_mentions \| cross_encoder` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The observations on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   attributes?: Record<string, any> | null,
>   created_at?: string | null,
>   episode_uuids?: string[] | null,
>   graph_uuid?: string | null,
>   labels?: string[] | null,
>   name?: string | null,
>   relevance?: number | null,
>   score?: number | null,
>   summary?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### searchThreadSummaries

`graphs.searchThreadSummaries`

Search thread summaries. Thread-summary search supports only the metadata\_filters filter, which matches the metadata of the thread episodes. Every other filter returns unsupported\_filter.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.searchThreadSummaries({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', query: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page. |
| `cursor` | `string` | No | Opaque page cursor |
| `query` | `string` | Yes | The search query. |
| `bfs_origin_node_uuids` | `string[]` | No | Nodes used as BFS origins for graph-distance-aware retrieval. |
| `center_node_uuid` | `string` | No | The node to rank results by distance from. Required when reranker is node\_distance. |
| `filter_low_quality_results` | `boolean` | No | The default is false. When true, Zep removes low-quality results at the knee of the cross-encoder score curve. The filter never removes a result with a score of 0.9 or more. It keeps at least 5 results, or all results when fewer than 5 are available. The filter only removes results, so a page still returns up to page\_size results. Use this field only with reranker cross\_encoder. It is not supported for episode search. Invalid combinations return a 400 error. The cutoff is approximate, not guaranteed. When the cross-encoder does not score the results, for example after a timeout, Zep returns the results without the filter. |
| `filters` | `object` | No | — |
| `mmr_lambda` | `number` | No | The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. |
| `reranker` | `rrf \| mmr \| node_distance \| episode_mentions \| cross_encoder` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The thread summaries on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   graph_uuid?: string | null,
>   last_summarized_at?: string | null,
>   last_summarized_episode_valid_at?: string | null,
>   relevance?: number | null,
>   score?: number | null,
>   summary?: string | null,
>   thread_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### setInclusionRules

`graphs.setInclusionRules`

Set graph inclusion rules. Replaces the graph rules. Request: \{"inclusion\_rules":\[]}. Response: \{"inclusion\_rules":\[],"inherited":true}. A free project answered 404 not\_found to both the read and the write (11-27): the feature may need enabling on the account.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.setInclusionRules({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | Graph UUID |
| `inclusion_rules` | `object[]` | No | InclusionRules replaces the complete rule set at this scope. |
| `inherited` | `boolean` | No | Inherited identifies a graph that uses project defaults. |

> [accordion] inclusion\_rules full type
>
> ```ts theme={null}
> {
>   condition?: string,
>   effect?: include | exclude,
>   name?: string,
>   target?: entity | fact,
>   types?: string[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inclusion_rules` | `object[] \| null` | No | InclusionRules replaces the complete rule set at this scope. |
| `inherited` | `boolean \| null` | No | Inherited identifies a graph that uses project defaults. |

> [accordion] inclusion\_rules full type
>
> ```ts theme={null}
> {
>   condition?: string | null,
>   effect?: string | null,
>   name?: string | null,
>   target?: string | null,
>   types?: string[] | null
> }[] | null
> ```

***

### setInstructions

`graphs.setInstructions`

Set graph instructions. (PUT /graphs/\{graph\_uuid}/instructions)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.setInstructions({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `inherited` | `boolean` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[]` | No | The custom extraction instructions in effect at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name: string,
>   text: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[] \| null` | No | The custom extraction instructions in effect at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### setKnowledge

`graphs.setKnowledge`

Set graph knowledge. Replaces the complete set of domain knowledge entries at this scope. The knowledge\_api account flag must be enabled.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.setKnowledge({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph or its user. |
| `knowledge` | `object[]` | No | The complete set of domain knowledge entries. An empty list clears the scope. |

> [accordion] knowledge full type
>
> ```ts theme={null}
> {
>   name: string,
>   text: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Inherited is true when the graph uses the project entries. |
| `knowledge` | `object[] \| null` | No | The domain knowledge entries in effect at this scope. |

> [accordion] knowledge full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### setObservationSteering

`graphs.setObservationSteering`

Set graph observation steering. (PUT /graphs/\{graph\_uuid}/observation-steering)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.setObservationSteering({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `inherited` | `boolean` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instruction` | `string` | No | The natural-language instruction steering how observations are generated at this scope. |
| `types` | `object[]` | No | The named observation types, each with a description, that generation should steer toward at this scope. |

> [accordion] types full type
>
> ```ts theme={null}
> {
>   description?: string,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instruction` | `string \| null` | No | The natural-language instruction steering how observations are generated at this scope. |
| `types` | `object[] \| null` | No | The named observation types, each with a description, that generation should steer toward at this scope. |

> [accordion] types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### setOntology

`graphs.setOntology`

Set graph ontology. (PUT /graphs/\{graph\_uuid}/ontology)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.setOntology({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `edge_type_hierarchy` | `object` | No | The edge type hierarchy. Omitted when the ontology has no edge subtypes. |
| `edge_types` | `object[]` | No | The edge types defined in the ontology in effect at this scope. |
| `entity_type_hierarchy` | `object` | No | The entity type hierarchy. Omitted when the ontology has no entity subtypes. |
| `entity_types` | `object[]` | No | The entity types defined in the ontology in effect at this scope. |
| `inherited` | `boolean` | No | Whether this is the project's default value rather than an override set on this graph. |

> [accordion] edge\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] edge\_types full type
>
> ```ts theme={null}
> {
>   description?: string,
>   name?: string,
>   properties?: {
>     description?: string,
>     name?: string,
>     protected?: boolean,
>     type?: text | int | float | boolean
>   }[],
>   source_targets?: {
>     source?: string,
>     target?: string
>   }[]
> }[]
> ```

> [accordion] entity\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] entity\_types full type
>
> ```ts theme={null}
> {
>   description?: string,
>   identity_properties?: string[],
>   name?: string,
>   properties?: {
>     description?: string,
>     name?: string,
>     protected?: boolean,
>     type?: text | int | float | boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `edge_type_hierarchy` | `object \| null` | No | The edge type hierarchy. Omitted when the ontology has no edge subtypes. |
| `edge_types` | `object[] \| null` | No | The edge types defined in the ontology in effect at this scope. |
| `entity_type_hierarchy` | `object \| null` | No | The entity type hierarchy. Omitted when the ontology has no entity subtypes. |
| `entity_types` | `object[] \| null` | No | The entity types defined in the ontology in effect at this scope. |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |

> [accordion] edge\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] edge\_types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null,
>   properties?: {
>     description?: string | null,
>     name?: string | null,
>     protected?: boolean | null,
>     type?: string | null
>   }[] | null,
>   source_targets?: {
>     source?: string | null,
>     target?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] entity\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] entity\_types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   identity_properties?: string[] | null,
>   name?: string | null,
>   properties?: {
>     description?: string | null,
>     name?: string | null,
>     protected?: boolean | null,
>     type?: string | null
>   }[] | null
> }[] | null
> ```

***

### threadSummaries.list

`graphs.threadSummaries.list`

List thread summaries. Lists the thread summaries of a graph and returns one page of results. The default page\_size is 50, and the maximum page\_size is 100. You can sort by uuid or created\_at. The default sort is uuid in descending order.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.graphs.threadSummaries.list({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `uuid \| created_at` | No | — |
| `order` | `asc \| desc` | No | — |
| `filters` | `object` | No | — |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   date_filters?: {
>     any_of?: {
>       all_of?: {
>         field?: created_at | valid_at | invalid_at | expired_at,
>         operator?: eq | ne | gt | lt | gte | lte | is_null | is_not_null,
>         value?: string
>       }[]
>     }[]
>   },
>   metadata_filters?: {
>     filters?: {
>       operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>       property_name?: string,
>       value?: string | number | boolean | (string | number | boolean)[]
>     }[],
>     groups?: {
>       filters?: {
>         operator?: eq | ne | gt | lt | gte | lte | in | contains | is_null | is_not_null,
>         property_name?: string,
>         value?: string | number | boolean | (string | number | boolean)[]
>       }[],
>       groups?: (recursive)[],
>       type?: and | or
>     }[],
>     type?: and | or
>   },
>   property_filters?: {
>     operator?: eq | ne | gt | lt | gte | lte | in | is_null | is_not_null,
>     property_name?: string,
>     value?: string | number | boolean | (string | number | boolean)[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The thread summaries on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   graph_uuid?: string | null,
>   last_summarized_at?: string | null,
>   last_summarized_episode_valid_at?: string | null,
>   relevance?: number | null,
>   score?: number | null,
>   summary?: string | null,
>   thread_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### update

`graphs.update`

Update graph. (PATCH /graphs/\{graph\_uuid})

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.update({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |
| `description` | `string` | No | A description of the graph. |
| `name` | `string` | No | The graph's display name. |
| `time_zone` | `string` | No | The graph's IANA time zone. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the graph was created. |
| `description` | `string \| null` | No | A description of the graph. |
| `graph_id` | `string \| null` | No | The developer-assigned identifier of the graph, present only for standard graphs. |
| `name` | `string \| null` | No | The display name of the graph. |
| `time_zone` | `string \| null` | No | The graph's IANA time zone. |
| `type` | `string \| null` | No | The kind of graph: user for a user's personal graph, or standard for a named graph created directly. |
| `updated_at` | `string \| null` | No | The time the graph was last updated. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user this graph belongs to, present only for a user graph. |
| `uuid` | `string \| null` | No | The unique identifier of the graph. |

***

### warm

`graphs.warm`

Warm graph. (POST /graphs/\{graph\_uuid}/warm)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.graphs.warm({ graph_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_uuid` | `string` | Yes | The UUID of the graph. For a user graph, you can also use the UUID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

## Lookup

### developerIds

`lookup.developerIds`

Batch lookup of developer ids. (POST /lookup)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.lookup.developerIds({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graphs` | `string[]` | No | Developer-assigned graph IDs to resolve to UUIDs. |
| `threads` | `string[]` | No | Developer-assigned thread IDs to resolve to UUIDs. |
| `users` | `string[]` | No | Developer-assigned user IDs to resolve to UUIDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The lookup result for each identifier submitted, in request order within each resource type. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   found?: boolean | null,
>   legacy_id?: string | null,
>   resource_type?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

## Project

### get

`project.get`

Get project. (GET /project)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the project was created. |
| `default_time_zone` | `string \| null` | No | The project's default IANA time zone, used as the fallback when a resource does not set its own. |
| `description` | `string \| null` | No | A human-readable description of the project. |
| `hyperedges_enabled` | `boolean \| null` | No | True when hyperedge extraction is enabled for this project. This setting is one-way. |
| `include_policy_violating_episodes` | `boolean \| null` | No | When true, episode reads on graphs with a content policy include the episodes that violated the policy. The default is false. |
| `name` | `string \| null` | No | The name of the project. |
| `uuid` | `string \| null` | No | The unique identifier of the project. |

***

### getContentPolicy

`project.getContentPolicy`

Get project content policy. Experimental: the request, the response, and the behavior of this operation can change. Returns the current content policy revision of the project. A new graph binds this revision at creation.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.getContentPolicy({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `object[] \| null` | No | The categories of the policy. |
| `created_at` | `string \| null` | No | When this policy set was created. |
| `revision` | `number \| null` | No | The project revision number. 0 is the empty policy of a new project. |
| `rules` | `object[] \| null` | No | The rules of the policy. |
| `uuid` | `string \| null` | No | The identifier of this policy set. A project revision and every graph that binds it without additions share one uuid. |

> [accordion] categories full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   id?: string | null,
>   key?: string | null
> }[] | null
> ```

> [accordion] rules full type
>
> ```ts theme={null}
> {
>   action?: string | null,
>   category_key?: string | null,
>   condition?: string | null,
>   description?: string | null,
>   edge_types?: string[] | null,
>   entity_types?: string[] | null,
>   id?: string | null,
>   patterns?: string[] | null,
>   permitted_examples?: string[] | null,
>   prohibited_examples?: string[] | null
> }[] | null
> ```

***

### getContentPolicyRevision

`project.getContentPolicyRevision`

Get project content policy revision. Experimental: the request, the response, and the behavior of this operation can change.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.getContentPolicyRevision({ revision_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `revision_uuid` | `string` | Yes | Revision UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `object[] \| null` | No | The categories of the policy. |
| `created_at` | `string \| null` | No | When this policy set was created. |
| `revision` | `number \| null` | No | The project revision number. 0 is the empty policy of a new project. |
| `rules` | `object[] \| null` | No | The rules of the policy. |
| `uuid` | `string \| null` | No | The identifier of this policy set. A project revision and every graph that binds it without additions share one uuid. |

> [accordion] categories full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   id?: string | null,
>   key?: string | null
> }[] | null
> ```

> [accordion] rules full type
>
> ```ts theme={null}
> {
>   action?: string | null,
>   category_key?: string | null,
>   condition?: string | null,
>   description?: string | null,
>   edge_types?: string[] | null,
>   entity_types?: string[] | null,
>   id?: string | null,
>   patterns?: string[] | null,
>   permitted_examples?: string[] | null,
>   prohibited_examples?: string[] | null
> }[] | null
> ```

***

### getInclusionRules

`project.getInclusionRules`

Get project inclusion rules. Returns the project rules, for example \{"inclusion\_rules":\[],"inherited":false}. A free project answered 404 not\_found to both the read and the write (11-27): the feature may need enabling on the account.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.getInclusionRules({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inclusion_rules` | `object[] \| null` | No | InclusionRules replaces the complete rule set at this scope. |
| `inherited` | `boolean \| null` | No | Inherited identifies a graph that uses project defaults. |

> [accordion] inclusion\_rules full type
>
> ```ts theme={null}
> {
>   condition?: string | null,
>   effect?: string | null,
>   name?: string | null,
>   target?: string | null,
>   types?: string[] | null
> }[] | null
> ```

***

### getInstructions

`project.getInstructions`

Get project instructions. (GET /project/instructions)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.getInstructions({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[] \| null` | No | The custom extraction instructions in effect at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### getKnowledge

`project.getKnowledge`

Get project knowledge. Returns the domain knowledge in effect at this scope. The knowledge\_api account flag must be enabled. Response example: \{"knowledge":\[\{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.getKnowledge({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Inherited is true when the graph uses the project entries. |
| `knowledge` | `object[] \| null` | No | The domain knowledge entries in effect at this scope. |

> [accordion] knowledge full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### getObservationSteering

`project.getObservationSteering`

Get project observation steering. (GET /project/observation-steering)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.getObservationSteering({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instruction` | `string \| null` | No | The natural-language instruction steering how observations are generated at this scope. |
| `types` | `object[] \| null` | No | The named observation types, each with a description, that generation should steer toward at this scope. |

> [accordion] types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### getOntology

`project.getOntology`

Get project ontology. (GET /project/ontology)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.getOntology({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `edge_type_hierarchy` | `object \| null` | No | The edge type hierarchy. Omitted when the ontology has no edge subtypes. |
| `edge_types` | `object[] \| null` | No | The edge types defined in the ontology in effect at this scope. |
| `entity_type_hierarchy` | `object \| null` | No | The entity type hierarchy. Omitted when the ontology has no entity subtypes. |
| `entity_types` | `object[] \| null` | No | The entity types defined in the ontology in effect at this scope. |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |

> [accordion] edge\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] edge\_types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null,
>   properties?: {
>     description?: string | null,
>     name?: string | null,
>     protected?: boolean | null,
>     type?: string | null
>   }[] | null,
>   source_targets?: {
>     source?: string | null,
>     target?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] entity\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] entity\_types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   identity_properties?: string[] | null,
>   name?: string | null,
>   properties?: {
>     description?: string | null,
>     name?: string | null,
>     protected?: boolean | null,
>     type?: string | null
>   }[] | null
> }[] | null
> ```

***

### getUserSummaryInstructions

`project.getUserSummaryInstructions`

Get project user-summary instructions. (GET /project/user-summary-instructions)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.getUserSummaryInstructions({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[] \| null` | No | The custom instructions used when generating a user's summary at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### listContentPolicyRevisions

`project.listContentPolicyRevisions`

List project content policy revisions. Experimental: the request, the response, and the behavior of this operation can change. Lists every revision of the project content policy, newest first, including revision 0.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.project.listContentPolicyRevisions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The revisions on this page, newest first. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of revisions, including revision 0. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   categories?: {
>     description?: string | null,
>     id?: string | null,
>     key?: string | null
>   }[] | null,
>   created_at?: string | null,
>   revision?: number | null,
>   rules?: {
>     action?: string | null,
>     category_key?: string | null,
>     condition?: string | null,
>     description?: string | null,
>     edge_types?: string[] | null,
>     entity_types?: string[] | null,
>     id?: string | null,
>     patterns?: string[] | null,
>     permitted_examples?: string[] | null,
>     prohibited_examples?: string[] | null
>   }[] | null,
>   uuid?: string | null
> }[] | null
> ```

***

### setContentPolicy

`project.setContentPolicy`

Set project content policy. Experimental: this operation and the new rule fields can change. The typed rule fields are in private preview and are available only to enabled accounts. Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.project.setContentPolicy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `object[]` | No | The categories of the policy. Maximum 16. An empty list with no rules means no content policy. |
| `rules` | `object[]` | No | The rules of the policy. Maximum 32. |

> [accordion] categories full type
>
> ```ts theme={null}
> {
>   description?: string,
>   key?: string
> }[]
> ```

> [accordion] rules full type
>
> ```ts theme={null}
> {
>   action?: exclude | include,
>   category_key?: string,
>   condition?: string,
>   description?: string,
>   edge_types?: string[],
>   entity_types?: string[],
>   patterns?: string[],
>   permitted_examples?: string[],
>   prohibited_examples?: string[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `object[] \| null` | No | The categories of the policy. |
| `created_at` | `string \| null` | No | When this policy set was created. |
| `revision` | `number \| null` | No | The project revision number. 0 is the empty policy of a new project. |
| `rules` | `object[] \| null` | No | The rules of the policy. |
| `uuid` | `string \| null` | No | The identifier of this policy set. A project revision and every graph that binds it without additions share one uuid. |

> [accordion] categories full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   id?: string | null,
>   key?: string | null
> }[] | null
> ```

> [accordion] rules full type
>
> ```ts theme={null}
> {
>   action?: string | null,
>   category_key?: string | null,
>   condition?: string | null,
>   description?: string | null,
>   edge_types?: string[] | null,
>   entity_types?: string[] | null,
>   id?: string | null,
>   patterns?: string[] | null,
>   permitted_examples?: string[] | null,
>   prohibited_examples?: string[] | null
> }[] | null
> ```

***

### setInclusionRules

`project.setInclusionRules`

Set project inclusion rules. Replaces the project rules. Request: \{"inclusion\_rules":\[]}. Response: \{"inclusion\_rules":\[],"inherited":false}. A free project answered 404 not\_found to both the read and the write (11-27): the feature may need enabling on the account.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.project.setInclusionRules({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `inclusion_rules` | `object[]` | No | InclusionRules replaces the complete rule set at this scope. |
| `inherited` | `boolean` | No | Inherited identifies a graph that uses project defaults. |

> [accordion] inclusion\_rules full type
>
> ```ts theme={null}
> {
>   condition?: string,
>   effect?: include | exclude,
>   name?: string,
>   target?: entity | fact,
>   types?: string[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inclusion_rules` | `object[] \| null` | No | InclusionRules replaces the complete rule set at this scope. |
| `inherited` | `boolean \| null` | No | Inherited identifies a graph that uses project defaults. |

> [accordion] inclusion\_rules full type
>
> ```ts theme={null}
> {
>   condition?: string | null,
>   effect?: string | null,
>   name?: string | null,
>   target?: string | null,
>   types?: string[] | null
> }[] | null
> ```

***

### setInstructions

`project.setInstructions`

Set project instructions. (PUT /project/instructions)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.project.setInstructions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[]` | No | The custom extraction instructions in effect at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name: string,
>   text: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[] \| null` | No | The custom extraction instructions in effect at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### setKnowledge

`project.setKnowledge`

Set project knowledge. Replaces the complete set of domain knowledge entries at this scope. The knowledge\_api account flag must be enabled.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.project.setKnowledge({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `knowledge` | `object[]` | No | The complete set of domain knowledge entries. An empty list clears the scope. |

> [accordion] knowledge full type
>
> ```ts theme={null}
> {
>   name: string,
>   text: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Inherited is true when the graph uses the project entries. |
| `knowledge` | `object[] \| null` | No | The domain knowledge entries in effect at this scope. |

> [accordion] knowledge full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### setObservationSteering

`project.setObservationSteering`

Set project observation steering. (PUT /project/observation-steering)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.project.setObservationSteering({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instruction` | `string` | No | The natural-language instruction steering how observations are generated at this scope. |
| `types` | `object[]` | No | The named observation types, each with a description, that generation should steer toward at this scope. |

> [accordion] types full type
>
> ```ts theme={null}
> {
>   description?: string,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instruction` | `string \| null` | No | The natural-language instruction steering how observations are generated at this scope. |
| `types` | `object[] \| null` | No | The named observation types, each with a description, that generation should steer toward at this scope. |

> [accordion] types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### setOntology

`project.setOntology`

Set project ontology. Replaces the entity types and the edge types that the project uses.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.project.setOntology({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `edge_type_hierarchy` | `object` | No | The edge type hierarchy. Omitted when the ontology has no edge subtypes. |
| `edge_types` | `object[]` | No | The edge types defined in the ontology in effect at this scope. |
| `entity_type_hierarchy` | `object` | No | The entity type hierarchy. Omitted when the ontology has no entity subtypes. |
| `entity_types` | `object[]` | No | The entity types defined in the ontology in effect at this scope. |
| `inherited` | `boolean` | No | Whether this is the project's default value rather than an override set on this graph. |

> [accordion] edge\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] edge\_types full type
>
> ```ts theme={null}
> {
>   description?: string,
>   name?: string,
>   properties?: {
>     description?: string,
>     name?: string,
>     protected?: boolean,
>     type?: text | int | float | boolean
>   }[],
>   source_targets?: {
>     source?: string,
>     target?: string
>   }[]
> }[]
> ```

> [accordion] entity\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] entity\_types full type
>
> ```ts theme={null}
> {
>   description?: string,
>   identity_properties?: string[],
>   name?: string,
>   properties?: {
>     description?: string,
>     name?: string,
>     protected?: boolean,
>     type?: text | int | float | boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `edge_type_hierarchy` | `object \| null` | No | The edge type hierarchy. Omitted when the ontology has no edge subtypes. |
| `edge_types` | `object[] \| null` | No | The edge types defined in the ontology in effect at this scope. |
| `entity_type_hierarchy` | `object \| null` | No | The entity type hierarchy. Omitted when the ontology has no entity subtypes. |
| `entity_types` | `object[] \| null` | No | The entity types defined in the ontology in effect at this scope. |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |

> [accordion] edge\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] edge\_types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null,
>   properties?: {
>     description?: string | null,
>     name?: string | null,
>     protected?: boolean | null,
>     type?: string | null
>   }[] | null,
>   source_targets?: {
>     source?: string | null,
>     target?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] entity\_type\_hierarchy full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] entity\_types full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   identity_properties?: string[] | null,
>   name?: string | null,
>   properties?: {
>     description?: string | null,
>     name?: string | null,
>     protected?: boolean | null,
>     type?: string | null
>   }[] | null
> }[] | null
> ```

***

### setUserSummaryInstructions

`project.setUserSummaryInstructions`

Set project user-summary instructions. (PUT /project/user-summary-instructions)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.project.setUserSummaryInstructions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[]` | No | The custom instructions used when generating a user's summary at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name: string,
>   text: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[] \| null` | No | The custom instructions used when generating a user's summary at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### update

`project.update`

Update project. Set hyperedges\_enabled to true to enable extraction. A member needs the project.edit permission. Project API keys receive 403 permission\_denied.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.project.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `default_time_zone` | `string \| null` | No | The project's IANA fallback time zone. Set to null to clear the existing value. |
| `hyperedges_enabled` | `boolean` | No | Set to true to enable hyperedge extraction. This setting cannot be disabled. A member needs project.edit. Project API keys receive 403 permission\_denied. |
| `include_policy_violating_episodes` | `boolean` | No | When true, episode reads on graphs with a content policy include the episodes that violated the policy. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the project was created. |
| `default_time_zone` | `string \| null` | No | The project's default IANA time zone, used as the fallback when a resource does not set its own. |
| `description` | `string \| null` | No | A human-readable description of the project. |
| `hyperedges_enabled` | `boolean \| null` | No | True when hyperedge extraction is enabled for this project. This setting is one-way. |
| `include_policy_violating_episodes` | `boolean \| null` | No | When true, episode reads on graphs with a content policy include the episodes that violated the policy. The default is false. |
| `name` | `string \| null` | No | The name of the project. |
| `uuid` | `string \| null` | No | The unique identifier of the project. |

***

## Tasks

### get

`tasks.get`

Get task. (GET /tasks/\{task\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.tasks.get({ task_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_uuid` | `string` | Yes | Task UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `completed_at` | `string \| null` | No | The time the task reached a terminal status; absent while it is still in progress. |
| `created_at` | `string \| null` | No | The time the task was created. |
| `error` | `object \| null` | No | — |
| `progress` | `object \| null` | No | — |
| `result` | `object \| null` | No | — |
| `started_at` | `string \| null` | No | The time a worker began processing the task; absent until then. |
| `status` | `string \| null` | No | The service returns the task state. Valid values are pending, processing, succeeded, partial, and failed. A task has no canceled state. When a batch becomes canceled, its batch.process task becomes failed, and the task error code is batch\_canceled. |
| `type` | `string \| null` | No | The kind of asynchronous operation the task represents. |
| `updated_at` | `string \| null` | No | The time the task was last updated. |
| `uuid` | `string \| null` | No | The unique identifier of the task, used to poll its status. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: Record<string, any> | null,
>   message?: string | null,
>   param?: string | null,
>   request_id?: string | null
> } | null
> ```

> [accordion] progress full type
>
> ```ts theme={null}
> {
>   stage?: string | null
> } | null
> ```

> [accordion] result full type
>
> ```ts theme={null}
> {
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     failed_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null,
>     violated_count?: number | null
>   } | null,
>   edge_uuid?: string | null,
>   edges?: {
>     edge_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   }[] | null,
>   episode_uuid?: string | null,
>   episodes?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     episode_uuid?: string | null
>   }[] | null,
>   hyperedge_uuid?: string | null,
>   skill_uuid?: string | null,
>   source_node_uuid?: string | null,
>   target_node_uuid?: string | null
> } | null
> ```

***

### list

`tasks.list`

List tasks. (GET /tasks)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.tasks.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `status` | `pending \| processing \| succeeded \| partial \| failed` | No | — |
| `type` | `user.delete \| agent.delete \| thread.delete \| graph.delete \| graph.add \| graph.add_nodes \| graph.add_edges \| graph.add_fact_triple \| graph.add_triple \| graph.edge.add \| graph.clone \| graph.warm \| graph.episode.delete \| graph.node.delete \| graph.edge.delete \| graph.hyperedge.add \| graph.hyperedge.create_edge \| graph.hyperedge.delete \| graph.hyperedge.delete_edge \| thread.add_messages \| batch.process \| agent.trajectory.finalize \| agent.trajectory.repair.task_family \| agent.trajectory.repair.evidence_deletion \| agent.trajectory_import.run \| agent.trajectory_import.delete \| agent.verifier.repair.evidence_invalidation \| agent.skill.repair.source_deletion \| agent.skill.export \| agent.skill.import` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The tasks on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of matching tasks, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

## Threads

### create

`threads.create`

Create thread. (POST /threads)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.threads.create({ user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_uuid` | `string` | Yes | The UUID of the user this thread belongs to. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the thread was created. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the owning user's graph. |
| `thread_id` | `string \| null` | No | The developer-assigned identifier of the thread. |
| `updated_at` | `string \| null` | No | The time the thread was last updated. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user the thread belongs to. |
| `uuid` | `string \| null` | No | The unique identifier of the thread. |

***

### delete

`threads.delete`

Delete thread. Cannot be undone. (DELETE /threads/\{thread\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.threads.delete({ thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### get

`threads.get`

Get thread. (GET /threads/\{thread\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.threads.get({ thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the thread was created. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the owning user's graph. |
| `thread_id` | `string \| null` | No | The developer-assigned identifier of the thread. |
| `updated_at` | `string \| null` | No | The time the thread was last updated. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user the thread belongs to. |
| `uuid` | `string \| null` | No | The unique identifier of the thread. |

***

### getContext

`threads.getContext`

Get thread context. (GET /threads/\{thread\_uuid}/context)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.threads.getContext({ thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |
| `template_uuid` | `string` | No | Context template UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `context` | `string \| null` | No | The context block containing relevant facts, entities, and messages or episodes from the user's graph. Pass it through the model provider's untrusted-data channel. |

***

### getSummary

`threads.getSummary`

Get thread summary. (GET /threads/\{thread\_uuid}/summary)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.threads.getSummary({ thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the summary was first created. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this thread summary belongs to. |
| `last_summarized_at` | `string \| null` | No | The wall-clock time of the most recent summary update. |
| `last_summarized_episode_valid_at` | `string \| null` | No | The latest episode reference time covered by the most recent summary update. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `score` | `number \| null` | No | A score accompanies every search result; it is omitted when the summary appears in a plain list rather than a search result. |
| `summary` | `string \| null` | No | The generated summary text for the thread. |
| `thread_uuid` | `string \| null` | No | The unique identifier of the thread this summary belongs to. |
| `uuid` | `string \| null` | No | The unique identifier of the thread summary. |

***

### list

`threads.list`

List threads. (GET /threads)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.threads.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `created_at \| updated_at \| uuid` | No | — |
| `order` | `asc \| desc` | No | — |
| `user_uuid` | `string` | No | Filter by user UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The threads on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of matching threads, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   graph_uuid?: string | null,
>   thread_id?: string | null,
>   updated_at?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### listEpisodes

`threads.listEpisodes`

List thread episodes. (GET /threads/\{thread\_uuid}/episodes)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.threads.listEpisodes({ thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The episodes on this page. |
| `next_cursor` | `string \| null` | No | Opaque cursor for retrieving the next page, present only when more results are available. |
| `total_size` | `number \| null` | No | Omitted for this collection; use next\_cursor to detect the end of pagination. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   content_policy?: {
>     category_keys?: string[] | null,
>     dropped_count?: number | null,
>     retained_count?: number | null,
>     revision?: number | null,
>     status?: string | null,
>     violated?: boolean | null
>   } | null,
>   created_at?: string | null,
>   document_id?: string | null,
>   expired_at?: string | null,
>   graph_uuid?: string | null,
>   metadata?: Record<string, any> | null,
>   processed?: boolean | null,
>   reference_time?: string | null,
>   relevance?: number | null,
>   role?: string | null,
>   role_name?: string | null,
>   score?: number | null,
>   source?: string | null,
>   source_description?: string | null,
>   thread_uuid?: string | null,
>   user_uuid?: string | null,
>   uuid?: string | null,
>   wait_status?: string | null
> }[] | null
> ```

***

### lookup

`threads.lookup`

Lookup thread by developer id. (POST /threads/lookup)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.threads.lookup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_id` | `string` | No | The developer-assigned graph ID to resolve to a UUID. Mutually exclusive with user\_id and thread\_id. |
| `thread_id` | `string` | No | The developer-assigned thread ID to resolve to a UUID. Mutually exclusive with user\_id and graph\_id. |
| `user_id` | `string` | No | The developer-assigned user ID to resolve to a UUID. Mutually exclusive with thread\_id and graph\_id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the thread was created. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the owning user's graph. |
| `thread_id` | `string \| null` | No | The developer-assigned identifier of the thread. |
| `updated_at` | `string \| null` | No | The time the thread was last updated. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user the thread belongs to. |
| `uuid` | `string \| null` | No | The unique identifier of the thread. |

***

### messages.add

`threads.messages.add`

Add thread messages. (POST /threads/\{thread\_uuid}/messages)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.threads.messages.add({
	thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	messages: [{ role: 'user', name: 'Ada', content: 'I moved to Lisbon last month.' }, { role: 'assistant', content: 'Noted, Lisbon it is.' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |
| `ignore_roles` | `string[]` | No | Message roles to skip during graph extraction; the messages are still stored. |
| `messages` | `object[]` | Yes | The messages to add to the thread. |
| `return_context` | `boolean` | No | When true, returns the context block for the thread's most recent messages. |
| `strict_ontology` | `boolean` | No | When true, prevents extraction of generic entity nodes that do not match the configured ontology. |

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   content?: string,
>   metadata?: Record<string, any>,
>   name?: string,
>   reference_time?: string,
>   role?: system | assistant | user | function | tool,
>   uuid?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `context` | `string \| null` | No | The context block assembled from the graph after adding the messages, present only when return\_context is true in the request. |
| `messages` | `object[] \| null` | No | The messages that were added, each including its assigned identifier. |
| `task` | `object \| null` | No | — |

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   created_at?: string | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   processed?: boolean | null,
>   reference_time?: string | null,
>   role?: string | null,
>   thread_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### messages.get

`threads.messages.get`

Get message. (GET /threads/\{thread\_uuid}/messages/\{message\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.threads.messages.get({ thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', message_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |
| `message_uuid` | `string` | Yes | Message UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string \| null` | No | The content of the message. |
| `created_at` | `string \| null` | No | The time Zep received the message. |
| `metadata` | `Record<string, any> \| null` | No | Arbitrary key-value metadata attached to the message. |
| `name` | `string \| null` | No | A custom name for the message's sender, for example a specific user or agent name. |
| `processed` | `boolean \| null` | No | Whether the message has finished being ingested into the user's graph. |
| `reference_time` | `string \| null` | No | The message's reference time: the time that the developer supplied on add, or the ingestion time when the developer supplied no time. |
| `role` | `string \| null` | No | — |
| `thread_uuid` | `string \| null` | No | The unique identifier of the thread this message belongs to. |
| `uuid` | `string \| null` | No | The unique identifier of the message. |

***

### messages.list

`threads.messages.list`

List thread messages. (GET /threads/\{thread\_uuid}/messages)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.threads.messages.list({ thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `created_at` | No | — |
| `order` | `asc \| desc` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The messages on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of matching messages, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   created_at?: string | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   processed?: boolean | null,
>   reference_time?: string | null,
>   role?: string | null,
>   thread_uuid?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### messages.update

`threads.messages.update`

Update message. (PATCH /threads/\{thread\_uuid}/messages/\{message\_uuid})

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.threads.messages.update({ thread_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', message_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_uuid` | `string` | Yes | Thread UUID |
| `message_uuid` | `string` | Yes | Message UUID |
| `metadata` | `object \| null` | No | Metadata to merge onto the message; a key set to null is removed. Max 10 keys after the merge. Values must be strings, numbers, booleans, or arrays of scalars. |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string \| null` | No | The content of the message. |
| `created_at` | `string \| null` | No | The time Zep received the message. |
| `metadata` | `Record<string, any> \| null` | No | Arbitrary key-value metadata attached to the message. |
| `name` | `string \| null` | No | A custom name for the message's sender, for example a specific user or agent name. |
| `processed` | `boolean \| null` | No | Whether the message has finished being ingested into the user's graph. |
| `reference_time` | `string \| null` | No | The message's reference time: the time that the developer supplied on add, or the ingestion time when the developer supplied no time. |
| `role` | `string \| null` | No | — |
| `thread_uuid` | `string \| null` | No | The unique identifier of the thread this message belongs to. |
| `uuid` | `string \| null` | No | The unique identifier of the message. |

***

## Trace Connections

### create

`traceConnections.create`

Create a trace connection. Verify a provider credential before Zep stores it. Both providers accept 1 to 60 requests per minute and an optional retention window.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.traceConnections.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `api_url` | `string` | No | APIURL is an optional custom provider endpoint. |
| `credential` | `string` | No | Credential is the write-only provider credential. |
| `name` | `string` | No | Name is the connection name. |
| `provider` | `braintrust \| langsmith` | No | Provider is the Braintrust or LangSmith provider. |
| `requests_per_minute` | `number` | No | RequestsPerMinute is the request rate limit from 1 to 60 per minute. |
| `retention_days` | `number` | No | RetentionDays is an optional retention window in days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | CreatedAt is the resource creation time. |
| `credential_hint` | `string \| null` | No | CredentialHint contains the final four characters of the credential. |
| `credential_version` | `number \| null` | No | CredentialVersion is the current credential version. |
| `import_count` | `number \| null` | No | ImportCount is the number of non-deleted imports that use this connection. |
| `last_verified_at` | `string \| null` | No | LastVerifiedAt is the last successful credential verification time. |
| `name` | `string \| null` | No | Name is the display name. |
| `provider` | `string \| null` | No | Provider is the Braintrust or LangSmith provider. |
| `provider_organization_id` | `string \| null` | No | ProviderOrganizationID is the provider organization identifier. |
| `provider_organization_name` | `string \| null` | No | ProviderOrganizationName is the provider organization name. |
| `settings` | `object \| null` | No | — |
| `status` | `string \| null` | No | Status is the provider verification status. |
| `updated_at` | `string \| null` | No | UpdatedAt is the last resource update time. |
| `uuid` | `string \| null` | No | UUID is the trace connection identifier. |

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   api_url?: string | null,
>   requests_per_minute?: number | null,
>   retention_days?: number | null
> } | null
> ```

***

### delete

`traceConnections.delete`

Delete a trace connection. Delete a trace connection that no active trace import uses. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.traceConnections.delete({ connection_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_uuid` | `string` | Yes | Trace connection UUID |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`traceConnections.get`

Get a trace connection. Read one trace connection. The response includes a credential hint and never includes the credential.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.traceConnections.get({ connection_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_uuid` | `string` | Yes | Trace connection UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | CreatedAt is the resource creation time. |
| `credential_hint` | `string \| null` | No | CredentialHint contains the final four characters of the credential. |
| `credential_version` | `number \| null` | No | CredentialVersion is the current credential version. |
| `import_count` | `number \| null` | No | ImportCount is the number of non-deleted imports that use this connection. |
| `last_verified_at` | `string \| null` | No | LastVerifiedAt is the last successful credential verification time. |
| `name` | `string \| null` | No | Name is the display name. |
| `provider` | `string \| null` | No | Provider is the Braintrust or LangSmith provider. |
| `provider_organization_id` | `string \| null` | No | ProviderOrganizationID is the provider organization identifier. |
| `provider_organization_name` | `string \| null` | No | ProviderOrganizationName is the provider organization name. |
| `settings` | `object \| null` | No | — |
| `status` | `string \| null` | No | Status is the provider verification status. |
| `updated_at` | `string \| null` | No | UpdatedAt is the last resource update time. |
| `uuid` | `string \| null` | No | UUID is the trace connection identifier. |

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   api_url?: string | null,
>   requests_per_minute?: number | null,
>   retention_days?: number | null
> } | null
> ```

***

### getTrace

`traceConnections.getTrace`

Get a source trace. Read one trace and optionally preview a mapping. Example body: \{"provider\_project\_id":"project\_123","trace\_id":"trace-123","mapping":\{"task\_family":\{"source":"fixed","value":"support"}}}.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.traceConnections.getTrace({ connection_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', provider_project_id: 'example', trace_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_uuid` | `string` | Yes | Trace connection UUID |
| `mapping` | `object` | No | — |
| `provider_project_id` | `string` | Yes | The developer supplies the project ID from the selected provider. |
| `trace_id` | `string` | Yes | TraceID is the provider trace identifier. |

> [accordion] mapping full type
>
> ```ts theme={null}
> {
>   content?: {
>     include_system_messages?: boolean,
>     metadata_keys?: string[]
>   },
>   include_outcomes?: (succeeded | failed | partial | abandoned | unknown)[],
>   objective?: {
>     key?: string,
>     source?: first_user_message | root_input | metadata
>   },
>   outcome?: {
>     failed_below?: number,
>     key?: string,
>     name?: string,
>     rule?: score | metadata | error,
>     succeeded_at_or_above?: number,
>     values?: Record<string, string>
>   }[],
>   score_verifier?: boolean,
>   task_family?: {
>     fallback?: string,
>     key?: string,
>     prefix?: string,
>     source?: fixed | metadata | tag_prefix | name | infer,
>     value?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `preview` | `object \| null` | No | — |
| `trace` | `object \| null` | No | — |

> [accordion] preview full type
>
> ```ts theme={null}
> {
>   event_count?: number | null,
>   mapping_result?: {
>     metadata?: Record<string, any> | null,
>     objective?: string | null,
>     outcome?: string | null,
>     outcome_rule?: string | null,
>     scores?: Record<string, number> | null,
>     task_family?: string | null,
>     verification?: string | null
>   } | null,
>   skip_reason?: string | null
> } | null
> ```

> [accordion] trace full type
>
> ```ts theme={null}
> {
>   closed?: boolean | null,
>   ended_at?: string | null,
>   has_error?: boolean | null,
>   imported_traces?: {
>     agent_uuid?: string | null,
>     import_uuid?: string | null,
>     trace_uuid?: string | null
>   }[] | null,
>   last_activity_at?: string | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   scores?: Record<string, number> | null,
>   source_revision?: string | null,
>   source_url?: string | null,
>   span_count?: number | null,
>   spans?: {
>     created_at?: string | null,
>     ended_at?: string | null,
>     error?: string | null,
>     input?: {
>     } | null,
>     kind?: string | null,
>     metadata?: Record<string, any> | null,
>     model?: string | null,
>     name?: string | null,
>     output?: {
>     } | null,
>     parent_span_id?: string | null,
>     span_id?: string | null,
>     started_at?: string | null,
>     tool_name?: string | null
>   }[] | null,
>   started_at?: string | null,
>   tags?: string[] | null,
>   trace_id?: string | null
> } | null
> ```

***

### list

`traceConnections.list`

List trace connections. List trace connections in the current Zep project.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.traceConnections.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | Items contains the trace connections on this page. Example: \[\{"uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1"}]. |
| `next_cursor` | `string \| null` | No | NextCursor is the cursor for the next page. |
| `total_size` | `number \| null` | No | TotalSize is the number of matching connections. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   credential_hint?: string | null,
>   credential_version?: number | null,
>   import_count?: number | null,
>   last_verified_at?: string | null,
>   name?: string | null,
>   provider?: string | null,
>   provider_organization_id?: string | null,
>   provider_organization_name?: string | null,
>   settings?: {
>     api_url?: string | null,
>     requests_per_minute?: number | null,
>     retention_days?: number | null
>   } | null,
>   status?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### listProjects

`traceConnections.listProjects`

List provider projects. List provider projects with the page\_size and cursor query parameters.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.traceConnections.listProjects({ connection_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_uuid` | `string` | Yes | Trace connection UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Provider page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | Items contains the provider projects on this page. Example: \[\{"id":"project\_123","name":"Support"}]. |
| `next_cursor` | `string \| null` | No | NextCursor is the provider cursor for the next page. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   id?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### listTraces

`traceConnections.listTraces`

List source traces. Filter provider traces. Example body: \{"provider\_project\_id":"project\_123","filter":\{"started\_after":"2026-01-01T00:00:00Z"}}.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.traceConnections.listTraces({ connection_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', provider_project_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_uuid` | `string` | Yes | Trace connection UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `filter` | `object` | No | — |
| `provider_project_id` | `string` | Yes | The developer supplies the project ID from the selected provider. |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   has_error?: boolean,
>   metadata?: Record<string, any>,
>   name?: string,
>   scores?: {
>     max?: number,
>     min?: number,
>     name?: string
>   }[],
>   started_after?: string,
>   started_before?: string,
>   tags_all?: string[],
>   tags_any?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | Items contains the source trace summaries on this page. Example: \[\{"trace\_id":"trace\_123","name":"Support trace"}]. |
| `next_cursor` | `string \| null` | No | NextCursor is the cursor for the next provider page. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   closed?: boolean | null,
>   ended_at?: string | null,
>   has_error?: boolean | null,
>   imported_traces?: {
>     agent_uuid?: string | null,
>     import_uuid?: string | null,
>     trace_uuid?: string | null
>   }[] | null,
>   last_activity_at?: string | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   scores?: Record<string, number> | null,
>   source_revision?: string | null,
>   source_url?: string | null,
>   span_count?: number | null,
>   started_at?: string | null,
>   tags?: string[] | null,
>   trace_id?: string | null
> }[] | null
> ```

***

### update

`traceConnections.update`

Update a trace connection. Verify changed settings before Zep stores them. A request that changes api\_url must also include credential. Otherwise Zep returns 400 invalid\_request. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: \{"requests\_per\_minute":60,"retention\_days":30}.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.traceConnections.update({ connection_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_uuid` | `string` | Yes | Trace connection UUID |
| `api_url` | `string` | No | APIURL is the new custom provider endpoint, when supplied. A request that changes api\_url must also include credential. |
| `credential` | `string` | No | Credential is the new write-only provider credential, when supplied. |
| `name` | `string` | No | Name is the new connection name, when supplied. |
| `requests_per_minute` | `number` | No | RequestsPerMinute is the new request rate limit, when supplied. |
| `retention_days` | `number` | No | RetentionDays is the new retention window in days, when supplied. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | CreatedAt is the resource creation time. |
| `credential_hint` | `string \| null` | No | CredentialHint contains the final four characters of the credential. |
| `credential_version` | `number \| null` | No | CredentialVersion is the current credential version. |
| `import_count` | `number \| null` | No | ImportCount is the number of non-deleted imports that use this connection. |
| `last_verified_at` | `string \| null` | No | LastVerifiedAt is the last successful credential verification time. |
| `name` | `string \| null` | No | Name is the display name. |
| `provider` | `string \| null` | No | Provider is the Braintrust or LangSmith provider. |
| `provider_organization_id` | `string \| null` | No | ProviderOrganizationID is the provider organization identifier. |
| `provider_organization_name` | `string \| null` | No | ProviderOrganizationName is the provider organization name. |
| `settings` | `object \| null` | No | — |
| `status` | `string \| null` | No | Status is the provider verification status. |
| `updated_at` | `string \| null` | No | UpdatedAt is the last resource update time. |
| `uuid` | `string \| null` | No | UUID is the trace connection identifier. |

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   api_url?: string | null,
>   requests_per_minute?: number | null,
>   retention_days?: number | null
> } | null
> ```

***

### verify

`traceConnections.verify`

Verify a trace connection. Check the provider credential and update the connection status.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.traceConnections.verify({ connection_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_uuid` | `string` | Yes | Trace connection UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | CreatedAt is the resource creation time. |
| `credential_hint` | `string \| null` | No | CredentialHint contains the final four characters of the credential. |
| `credential_version` | `number \| null` | No | CredentialVersion is the current credential version. |
| `import_count` | `number \| null` | No | ImportCount is the number of non-deleted imports that use this connection. |
| `last_verified_at` | `string \| null` | No | LastVerifiedAt is the last successful credential verification time. |
| `name` | `string \| null` | No | Name is the display name. |
| `provider` | `string \| null` | No | Provider is the Braintrust or LangSmith provider. |
| `provider_organization_id` | `string \| null` | No | ProviderOrganizationID is the provider organization identifier. |
| `provider_organization_name` | `string \| null` | No | ProviderOrganizationName is the provider organization name. |
| `settings` | `object \| null` | No | — |
| `status` | `string \| null` | No | Status is the provider verification status. |
| `updated_at` | `string \| null` | No | UpdatedAt is the last resource update time. |
| `uuid` | `string \| null` | No | UUID is the trace connection identifier. |

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   api_url?: string | null,
>   requests_per_minute?: number | null,
>   retention_days?: number | null
> } | null
> ```

***

## User Groups

### addMembers

`userGroups.addMembers`

Add user group members. Requires attribute-based access control to be enabled for your account.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.userGroups.addMembers({
	group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	user_uuids: ['3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `user_uuids` | `string[]` | Yes | The UUIDs of the users to add or remove. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `added_count` | `number \| null` | No | The number of users added to the group. |
| `no_op_count` | `number \| null` | No | The number of requested users that already matched the target membership state and were left unchanged. |
| `removed_count` | `number \| null` | No | The number of users removed from the group. |

***

### attachPolicySet

`userGroups.attachPolicySet`

Attach policy set to a user group. Administrative operation. Requires a bearer token. Manage policy sets from the Zep dashboard.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.userGroups.attachPolicySet({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', policy_set_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `policy_set_uuid` | `string` | Yes | The UUID of the policy set to attach to the user group. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The policy sets attached to the user group after this operation. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   name?: string | null,
>   uuid?: string | null,
>   version?: number | null
> }[] | null
> ```

***

### create

`userGroups.create`

Create user group. Requires attribute-based access control to be enabled for your account.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.userGroups.create({ name: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string` | No | A description of the user group. |
| `name` | `string` | Yes | The name of the user group. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the user group was created. |
| `description` | `string \| null` | No | A human-readable description of the user group. |
| `name` | `string \| null` | No | The name of the user group. |
| `updated_at` | `string \| null` | No | The time the user group was last updated. |
| `uuid` | `string \| null` | No | The unique identifier of the user group. |
| `version` | `number \| null` | No | The user group's version, used for optimistic concurrency on updates. |

***

### delete

`userGroups.delete`

Delete user group. Requires attribute-based access control to be enabled for your account. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.userGroups.delete({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### detachPolicySet

`userGroups.detachPolicySet`

Detach policy set from a user group. Administrative operation. Requires a bearer token. Manage policy sets from the Zep dashboard. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.userGroups.detachPolicySet({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', policy_set_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `policy_set_uuid` | `string` | Yes | Policy set UUID |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`userGroups.get`

Get user group. Requires attribute-based access control to be enabled for your account.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.userGroups.get({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the user group was created. |
| `description` | `string \| null` | No | A human-readable description of the user group. |
| `name` | `string \| null` | No | The name of the user group. |
| `updated_at` | `string \| null` | No | The time the user group was last updated. |
| `uuid` | `string \| null` | No | The unique identifier of the user group. |
| `version` | `number \| null` | No | The user group's version, used for optimistic concurrency on updates. |

***

### list

`userGroups.list`

List user groups. Requires attribute-based access control to be enabled for your account.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.userGroups.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `search` | `string` | No | Filters results to items matching this free-text search term. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The user groups on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of matching user groups, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   description?: string | null,
>   name?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   version?: number | null
> }[] | null
> ```

***

### listMemberCandidates

`userGroups.listMemberCandidates`

List member candidates. Requires attribute-based access control to be enabled for your account.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.userGroups.listMemberCandidates({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `search` | `string` | No | Filters results to items matching this free-text search term. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The users on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of matching users, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   disable_default_ontology?: boolean | null,
>   email?: string | null,
>   first_name?: string | null,
>   graph_uuid?: string | null,
>   last_name?: string | null,
>   metadata?: Record<string, any> | null,
>   time_zone?: string | null,
>   user_id?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### listMembers

`userGroups.listMembers`

List user group members. Requires attribute-based access control to be enabled for your account.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.userGroups.listMembers({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `search` | `string` | No | Filters results to items matching this free-text search term. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The users on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of matching users, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   disable_default_ontology?: boolean | null,
>   email?: string | null,
>   first_name?: string | null,
>   graph_uuid?: string | null,
>   last_name?: string | null,
>   metadata?: Record<string, any> | null,
>   time_zone?: string | null,
>   user_id?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### listPolicySets

`userGroups.listPolicySets`

List policy sets on a user group. Administrative operation. Requires a bearer token. Manage policy sets from the Zep dashboard.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.userGroups.listPolicySets({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The policy sets attached to the user group on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of attached policy sets, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   name?: string | null,
>   uuid?: string | null,
>   version?: number | null
> }[] | null
> ```

***

### removeMember

`userGroups.removeMember`

Remove one user group member. Requires attribute-based access control to be enabled for your account. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.userGroups.removeMember({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c', user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `user_uuid` | `string` | Yes | User UUID |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### removeMembers

`userGroups.removeMembers`

Remove user group members. Requires attribute-based access control to be enabled for your account.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.userGroups.removeMembers({
	group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c',
	user_uuids: ['3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `user_uuids` | `string[]` | Yes | The UUIDs of the users to add or remove. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `added_count` | `number \| null` | No | The number of users added to the group. |
| `no_op_count` | `number \| null` | No | The number of requested users that already matched the target membership state and were left unchanged. |
| `removed_count` | `number \| null` | No | The number of users removed from the group. |

***

### update

`userGroups.update`

Update user group. Requires attribute-based access control to be enabled for your account.

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.userGroups.update({ group_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_uuid` | `string` | Yes | User group UUID |
| `description` | `string` | No | A description of the user group. |
| `expected_version` | `number` | No | The user group's current version, used to detect concurrent updates. |
| `name` | `string` | No | The name of the user group. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the user group was created. |
| `description` | `string \| null` | No | A human-readable description of the user group. |
| `name` | `string \| null` | No | The name of the user group. |
| `updated_at` | `string \| null` | No | The time the user group was last updated. |
| `uuid` | `string \| null` | No | The unique identifier of the user group. |
| `version` | `number \| null` | No | The user group's version, used for optimistic concurrency on updates. |

***

## Users

### create

`users.create`

Create user. (POST /users)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.users.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `content_policy` | `object` | No | — |
| `disable_default_ontology` | `boolean` | No | When true, disables the default ontology for the user's graph. |
| `email` | `string` | No | The email address of the user. |
| `first_name` | `string` | No | The user's first name. |
| `last_name` | `string` | No | The user's last name. |
| `metadata` | `Record<string, any>` | No | Metadata to store on the user. |
| `time_zone` | `string` | No | The user's IANA time zone. |
| `user_id` | `string` | No | An optional external identity identifier, such as an identity-provider subject claim. Zep uses it to match an identity-provider sign-in to this user. It is not an address; use uuid to address the user in v4. It is unique within the project, can contain at most 500 characters, and cannot be changed after creation. |

> [accordion] content\_policy full type
>
> ```ts theme={null}
> {
>   categories?: {
>     description?: string,
>     key?: string
>   }[],
>   project_revision?: number,
>   rules?: {
>     action?: exclude | include,
>     category_key?: string,
>     condition?: string,
>     description?: string,
>     edge_types?: string[],
>     entity_types?: string[],
>     patterns?: string[],
>     permitted_examples?: string[],
>     prohibited_examples?: string[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the user was created. |
| `disable_default_ontology` | `boolean \| null` | No | When true, disables the use of the default fallback ontology for the user's graph. |
| `email` | `string \| null` | No | The email address of the user. |
| `first_name` | `string \| null` | No | The first name of the user. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the user's graph, populated when the user is created. |
| `last_name` | `string \| null` | No | The last name of the user. |
| `metadata` | `Record<string, any> \| null` | No | Arbitrary key-value metadata attached to the user. |
| `time_zone` | `string \| null` | No | The user's IANA time zone, used to localize dates in generated context. |
| `user_id` | `string \| null` | No | An optional external identity identifier, such as an identity-provider subject claim. Zep uses it to match an identity-provider sign-in to this user. It is not an address; use uuid to address the user in v4. It is unique within the project, can contain at most 500 characters, and cannot be changed after creation. v4 sets it on create; v3 users keep their existing value. |
| `uuid` | `string \| null` | No | The unique identifier of the user. |

***

### delete

`users.delete`

Delete user. Cannot be undone. (DELETE /users/\{user\_uuid})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zep.api.users.delete({ user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_uuid` | `string` | Yes | User UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   completed_at?: string | null,
>   created_at?: string | null,
>   error?: {
>     code?: string | null,
>     details?: Record<string, any> | null,
>     message?: string | null,
>     param?: string | null,
>     request_id?: string | null
>   } | null,
>   progress?: {
>     stage?: string | null
>   } | null,
>   result?: {
>     content_policy?: {
>       category_keys?: string[] | null,
>       dropped_count?: number | null,
>       failed_count?: number | null,
>       retained_count?: number | null,
>       revision?: number | null,
>       status?: string | null,
>       violated?: boolean | null,
>       violated_count?: number | null
>     } | null,
>     edge_uuid?: string | null,
>     edges?: {
>       edge_uuid?: string | null,
>       source_node_uuid?: string | null,
>       target_node_uuid?: string | null
>     }[] | null,
>     episode_uuid?: string | null,
>     episodes?: {
>       content_policy?: {
>         category_keys?: string[] | null,
>         dropped_count?: number | null,
>         failed_count?: number | null,
>         retained_count?: number | null,
>         revision?: number | null,
>         status?: string | null,
>         violated?: boolean | null,
>         violated_count?: number | null
>       } | null,
>       episode_uuid?: string | null
>     }[] | null,
>     hyperedge_uuid?: string | null,
>     skill_uuid?: string | null,
>     source_node_uuid?: string | null,
>     target_node_uuid?: string | null
>   } | null,
>   started_at?: string | null,
>   status?: string | null,
>   type?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null
> } | null
> ```

***

### get

`users.get`

Get user. (GET /users/\{user\_uuid})

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.users.get({ user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_uuid` | `string` | Yes | User UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the user was created. |
| `disable_default_ontology` | `boolean \| null` | No | When true, disables the use of the default fallback ontology for the user's graph. |
| `email` | `string \| null` | No | The email address of the user. |
| `first_name` | `string \| null` | No | The first name of the user. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the user's graph, populated when the user is created. |
| `last_name` | `string \| null` | No | The last name of the user. |
| `metadata` | `Record<string, any> \| null` | No | Arbitrary key-value metadata attached to the user. |
| `time_zone` | `string \| null` | No | The user's IANA time zone, used to localize dates in generated context. |
| `user_id` | `string \| null` | No | An optional external identity identifier, such as an identity-provider subject claim. Zep uses it to match an identity-provider sign-in to this user. It is not an address; use uuid to address the user in v4. It is unique within the project, can contain at most 500 characters, and cannot be changed after creation. v4 sets it on create; v3 users keep their existing value. |
| `uuid` | `string \| null` | No | The unique identifier of the user. |

***

### getByEmail

`users.getByEmail`

Get user by email. Send \{"email": "[jane@example.com](mailto:jane@example.com)"} to get the user with this email. An email matches only when the stored and requested values are equal after normalization. Normalization lowercases both values and trims leading and trailing whitespace.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.users.getByEmail({ email: 'ada@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | The user's email address. Matching ignores case and leading and trailing whitespace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the user was created. |
| `disable_default_ontology` | `boolean \| null` | No | When true, disables the use of the default fallback ontology for the user's graph. |
| `email` | `string \| null` | No | The email address of the user. |
| `first_name` | `string \| null` | No | The first name of the user. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the user's graph, populated when the user is created. |
| `last_name` | `string \| null` | No | The last name of the user. |
| `metadata` | `Record<string, any> \| null` | No | Arbitrary key-value metadata attached to the user. |
| `time_zone` | `string \| null` | No | The user's IANA time zone, used to localize dates in generated context. |
| `user_id` | `string \| null` | No | An optional external identity identifier, such as an identity-provider subject claim. Zep uses it to match an identity-provider sign-in to this user. It is not an address; use uuid to address the user in v4. It is unique within the project, can contain at most 500 characters, and cannot be changed after creation. v4 sets it on create; v3 users keep their existing value. |
| `uuid` | `string \| null` | No | The unique identifier of the user. |

***

### getNode

`users.getNode`

Get user node. (GET /users/\{user\_uuid}/node)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.users.getNode({ user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_uuid` | `string` | Yes | User UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `attributes` | `Record<string, any> \| null` | No | Additional attributes of the node, as defined by its entity type. |
| `created_at` | `string \| null` | No | The time the node was created. |
| `degree` | `number \| null` | No | The count of live entity edges that touch this node, in both directions. Present only when the list request orders by `degree`. |
| `episode_uuids` | `string[] \| null` | No | The UUIDs of the live episodes that mention this node, newest first. The list is complete when `episode_uuids_truncated` is false. The list holds the newest 100 when the node has more than 100 source episodes; list episodes with the `mentioned_node_uuids` filter to read them all. |
| `episode_uuids_truncated` | `boolean \| null` | No | True when the node has more than 100 source episodes, so `episode_uuids` holds only the newest 100, or when provenance is unavailable. False means `episode_uuids` is the complete set. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the graph this node belongs to. |
| `labels` | `string[] \| null` | No | The entity type labels assigned to the node. |
| `name` | `string \| null` | No | The name of the entity that the node represents. |
| `relevance` | `number \| null` | No | A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results. |
| `score` | `number \| null` | No | The ranking score returned with every search result; omitted when the node appears in a plain list rather than a search result. |
| `summary` | `string \| null` | No | A generated summary of the entity that the node represents. |
| `user_uuid` | `string \| null` | No | The unique identifier of the user that owns the graph. Present only when the graph is a user graph. |
| `uuid` | `string \| null` | No | The node UUID, assigned by Zep. |

***

### getSummaryInstructions

`users.getSummaryInstructions`

Get user summary instructions. (GET /users/\{user\_uuid}/summary-instructions)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.users.getSummaryInstructions({ user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_uuid` | `string` | Yes | User UUID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[] \| null` | No | The custom instructions used when generating a user's summary at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### list

`users.list`

List users. (POST /users/list)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.users.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |
| `order_by` | `created_at \| user_id \| email \| uuid` | No | — |
| `order` | `asc \| desc` | No | — |
| `search` | `string` | No | Filters results to users whose user ID, email, or name contains this text. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The users on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of matching users, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   disable_default_ontology?: boolean | null,
>   email?: string | null,
>   first_name?: string | null,
>   graph_uuid?: string | null,
>   last_name?: string | null,
>   metadata?: Record<string, any> | null,
>   time_zone?: string | null,
>   user_id?: string | null,
>   uuid?: string | null
> }[] | null
> ```

***

### listUserGroups

`users.listUserGroups`

List user groups for a user. Requires attribute-based access control to be enabled for your account.

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.users.listUserGroups({ user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_uuid` | `string` | Yes | User UUID |
| `page_size` | `number` | No | The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. |
| `cursor` | `string` | No | Opaque page cursor |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The user groups on this page. |
| `next_cursor` | `string \| null` | No | The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. |
| `total_size` | `number \| null` | No | The total number of matching user groups, counted at the time of this response. It does not indicate whether more pages remain. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   created_at?: string | null,
>   description?: string | null,
>   name?: string | null,
>   updated_at?: string | null,
>   uuid?: string | null,
>   version?: number | null
> }[] | null
> ```

***

### lookup

`users.lookup`

Lookup user by developer id. (POST /users/lookup)

**Risk:** `read`

```ts theme={null}
await corsair.zep.api.users.lookup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `graph_id` | `string` | No | The developer-assigned graph ID to resolve to a UUID. Mutually exclusive with user\_id and thread\_id. |
| `thread_id` | `string` | No | The developer-assigned thread ID to resolve to a UUID. Mutually exclusive with user\_id and graph\_id. |
| `user_id` | `string` | No | The developer-assigned user ID to resolve to a UUID. Mutually exclusive with thread\_id and graph\_id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the user was created. |
| `disable_default_ontology` | `boolean \| null` | No | When true, disables the use of the default fallback ontology for the user's graph. |
| `email` | `string \| null` | No | The email address of the user. |
| `first_name` | `string \| null` | No | The first name of the user. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the user's graph, populated when the user is created. |
| `last_name` | `string \| null` | No | The last name of the user. |
| `metadata` | `Record<string, any> \| null` | No | Arbitrary key-value metadata attached to the user. |
| `time_zone` | `string \| null` | No | The user's IANA time zone, used to localize dates in generated context. |
| `user_id` | `string \| null` | No | An optional external identity identifier, such as an identity-provider subject claim. Zep uses it to match an identity-provider sign-in to this user. It is not an address; use uuid to address the user in v4. It is unique within the project, can contain at most 500 characters, and cannot be changed after creation. v4 sets it on create; v3 users keep their existing value. |
| `uuid` | `string \| null` | No | The unique identifier of the user. |

***

### setSummaryInstructions

`users.setSummaryInstructions`

Set user summary instructions. (PUT /users/\{user\_uuid}/summary-instructions)

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.users.setSummaryInstructions({ user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_uuid` | `string` | Yes | User UUID |
| `inherited` | `boolean` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[]` | No | The custom instructions used when generating a user's summary at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name: string,
>   text: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inherited` | `boolean \| null` | No | Whether this is the project's default value rather than an override set on this graph. |
| `instructions` | `object[] \| null` | No | The custom instructions used when generating a user's summary at this scope, each with a name and text. |

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   text?: string | null
> }[] | null
> ```

***

### update

`users.update`

Update user. (PATCH /users/\{user\_uuid})

**Risk:** `write`

```ts theme={null}
await corsair.zep.api.users.update({ user_uuid: '3f0e6a2c-8b1d-4c7e-9a52-1d2e3f4a5b6c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_uuid` | `string` | Yes | User UUID |
| `disable_default_ontology` | `boolean` | No | When true, disables the default ontology for the user's graph. |
| `email` | `string` | No | The email address of the user. |
| `first_name` | `string` | No | The user's first name. |
| `last_name` | `string` | No | The user's last name. |
| `metadata` | `object \| null` | No | Metadata to merge onto the user; a key set to null is removed. |
| `time_zone` | `string` | No | The user's IANA time zone. |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_at` | `string \| null` | No | The time the user was created. |
| `disable_default_ontology` | `boolean \| null` | No | When true, disables the use of the default fallback ontology for the user's graph. |
| `email` | `string \| null` | No | The email address of the user. |
| `first_name` | `string \| null` | No | The first name of the user. |
| `graph_uuid` | `string \| null` | No | The unique identifier of the user's graph, populated when the user is created. |
| `last_name` | `string \| null` | No | The last name of the user. |
| `metadata` | `Record<string, any> \| null` | No | Arbitrary key-value metadata attached to the user. |
| `time_zone` | `string \| null` | No | The user's IANA time zone, used to localize dates in generated context. |
| `user_id` | `string \| null` | No | An optional external identity identifier, such as an identity-provider subject claim. Zep uses it to match an identity-provider sign-in to this user. It is not an address; use uuid to address the user in v4. It is unique within the project, can contain at most 500 characters, and cannot be changed after creation. v4 sets it on create; v3 users keep their existing value. |
| `uuid` | `string \| null` | No | The unique identifier of the user. |

***


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