Interface MemoryPolicy

Controls how a node reads from and writes to the agent's memory subsystem.

interface MemoryPolicy {
    consistency: MemoryConsistencyMode;
    read?: {
        types?: MemoryTraceType[];
        scope?: GraphMemoryScope;
        maxTraces?: number;
        minStrength?: number;
        semanticQuery?: string;
    };
    write?: {
        autoEncode?: boolean;
        type?: MemoryTraceType;
        scope?: GraphMemoryScope;
    };
}

Properties

Isolation mode applied for all memory I/O in this node.

read?: {
    types?: MemoryTraceType[];
    scope?: GraphMemoryScope;
    maxTraces?: number;
    minStrength?: number;
    semanticQuery?: string;
}

Optional filter applied when loading traces before execution.

Type declaration

  • Optional types?: MemoryTraceType[]

    Restrict loaded traces to these memory types.

  • Optional scope?: GraphMemoryScope

    Restrict loaded traces to this scope.

  • Optional maxTraces?: number

    Maximum number of traces to surface into GraphState.memory.

  • Optional minStrength?: number

    Minimum consolidation strength (0–1) for a trace to be returned.

  • Optional semanticQuery?: string

    Free-text semantic query used for vector-similarity retrieval.

write?: {
    autoEncode?: boolean;
    type?: MemoryTraceType;
    scope?: GraphMemoryScope;
}

Optional encoding settings applied when persisting after execution.

Type declaration

  • Optional autoEncode?: boolean

    When true, the runtime auto-encodes node output into a new trace.

  • Optional type?: MemoryTraceType

    Trace category applied to auto-encoded output.

  • Optional scope?: GraphMemoryScope

    Scope applied to auto-encoded output.