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

@agentxjs/node-platform

v2.9.0

Published

Node.js runtime platform for AgentX. Provides concrete implementations of persistence (SQLite), bash execution, networking (WebSocket), message queue, and logging.

Readme

@agentxjs/node-platform

Node.js runtime platform for AgentX. Provides concrete implementations of persistence (SQLite), bash execution, networking (WebSocket), message queue, and logging.

Overview

@agentxjs/node-platform assembles platform-specific components into an AgentXPlatform instance that the AgentX runtime requires. It handles storage, shell execution, and event infrastructure -- the driver (LLM) is injected separately.

Quick Start

import { createNodePlatform } from "@agentxjs/node-platform";

const platform = await createNodePlatform({
  dataPath: "./data",
});

// platform.containerRepository  -- SQLite container storage
// platform.imageRepository      -- SQLite image storage
// platform.sessionRepository    -- SQLite session + message storage
// platform.eventBus             -- In-memory EventBus
// platform.bashProvider         -- Shell execution via execa

Deferred Initialization

Use nodePlatform() for lazy initialization (e.g., when passing to createServer):

import { nodePlatform } from "@agentxjs/node-platform";
import { createServer } from "@agentxjs/server";

const server = await createServer({
  platform: nodePlatform({ dataPath: "./data" }), // resolved lazily
  createDriver: myCreateDriver,
});

API Reference

createNodePlatform(options?): Promise<AgentXPlatform>

Immediately creates and returns a fully initialized platform.

nodePlatform(options?): DeferredPlatformConfig

Returns a deferred config. Call .resolve() to initialize.

isDeferredPlatform(value): value is DeferredPlatformConfig

Type guard for deferred platform configs.

Returned AgentXPlatform

| Property | Type | Description | | --------------------- | --------------------- | ------------------------------- | | containerRepository | ContainerRepository | Container CRUD (SQLite) | | imageRepository | ImageRepository | Image CRUD (SQLite) | | sessionRepository | SessionRepository | Session + message CRUD (SQLite) | | eventBus | EventBus | In-memory pub/sub | | bashProvider | BashProvider | Shell execution via execa |

Additional Exports

// Persistence
import { createPersistence, sqliteDriver, memoryDriver } from "@agentxjs/node-platform/persistence";

// Network
import { WebSocketServer, WebSocketConnection } from "@agentxjs/node-platform/network";

// Message Queue
import { SqliteMessageQueue, OffsetGenerator } from "@agentxjs/node-platform/mq";

// Bash
import { NodeBashProvider } from "@agentxjs/node-platform";

// Logger
import { FileLoggerFactory } from "@agentxjs/node-platform";

Configuration

NodePlatformOptions

interface NodePlatformOptions {
  dataPath?: string; // default: "./data"
  logDir?: string; // enables file logging if set
  logLevel?: LogLevel; // default: "debug" (file) / "info" (console)
}

| Option | Type | Default | Description | | ---------- | ---------- | ------------------------------------- | ------------------------------------------------------------ | | dataPath | string | "./data" | Base directory for SQLite database (<dataPath>/agentx.db) | | logDir | string | -- | Log file directory. Enables file logging when set. | | logLevel | LogLevel | "debug" (file) / "info" (console) | "debug" | "info" | "warn" | "error" | "silent" |

Persistence Drivers

// SQLite (production)
const persistence = await createPersistence(sqliteDriver({ path: "./data/agentx.db" }));

// In-memory (testing)
const persistence = await createPersistence(memoryDriver());

File Logging

import { FileLoggerFactory } from "@agentxjs/node-platform";
import { setLoggerFactory } from "commonxjs/logger";

setLoggerFactory(
  new FileLoggerFactory({
    logDir: ".agentx/logs",
    level: "info",
    filename: "app.log", // default
  })
);

When logDir is passed to createNodePlatform, file logging is configured automatically.

Sub-path Exports

| Import path | Contents | | ------------------------------------- | --------------------------------------------------- | | @agentxjs/node-platform | Main entry (everything) | | @agentxjs/node-platform/persistence | createPersistence, sqliteDriver, memoryDriver | | @agentxjs/node-platform/mq | SqliteMessageQueue, OffsetGenerator | | @agentxjs/node-platform/network | WebSocketServer, WebSocketConnection |