Interface LearningConfig

The learning option. true or this object turns the learning layer on; unset or false leaves it off, and the host's GMIs run as they did before the layer existed.

interface LearningConfig {
    mode?: LearningMode;
    agentKey?: string;
    namespace?: string;
    anonymousUserIds?: string[];
    traits?: boolean;
    lessons?: boolean;
    skills?: boolean;
    store?: LearningStore;
    ledgerKey?: string;
    clock?: (() => number);
    memoryTools?: LearningMemoryTools;
}

Hierarchy (view full)

Properties

Default 'on'.

agentKey?: string

Names the agent its learners belong to. Unset: the id of the registered persona, or of a named gmi() agent.

namespace?: string

The organization of a gmi() agent's learners, fixed for the agent. The full runtime takes each turn's resolved organization and refuses this field.

anonymousUserIds?: string[]

User ids that never name a learner, added to DEFAULT_ANONYMOUS_USER_IDS.

traits?: boolean

Asks for trait changes. Default: asked for in the full profile. The manifest says whether the loop runs.

lessons?: boolean

Asks for lessons. Default: asked for in the full profile. The manifest says whether the loop runs.

skills?: boolean

Asks for the skill library. Default: asked for in the full profile. The manifest says whether the loop runs.

Where learned state lives. Default: SQL over the host's storage adapter, else the process.

ledgerKey?: string

Keys every ledger hash (HMAC-SHA-256), so a writer of the store that cannot read it cannot recompute the chain. A secret the store never holds; without it the manifest says ledger: unkeyed.

clock?: (() => number)

Milliseconds since the epoch; the ledger's and the trait row's clock. Default Date.now.

Type declaration

    • (): number
    • Returns number

memoryTools?: LearningMemoryTools

The Memory facade the host's memory tools (and, on the full runtime, its standalone retriever and sink) are built over: forgetUser deletes the user's scopes in its Brain and revert undoes a memory tool's write there. The full runtime fills it; gmi() and a host that registers the tools itself pass it.