Memco

Function briefing

  • Render what the service says about a domain, for a model to be told.

    The substance of this comes from listDomains and from opening the session — what the domain holds, when to draw on it, what belongs in it, and the tag vocabulary it uses. What this adds is the connective prose around them, and the sentence naming the two operations a bound session has already answered. Supply it up front rather than leaving a model to ask: guidance behind a tool only steers the models that reach for it.

    Parameters

    • domain: DomainEntry

      The domain the session runs in: the session's own Session.domain, or an entry from listDomains.

    • instructions: Instructions

      What the service said when the session was opened, as carried by the scope's instructions.

    • Optionalprefix: string

      What the tools a model was offered start with, as given to Session.tools. Given, the service's text is rewritten to name the tools that way; left out, it is kept as written.

    Returns string

    The guidance as text, ready to be a system prompt or part of one.

    await using session = await client.memory.withSession('coding')
    // null when the credential's listing does not describe the domain.
    if (session.domain !== null) {
    console.log(briefing(session.domain, session.instructions))
    }

On this page