> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js Client

> Official Node.js SDK for Nebula

## Installation

```bash theme={null}
npm install @nebula-ai/sdk
```

## Quick Start

```javascript theme={null}
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](/guides/memory-operations).

## Next Steps

* [Memory Operations](/guides/memory-operations) - Store, retrieve, delete
* [Search Guide](/guides/search) - Semantic search and filtering
* [Device Memory](/guides/device-memory-quickstart) - Client-owned graph via `snapshots.export` plus `memories.create` / `memories.search` with a `snapshot` argument
