Neurophic

Quickstart

Get a key, store a memory, search it and build prompt context with curl or the JavaScript SDK

Create a project key, store your first memory and search it.

Create a project key

Sign in at console.neurophic.ai, create a project and create a key on its API Keys page. Copy it when it is shown and set it as NEUROPHIC_API_KEY in your environment.

Install the SDK

npm install neurophic

Store a memory

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 and vegetarian meals on long flights.',
});

Learn more under API reference > Ingest.

Retrieve it

const { result } = await client.retrieve({
  identifier: 'user-123',
  query: 'travel preferences',
});

console.log(result); // the most relevant memories, as markdown

Learn more under API reference > Retrieve.

Get prompt context

const { result } = await client.context({
  identifier: 'user-123',
  query: 'book a flight for the user',
});

Learn more under API reference > Context.

Where next

Identifiers

How end-user ids work with project keys, and what happens for unknown ones.
Read

API reference

Every endpoint, field, response shape and error code.
Read

JavaScript SDK

Client options, every method, and the error classes.
Read