The Graphlit TypeScript Client SDK, currently at version 1.0.20260422004, provides the official programmatic interface for interacting with the Graphlit Platform. This SDK is designed to simplify the development of AI-powered applications by abstracting the complexities of knowledge retrieval and large language model (LLM) integration. It enables developers to ingest diverse content types, including PDFs, websites, audio, and video, and leverage advanced capabilities such as Retrieval-Augmented Generation (RAG) for conversational AI, automated insight extraction (summaries, entities, metadata), and the creation of knowledge graphs. The client library is actively maintained with frequent updates, as indicated by its rapid versioning and extensive 'What's New' sections covering features like OpenAI Responses API support, enhanced streaming provider resilience with automatic retries, and a comprehensive agent framework. Its key differentiators include built-in context management, artifact collection, and an autonomous agent harness, aiming to accelerate the development of sophisticated AI applications.
npm install graphlit-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the GraphlitClient, configure API keys from environment variables, and execute a streaming agent with a specific prompt and options. It iterates over the streamed response chunks and prints the content.
Upgrade your Node.js runtime environment to version 20.0.0 or later. We recommend using an LTS version.
Review your `StreamAgentOptions` and ensure your application logic accounts for automatic OpenAI Responses API routing. If specific temperature control is critical, set `reasoningEffort: 'none'` in your agent specification or disable `useResponsesApi` if available.
Update your error handling logic for streaming operations to exclusively rely on error events emitted from the stream. Leverage the new `ProviderError` class for typed access to error details like `provider`, `statusCode`, and `retryable`.
Upgrade your Node.js environment to version 20.0.0 or higher. You can use tools like `nvm` to manage multiple Node.js versions.
Verify that your `GRAPHLIT_API_KEY` and `GRAPHLIT_SECRET_KEY` environment variables are correctly set and contain valid credentials. Regenerate keys in the Graphlit platform if necessary.
Ensure your project is configured for ES Modules (e.g., `"type": "module"` in `package.json`) and use `import { Symbol } from 'graphlit-client';`. If using CommonJS, ensure your setup correctly transpiles or targets CommonJS modules if the library is ESM-only.