Neurophic
Get started

Identifiers

Understanding identifiers and how they give each user their own memory store

Every call identifies a user. That parameter is the identifier: a string you choose, and each identifier is its own memory store.

Tip

Use your own stable user identifier. Not an email address or a real name; an opaque identifier keeps personal data out of the memory store.

Creating an identifier

Only API reference > Ingest creates an identifier. The first ingest for a new string creates its record; later calls reuse it.

Ingest accepts an optional name: a display name for the identifier. It is shown in the console next to the identifier, and it is used as context when memories are processed, so extracted facts are attributed to the right person.

Write content about the user in the first person or by their name, and name any third parties. A pronoun with no named subject is taken to mean the user.

Sending a different name replaces the stored one; omitting the field leaves it unchanged. The name can end up inside derived memory content, so removing it completely means resetting or deleting the identifier in the console.

Note

You can also create identifiers and add memories from the console. Deleting everything stored about one identifier is console-only during beta, from the project's Identifiers page. The API deletes one memory at a time, see API reference > Delete.

Memory cap per identifier

By default each identifier in a project can hold 25,000 memories. You can lower this in the project's settings; the cap applies to every identifier in the project and cannot be raised above the default.

At the cap, writes are refused; see API reference > Ingest.

Worked example

One project key, one store per identifier. Store something for the first user, with a name:

import { Neurophic } from 'neurophic';

const client = new Neurophic({ apiKey: process.env.NEUROPHIC_API_KEY });

const { id, status } = await client.ingest({
  identifier: 'user-123',
  name: 'Jane Doe',
  content: 'Prefers window seats.',
});