npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aether-ai/sdk

v0.4.0

Published

TypeScript SDK for Aether decentralized RAG

Readme

@aether-ai/sdk

TypeScript SDK for Aether — the decentralized RAG API.

Installation

npm install @aether-ai/sdk

Memory

Memory is the recommended way to give an agent, assistant, or per-user feature a durable memory. Construct it once with an entity id — a user, customer, patient, or agent session — and every call is automatically scoped to that entity. It is a thin facade over the raw AetherClient: it adds no new HTTP routes and inherits all transport, retry, timeout, and error semantics unchanged.

import { Memory } from "@aether-ai/sdk";

const mem = new Memory("patient-john", { apiKey: "aether_your_key_here" });

// Remember something (one HTTP call). Optional metadata is stored as tags.
await mem.remember("Anxious about flying; uses 4-7-8 breathing", {
  topic: "anxiety",
});

// Recall by meaning. `score` is higher = more relevant, relative to this call.
const hits = await mem.recall("anxiety coping", { k: 3 });
for (const h of hits) {
  console.log(`${h.score?.toFixed(2)}  ${h.text}`);
}

// Blend semantic relevance with recency (recent memories rank higher).
const recent = await mem.recall("what did we discuss", {
  k: 5,
  recencyWeight: 0.5,
});

// Chronological view, newest first.
const all = await mem.list({ limit: 20 });

// Forget one memory, or wipe the entity entirely.
await mem.forget(hits[0].id);
const removed = await mem.forgetAll();

Each result is a MemoryItem:

interface MemoryItem {
  id: string;          // underlying doc_id
  text: string;        // the remembered text
  createdAt?: string;  // RFC 3339; set by remember/list, and by recall when recencyWeight > 0
  entityId?: string;   // always this Memory's entity
  metadata: Metadata;  // structured metadata, echoed back on recall/list
  score?: number;      // relevance signal (recall only); higher = more relevant
}

Note: metadata (Record<string, string | number | boolean>) is stored with each memory and echoed back on recall and list. You can also filter on it at query time via recall(query, { filter }).

For lower-level control — raw documents, BYO embeddings, batching, async jobs — use the AetherClient directly.

Quick Start

import { AetherClient } from "@aether-ai/sdk";
import { readFileSync } from "fs";

const client = new AetherClient({
  apiKey: "aether_your_key_here",
});

// Insert a file — content type is auto-detected from the filename
const data = readFileSync("report.pdf");
const doc = await client.insert(new Uint8Array(data), {
  filename: "report.pdf",
});
console.log(`Inserted: ${doc.doc_id}`);

// Insert raw text
await client.insertText("Some text content to index");

// Search
const results = await client.search("machine learning", 5);
for (const r of results) {
  console.log(`  ${r.doc_id} (score: ${r.score}) - ${r.passage}`);
}

Supported File Formats

Content type is auto-detected from the filename extension. No need to specify contentType manually.

| Format | Extensions | |--------|-----------| | PDF | .pdf | | Word | .docx, .doc | | PowerPoint | .pptx, .ppt | | Excel | .xlsx, .xls | | HTML | .html, .htm | | CSV | .csv | | Plain text | .txt, .md, .json, .xml |

Binary-format parsing is handled automatically server-side — no setup required.

RAG Quick Start

Use retrieve() to search and get document content in one call:

import { AetherClient } from "@aether-ai/sdk";

const aether = new AetherClient();

// Insert documents
await aether.insertText("All employees receive 20 days PTO per year...");

// Retrieve relevant context for your LLM
const results = await aether.retrieve("How much PTO do I get?", 3);
const context = results
  .map((r) => `[${r.title ?? r.doc_id}]\n${r.content}`)
  .join("\n\n");

For complete RAG examples with Anthropic, OpenAI, Vercel AI SDK, and more, see the Aether docs.

Async Processing

For large files, use the async methods for non-blocking inserts:

import { readFileSync } from "fs";

// Submit for background processing
const data = readFileSync("report.pdf");
const job = await client.insertAsync(new Uint8Array(data), {
  filename: "report.pdf",
});

// Poll until the job reaches a terminal state
const result = await client.waitForJob(job.job_id);
console.log(`Status: ${result.status} (doc: ${result.doc_id})`);

License

MIT