Skip to main content

Configure memory rules

Define extraction rules for factual memories and user profiles

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

Factual memory rules

Factual memory rules extract key events and information from conversations.
  1. Add a factual memory rule: In the Factual memory rules area, click Add factual memory 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" factual memory 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.
Agent Development
Agent Context
Agent Governance & Evolution
Store
Application Marketplace