llongterm.create

Creating a new mind can be tricky - just ask Frankenstein! However, we've tried to make the process as painless as possible. First lets create a mind for our user who's specialism is 'Financial Advisor'.


const specialistMind = await llongterm.create({ 
  username: "Dom",
  specialism: "Financial Advisor", 
  specialismDepth: 2,
})

This returns an autogenerated memory structure that is empty, alongside the metadata of the mind.

memory: {
  summary: Empty mind
  unstructured: {}
  structured: {
    Investment Strategies: {
      summary: Investment strategies section
      unstructured: {}
      structured: {
        Equity Investment : ...
        Fixed Income Investment Strategies ...
        ...
      }
    },
    Retirement Planning: {
    ....
    }
  }
}

As information is fed in, the relevant subsections are found and filled in based on the users input.

It's also possible to enforce custom structured keys into the memory structure:

const customisedMind = await llongterm.create({ 
  username: "Dom",
  customStructuredKeys: ["Coding Languages", "Best Practices", "Testing"],
});
"memory": {
  "summary": "Empty mind",
  "unstructured": {},
  "structured": {
    "Coding Languages": {
      "summary": "Empty section",
      "unstructured": {},
      "structured": {}
    },
    "Best Practices": {
      "summary": "Empty section",
      "unstructured": {},
      "structured": {}
    },
    "Testing": {
      "summary": "Empty section",
      "unstructured": {},
      "structured": {}
    }
  }
}

Arguments

Argument
Type
Required
Description

username

string

Yes

The user associated with the mind. This should align with the username used in the thread conversation

specialism

string

No*

Defines the mind's area of expertise (e.g., "Financial Advisor", "Software Engineer"). Cannot be used with customStructuredKeys.

specialismDepth

number

No

Controls the granularity of the specialist mind's memory structure. Higher numbers create more detailed categorization. Default is 1. Only applicable when using specialism.

customStructuredKeys

string[]

No*

Array of custom memory categories for organizing the mind's knowledge (e.g., ["Coding Languages", "Best Practices"]). Cannot be used with specialism.

* Either specialism OR customStructuredKeys must be provided, but not both.

Response

Property
Type
Description

mind

<Mind>

Llongterm Mind object

Last updated