Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.trynebula.ai/llms.txt

Use this file to discover all available pages before exploring further.

Installation

npm install @nebula-ai/sdk

Quick Start

import Nebula from '@nebula-ai/sdk';
// or: const Nebula = require('@nebula-ai/sdk').default;

const client = new Nebula({ apiKey: process.env.NEBULA_API_KEY });

async function example() {
  // Create a collection
  const { results: collection } = await client.collections.create({
    name: 'my-collection',
  });

  // Store a memory
  const { results: created } = await client.memories.create({
    collection_id: collection.id,
    raw_text: 'Nebula supports Node.js and TypeScript',
    metadata: { topic: 'nebula', language: 'javascript' },
  });
  const memoryId = created.id;

  // Search memories
  const { results } = await client.memories.search({
    query: 'Node.js support',
    collection_ids: [collection.id],
  });

  for (const fact of results.semantic ?? []) {
    console.log(fact);
  }
}

example();
For more detailed examples, see Memory Operations.

Next Steps

  • Memory Operations - Store, retrieve, delete
  • Search Guide - Semantic search and filtering
  • Device Memory - Client-owned graph via snapshots.export plus memories.create / memories.search with a snapshot argument