TypeScript

Install the TypeScript/Node.js SDK and start building AI applications with semantic memory.

Build AI applications with TypeScript or JavaScript using the Graphlit SDK.

New to Graphlit? Complete the Quickstart tutorial for a hands-on introduction.


Installation

Install the Graphlit client with npm or yarn:

npm install graphlit-client

Requirements:


Quick Start

import { Graphlit } from 'graphlit-client';

async function main() {
  const graphlit = new Graphlit();

  const response = await graphlit.ingestText(
    'Our AI agent needs persistent memory across sessions...',
    'Product Requirements',
  );

  console.log(`βœ… Memory created: ${response.ingestText.id}`);
}

main().catch((error) => {
  console.error(error);
  process.exit(1);
});

Configuration Options

Alternative: Explicit Configuration

Only use if you need to override environment variables:


Common Patterns

Ingest Content

Search Memory

Chat with Context


Next Steps

Quickstarts:

Examples:

Resources:

Last updated

Was this helpful?