Memora supports usage through three different ways:

  1. The official Typescript/Javascript library;
  2. The official Python library;
  3. An HTTP REST API.

Choose the method that best suits your needs.

Get your API key

You’ll need an API key to utilize Memora. You can get yours here.

Basic usage

With your API key in hands, we can begin our quickstart. Select how you want to interact with us.

Installing Memora

You can install Memora using your preferred package manager.

Basic example

Using Memora is pretty simple — four lines only.

import memora from 'usememora';

memora.auth('your-api-key');

await memora.add([
  'The Answer to the Ultimate Question of Life, the Universe, and Everything is 42',
  'Life is a quality that distinguishes active, living organisms from inanimate matter.'
]).go();

const results = await memora
  .find('what is the meaning of life?')
  .go();

console.log(results[0]);
// Output: 'The Answer to the Ultimate Question of Life, the Universe, and Everything is 42'

Let’s break it down step-by-step:

  1. memora.auth('your-api-key') sets your API key.
  2. memora.add([...]) sends to Memora your array of strings. These will be stored and processed for later retrieval.
  3. memora.find('query') fetches the top five most relevant from Memora, ordered by their relevance to your query.
  4. .go() executes the operation (either add or find). It’s important to know that every command in Memora needs to end with .go(). This is a feature of the we use, which makes building complex queries simple and readable.

And that’s it! You have now sucessfully inserted documents in Memora and searched through them — with only that, you are now equipped to do a lot of cool things.

Next steps

Memora’s simplicity doesn’t compromise its power. It’s also built to handle advanced scenarios, including metadata filtering and document sorting.

But before we explore these advanced features, it’s important to understand the essentials.