@ellipsis1/sdk
v0.1.0
Published
Ellipsis observability SDK for LLM agents
Readme
Ellipsis SDK for TypeScript
AI Agent Observability for TypeScript and Node.js applications.
The Ellipsis SDK enables developers to collect and export telemetry from AI agents and LLM-powered applications to the Ellipsis observability platform.
Monitor agent executions, LLM invocations, tool calls, execution traces, latency and token usage through lightweight framework instrumentation.
Features
- Agent observability: Capture agent executions and associated operations.
- LLM instrumentation: Collect model information, invocation latency and token usage.
- Trace management: Organize execution events into structured traces and spans.
- Framework integration: Instrument LangChain and LangGraph applications through LangChain callbacks.
- Provider flexibility: Capture telemetry from different LLM models supported by LangChain.
- Distributed tracing: Organize operations into traces and hierarchical spans, preserving parent-child relationships.
- Non-intrusive integration: Instrumentation should not interfere with the execution of your application.
- Reliable telemetry export: Batch and export collected traces with retry mechanisms for transient network failures.
- Centralized configuration: Configure instrumentation, global tags and agent metadata.
Installation
Install the package using npm:
npm install @ellipsis1/sdkConfiguration
Before initializing the SDK, you need two mandatory parameters:
- Ingestion URL: The Ellipsis API endpoint used to receive telemetry data.
- Agent API key: The key used to authenticate your application and associate its traces with your agent in Ellipsis.
Retrieve your ingestion URL and API key
1. Retrieve your ingestion URL
The ingestion API URL is provided in the official Ellipsis documentation:
https://docs.ellipsis1.com
2. Generate your agent API key
- Connect to your Ellipsis account at https://ellipsis1.com, or create an account.
- Open your organization's workspace.
- Create an agent.
- Generate its API key.
The API key establishes the connection between your Node.js application and your organization on the Ellipsis platform.
Once configured, the SDK uses this key to authenticate and associate the telemetry collected during your agent executions with the corresponding agent in Ellipsis.
Configuration parameters
The SDK accepts a Config object through initEllipsis().
| Parameter | Required | Description |
| ------------------------ | -------- | ------------------------------------------------------ |
| ingestionUrl | Yes | Ellipsis telemetry ingestion API endpoint. |
| apiKey | Yes | Agent API key generated in your Ellipsis workspace. |
| globalTags | No | List of tags applied globally to collected telemetry. |
| globalMetadata | No | Global metadata describing your agent. |
| globalMetadata.name | No | Agent or Node.js project name (maximum 50 characters). |
| globalMetadata.version | No | Agent version, using SemVer format (e.g. 1.0.0). |
| globalMetadata.stage | No | Agent execution environment. |
Allowed values and validation constraints
| Parameter | Expected values / constraints |
| -------------- | --------------------------------------------------------- |
| ingestionUrl | Mandatory URL provided by the Ellipsis documentation. |
| apiKey | Mandatory API key generated in your workspace. |
| globalTags | Optional array of strings, maximum 20 characters per tag. |
| name | Optional string, maximum 50 characters. |
| version | Optional semantic version (e.g. 0.0.1). |
| stage | DEV, INT, UAT, PROD. |
| level | debug, info, warn, error, silent. |
Configuration example (without environment variables)
You can provide configuration values directly:
import { initEllipsis, type Config } from "@ellipsis1/sdk";
const config: Config = {
ingestionUrl: "YOUR_ELLIPSIS_INGESTION_URL",
apiKey: "YOUR_AGENT_API_KEY",
globalTags: ["e1", "first-try"],
globalMetadata: {
name: "My first project",
version: "1.0.0",
stage: "DEV",
},
};
const ellipsis = initEllipsis(config);Replace the placeholder values with your actual ingestion URL and agent API key.
Configuration example (with environment variables)
For security and maintainability, we recommend storing configuration values in environment variables rather than hardcoding them in your source code.
For example, define the following variables in your .env file:
ELLIPSIS_INGESTION_URL=your_ingestion_url
ELLIPSIS_AGENT_API_KEY=your_agent_api_key
ELLIPSIS_AGENT_TAG_1=e1
ELLIPSIS_AGENT_TAG_2=first-try
ELLIPSIS_AGENT_NAME=My first project
ELLIPSIS_AGENT_VERSION=1.0.0
ELLIPSIS_AGENT_STAGE=DEVThen initialize the SDK:
import { initEllipsis, type Config, type Stage } from "@ellipsis1/sdk";
import dotenv from "dotenv";
dotenv.config();
const config: Config = {
ingestionUrl: process.env.ELLIPSIS_INGESTION_URL!,
apiKey: process.env.ELLIPSIS_AGENT_API_KEY!,
globalTags: [
process.env.ELLIPSIS_AGENT_TAG_1!,
process.env.ELLIPSIS_AGENT_TAG_2!,
],
globalMetadata: {
name: process.env.ELLIPSIS_AGENT_NAME!,
version: process.env.ELLIPSIS_AGENT_VERSION!,
stage: process.env.ELLIPSIS_AGENT_STAGE! as Stage,
},
};
const ellipsis = initEllipsis(config);Make sure your environment variables are loaded before initializing the SDK. Never commit your .env file or expose your agent API key in public repositories.
Quick Start
Integrating Ellipsis into your application requires three steps:
- Initialize the Ellipsis SDK.
- Create the framework instrumentation handler.
- Pass the handler to your agent invocation.
1. Initialize Ellipsis
Initialize the SDK using initEllipsis() and your configuration.
const ellipsis = initEllipsis(config, "info");Initialize Ellipsis once at the top level of your application's entry point.
The optional second argument defines the SDK logging level. Available levels are debug, info, warn, error and silent. By default, the logger is set to warn if no level is provided.
2. Create the instrumentation handler
Initialize the LangChain instrumentation handler:
const handler = ellipsis.langchain();3. Instrument your agent
Pass the handler to your agent invocation through LangChain callbacks.
Example using Google Gemini with LangChain:
import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
import { createAgent } from "langchain";
const model = new ChatGoogleGenerativeAI({
model: "gemini-2.5-flash",
apiKey: "YOUR_GEMINI_API_KEY",
maxRetries: 1,
});
const agent = createAgent({
model,
tools: [
/* your tools */
],
});
const result = await agent.invoke(
{
messages: [{ role: "user", content: "Your question here" }],
},
{
callbacks: [handler],
}
);Once invoked, the Ellipsis handler captures supported execution events and exports telemetry to your Ellipsis platform.
Supported Integrations
Framework compatibility
| Framework | Support | Instrumentation |
| --------- | ------------------------------------- | ---------------------- |
| LangChain | Supported | ellipsis.langchain() |
| LangGraph | Supported through LangChain callbacks | ellipsis.langchain() |
LLM provider compatibility
The SDK is not currently tied to specific LLM provider integrations.
It captures telemetry emitted through the LangChain framework, allowing it to work with different LLM models supported by LangChain, including models from OpenAI, Google Gemini, Anthropic, OpenRouter and other compatible providers.
Monitor your traces
Once your application executes, collected telemetry is exported to Ellipsis.
You can use the Ellipsis platform to inspect:
- Trace and span hierarchies.
- Agent and chain executions.
- LLM provider and model information.
- Token consumption.
- Prices per run.
- Execution duration and latency.
- Tool calls and associated operations.
- LLM reasoning behind each step.
- Errors and failed executions.
The SDK supports multi-agent and multi-model projects.
Runtime requirements
The SDK requires Node.js >=22 and supports both TypeScript and JavaScript applications. For LangChain and LangGraph instrumentation, the following peer dependencies are required:
| Dependency | Minimum version |
| ----------------- | --------------- |
| @langchain/core | >=1.1.0 |
Provider-specific instrumentation outside the LangChain framework is not currently supported.
Module Compatibility
The Ellipsis SDK supports both Node.js module systems:
- ES Modules (ESM)
- CommonJS (CJS)
The package provides dedicated ESM and CommonJS bundles, allowing it to integrate with projects using either module system without additional configuration.
How It Works
The Ellipsis SDK acts as an instrumentation layer between your application and the Ellipsis observability platform.
Its architecture is based on four main components:
- Instrumentation adapters: Connect to supported frameworks to capture execution events.
- Trace and span management: Organize captured events into structured traces with parent-child relationships.
- Telemetry processing: Aggregate execution information, including duration, token usage and LLM metrics.
- Telemetry exporter: Batch and transmit collected telemetry to the Ellipsis platform.
The SDK is designed to minimize its impact on application execution while providing structured observability data.
The collected data is stored and organized on the Ellipsis platform for a retention period determined by your subscription plan. Your team is given access to this data according to the permissions and conditions of that plan.
For more information about available plans and conditions, visit our official website:
https://ellipsis1.com
Documentation
For detailed configuration options, framework integration guides and API references, visit the official Ellipsis documentation:
https://docs.ellipsis1.com
License
This project is licensed under the terms of the license included in the LICENSE file.
Contact
For general inquiries, please visit the contact section of our website:
https://ellipsis1.com
For technical support, installation or usage issues, or to report a bug, please contact us at:
