Interface AgentLearning

What a host reads of an agent's learning layer, and the operator's calls on it (Agent.learning), with the agent's key (learning.agentKey, else a named agent's persona id) and namespace (learning.namespace) filled in. A call that names a user acts on that user's learner of this agent, and rejects, naming learning.agentKey, on an agent with no key. Every call runs in every mode, a freeze included. gmi() sets every member.

interface AgentLearning {
    manifest(): Promise<LoopManifest>;
    freeze?(target?, by?): Promise<void>;
    unfreeze?(target?): Promise<void>;
    suspend?(target?, by?): Promise<void>;
    unsuspend?(target?): Promise<void>;
    operatorSet?(input): Promise<LedgerEntry>;
    revert?(ledgerId, by): Promise<LedgerEntry>;
    exportLearnedState?(userId): Promise<LearnedStateDocument>;
    importLearnedState?(doc, target?): Promise<ImportReport>;
    forgetUser?(userId): Promise<ForgetReport>;
}

Methods

  • Freezes self-change, persisted in the learning store: no new candidate is made and the memory tools refuse (frozen), while reverts, operatorSet and forgetUser still run. With userId, that user's learner; without, the whole agent (every learner of the layer, for an agent with no key).

    Parameters

    • Optional target: {
          userId?: string;
      }
      • Optional userId?: string
    • Optional by: string

    Returns Promise<void>

  • Lifts a freeze AgentLearning.freeze set on the same target.

    Parameters

    • Optional target: {
          userId?: string;
      }
      • Optional userId?: string

    Returns Promise<void>

  • Mode off at run time, persisted: learned state is neither read nor written; the memory tools still write.

    Parameters

    • Optional target: {
          userId?: string;
      }
      • Optional userId?: string
    • Optional by: string

    Returns Promise<void>

  • Lifts a suspension AgentLearning.suspend set on the same target.

    Parameters

    • Optional target: {
          userId?: string;
      }
      • Optional userId?: string

    Returns Promise<void>

  • Sets a user's traits, honesty-humility and emotionality included, through the ledger; 'baseline' resets them.

    Parameters

    • input: {
          userId: string;
          traits: "baseline" | Partial<Record<"honesty" | "emotionality" | "extraversion" | "agreeableness" | "conscientiousness" | "openness", number>>;
          by: string;
          note?: string;
      }
      • userId: string
      • traits: "baseline" | Partial<Record<"honesty" | "emotionality" | "extraversion" | "agreeableness" | "conscientiousness" | "openness", number>>
      • by: string
      • Optional note?: string

    Returns Promise<LedgerEntry>

  • Takes back a kept change by its ledger id: an operator's trait change, an import, or a recorded memory write.

    Parameters

    • ledgerId: string
    • by: string

    Returns Promise<LedgerEntry>

  • Takes a document in: its traits, clamped to this agent's persona; what this release cannot admit is refused. With target, into that user's learner of this agent; without, into the learner the document names.

    Parameters

    Returns Promise<ImportReport>

  • Deletes every learned row and memory trace of a user in the agent's namespace that the layer reaches. With memory.store, the agent's memory is opened for the call when no session holds it, so the deletion reaches the store after agent.close() too.

    Parameters

    • userId: string

    Returns Promise<ForgetReport>