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

axisdream

v1.0.2

Published

Official Axisdream SDK for the Context OS behind your work with AI

Readme

axisdream

Official TypeScript SDK for Axisdream — client for the Axisdream Context OS.

Available on npm as axisdream — the same package name as the Python SDK.

Install

npm install axisdream
# or
pnpm add axisdream
# or
bun add axisdream

Quickstart

import { Axisdream } from "axisdream";

// Reads AXISDREAM_API_KEY and AXISDREAM_BASE_URL from environment automatically
const cog = new Axisdream();
const space = await cog.space("my-agent");

// Add context
await space.add(
  "knowledge/retry.md",
  "# Retry Patterns\nUse exponential backoff with jitter.",
  "knowledge",
  "retry-patterns",
  { confidence: 0.95 }
);

// Search first for substantive context. Axisdream coordinates all retrieval layers.
const results = await space.retrieve("retry logic", {
  top_k: 10,         // final accepted context chunks (maximum 20)
  query_variants: [
    { query: "retry logic with backoff failures", kind: "rewrite" },
    { query: "a passage describing reliable retry behavior with backoff and jitter", kind: "hyde" },
    { query: "retry backoff jitter", kind: "exact" },
  ],
});
for (const item of results.results) {
  console.log(`${item.file_path}: ${item.score} (${item.source})`);
}

// Retrieve a file
const file = await space.fetch("knowledge/retry.md");
console.log(file.content);

// Inspect structure only when a path or folder is specifically needed.
const files = await space.list("knowledge");
console.log(`${files.file_count} files`);

// Delete
await space.forget("knowledge/retry.md");

Works everywhere

Native fetch — no dependencies. Works in Node 18+, Deno, Bun, Edge, browser.

API Reference

new Axisdream(config?)

Reads AXISDREAM_API_KEY from environment if apiKey not provided.

| Option | Default | Description | |---|---|---| | apiKey | env AXISDREAM_API_KEY | Your API key | | baseUrl | env AXISDREAM_BASE_URL, then http://localhost:8000 | Backend URL | | timeout | 60000 | Request timeout (ms) | | maxRetries | 3 | Retries on 429/5xx |

cog.space(nameOrId)SpaceClient

| Method | Description | |---|---| | space.list(folder?) | List files in folder | | space.fetch(path) | Get one file | | space.retrieve(query, options?) | Ranked context discovery across semantic, lexical, and relationship signals | | space.add(path, content, bucket, topic, options?) | Create or replace one context file | | space.forget(path) | Delete one file from the space | | space.getTools() | Fetch the Platform's live MCP-compatible tool schemas |

add() parameters

space.add(
  "knowledge/retry.md",           // path
  "# Retry\nUse backoff...",      // content
  "knowledge",                    // bucket: "knowledge" | "memory" | "skills" | "state"
  "retry-patterns",               // topic
  {
    confidence: 0.95,             // 0.0-1.0, default 0.9
    related: ["error.md"],        // canonical related files
    relates_to: ["error.md"],     // backward-compatible alias
  }
)

Search limits

retrieve() options (enforced at backend). The backend coordinates the retrieval sources automatically and returns at most top_k accepted chunks:

space.retrieve("query", {
  top_k: 10,             // final accepted context chunks (1–20, default 10)
  bucket?: "knowledge" | "memory" | "skills" | "state",  // filter by bucket
  folder_path?: string, // restrict to folder
  query_variants: [      // exactly one rewrite, hyde, and exact probe
    { query: string, kind: "rewrite" | "exact" | "hyde" },
  ],
})

Examples:

// Adjust coverage while keeping the backend retrieval pipeline automatic
space.retrieve("query", { top_k: 10 })

// Multi-aspect retrieval: one call, bounded and deduplicated by Axisdream
space.retrieve("design the onboarding modal", {
  query_variants: [
    { query: "modal composition and hierarchy", kind: "rewrite" },
    { query: "accessible onboarding dialog behavior", kind: "exact" },
  ],
  top_k: 10,
})

Errors

import { AuthError, NotFoundError, RateLimitError } from "axisdream";

try {
  await space.retrieve("query");
} catch (err) {
  if (err instanceof AuthError) console.error("Invalid API key");
  if (err instanceof NotFoundError) console.error("Space not found");
  if (err instanceof RateLimitError) console.error("Rate limited");
}

Local-first note

The TypeScript SDK uses baseUrl, then AXISDREAM_BASE_URL, then http://localhost:8000 for local development.