Skip to main content
How-to Guide

Configure memory rules

Define extraction rules for memory fragments and user profiles

Memory rules define how memories are extracted, stored, and retrieved — including fragment rules and profile rules. Each memory supports up to 50 fragment rules and 50 profile rules. Click View details on a memory card, then open the Memory rules tab.

Fragment rules

Fragment rules extract key events and information from conversations.
1

Add a fragment rule

In the Fragment rules area, click Add fragment rule.
2

Configure parameters

ParameterDescription
Rule nameUnique identifier for the extraction rule
Rule instructionExtraction strategy. Choose Default (recommended) or Custom
Auto updateWhen on, the model updates memory content automatically. Default: on
ExpiryMemory validity period. Options: 7 days, 30 days, 180 days, never
VersionPro (recommended, ¥0.03/call, Rerank enabled) or Lite (¥0.018/call, no Rerank). Defaults to Pro
3

Confirm

Click OK to save.
A preset "Default project" fragment rule exists with 180-day expiry. It cannot be deleted but can be edited.

Profile rules

Profile rules persist structured user attributes.
1

Add a profile

In the Profile rules area, click Add profile.
2

Enter a rule name

Unique identifier for the profile rule.
3

Add profile fields

Click Add field, fill in the following, then click Save:
FieldDescription
Field nameAttribute to extract (e.g., age, occupation)
DescriptionGuides the model in extracting the attribute
Initial valueDefault when the user hasn't provided info yet
VersionPro (recommended, ¥0.03/call) or Lite (¥0.025/call). Defaults to Pro
4

Confirm

Click OK to save.
After configuration, pass the profile template ID when calling AddMemory — the system auto-extracts attributes. Results are visible in the Memory details tab.
See Use user profiles for the API workflow of creating, extracting, and retrieving profiles.