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

cassiopeia-sdk

v0.3.0

Published

SDK for Cassiopeia Agent via Redis

Downloads

27

Readme

Cassiopeia Agent Node.js SDK

한국어 | English

English

Overview

Official Node.js SDK for the Cassiopeia Agent framework. Install this single library to connect your agent to the orchestra network — no Redis wiring, no message schema boilerplate.

What you get:

  • AgentBase — base class: implement handle() and you're done
  • AgentBrain — NLU router: natural-language → BrainDecision (tool + params) with injection guard, retry, rate limit
  • Tool — typed tool definition with JSON Schema validation
  • CassiopeiaClient — low-level Redis Pub/Sub messaging
  • verifyMessage — HMAC signature verification for incoming tasks
  • Zod schemas: LLMRequestSchema, LLMResponseSchema (runtime-validated before send)

Requirements

  • Node.js 18+ (uses built-in fetch)
  • Access to the orchestra's Redis server

Installation

npm install cassiopeia-sdk

Quickstart

const { AgentBase } = require('cassiopeia-sdk');

class MyAgent extends AgentBase {
  async handle(msg) {
    // Call LLM through the orchestra gateway (no API key needed)
    const response = await this.requestLlm([
      { role: 'user', content: msg.payload.content }
    ]);
    await this.sendResult(msg.payload.task_id, { answer: response.content });
  }
}

async function main() {
  const agent = new MyAgent(process.env.AGENT_ID, process.env.REDIS_URL);
  await agent.register(process.env.ORCHESTRA_URL, {
    capabilities: ['my_action'],
    allowLlmAccess: true,
    apiKey: process.env.ORCHESTRA_API_KEY,
  });
  await agent.start();
}

main().catch(console.error);

See GUIDE.md for the full reference.


한국어

개요

Cassiopeia 에이전트 프레임워크의 공식 Node.js SDK입니다. 이 라이브러리 하나만 설치하면 오케스트라 네트워크에 에이전트를 연결할 수 있습니다. Redis 연결이나 메시지 스키마를 직접 다룰 필요가 없습니다.

제공 기능:

  • AgentBase — 기본 클래스: handle()만 구현하면 동작
  • AgentBrain — NLU 라우터: 자연어 → BrainDecision(Tool + 파라미터), 인젝션 방어·재시도·속도 제한 내장
  • Tool — JSON Schema 기반 타입 안전 도구 정의
  • CassiopeiaClient — 저수준 Redis Pub/Sub 메시징
  • verifyMessage — 수신 메시지 HMAC 서명 검증
  • Zod 스키마: LLMRequestSchema, LLMResponseSchema (전송 전 런타임 검증)

요구사항

  • Node.js 18 이상 (내장 fetch 사용)
  • 오케스트라의 Redis 서버 접근 가능

설치

npm install cassiopeia-sdk

빠른 시작

const { AgentBase } = require('cassiopeia-sdk');

class MyAgent extends AgentBase {
  async handle(msg) {
    // 오케스트라 LLM 게이트웨이 호출 (별도 API 키 불필요)
    const response = await this.requestLlm([
      { role: 'user', content: msg.payload.content }
    ]);
    await this.sendResult(msg.payload.task_id, { answer: response.content });
  }
}

async function main() {
  const agent = new MyAgent(process.env.AGENT_ID, process.env.REDIS_URL);
  await agent.register(process.env.ORCHESTRA_URL, {
    capabilities: ['my_action'],
    allowLlmAccess: true,
    apiKey: process.env.ORCHESTRA_API_KEY,
  });
  await agent.start();
}

main().catch(console.error);

전체 레퍼런스는 GUIDE.md를 참고하세요.