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

@sisu-ai/server

v8.0.0

Published

Serve Sisu agents over HTTP/HTTPS with a thin, framework-friendly server adapter.

Downloads

406

Readme

@sisu-ai/server

Serve Sisu agents over HTTP/HTTPS with a thin, framework-friendly server adapter.

Tests CodeQL License Downloads PRs Welcome

Setup

npm i @sisu-ai/server

Usage

import { Agent } from '@sisu-ai/core';
import { Server } from '@sisu-ai/server';
import { agentRunApi } from '@sisu-ai/mw-agent-run-api';

const app = new Agent().use(agentRunApi());
const server = new Server(app, {
  port: 3000,
  // Optional banner (enabled by default). Add endpoints to list them.
  bannerEndpoints: [
    'POST /api/runs/start',
    'GET  /api/runs/:id/status',
    'GET  /api/runs/:id/stream',
    'POST /api/runs/:id/cancel',
  ],
  createCtx: (req, res) => ({ req, res, messages: [], signal: new AbortController().signal })
});
server.listen();

Options

  • port/host/backlog/path/tls: standard Node listen options.
  • basePath: base URL path for your agent routes. Default: /api.
  • healthPath: health endpoint or false to disable. Default: /health.
  • createCtx(req, res): build your per-request context; Server injects agent and a default log if missing.
  • logBanner: print a startup banner. Default: true.
  • bannerEndpoints: string lines printed under the banner (e.g., GET /api/runs/:id/status).
  • logLevel: 'debug' | 'info' | 'warn' | 'error'; sets the default console logger level.
  • logger: provide a custom logger implementing Sisu Logger.
  • redactLogKeys: additional keys to redact in logs (merged with built-ins).

Request Logging

The server emits basic structured logs for every request and response using the default logger (or your logger).

  • Request: [server] request { method, url }
  • Response: [server] response { method, url, status, duration_ms }

Control verbosity via logLevel or LOG_LEVEL.

Events API

Subscribe to server lifecycle and per-request events without using the listen callback.

const server = new Server(app, { port: 3000 });

server
  .on('listening', ({ url }) => {
    console.log('ready at', url);
  })
  .on('request', ({ method, url }) => {
    // e.g., metrics, audit
  })
  .on('response', ({ method, url, status, duration_ms }) => {
    // e.g., record duration_ms to your metrics system
  })
  .on('error', (err) => {
    console.error('server error', err);
  })
  .on('close', () => {
    console.log('server closed');
  });

server.listen();

Features

  • Health endpoint (/health by default)
  • Attach to existing http/https server or listen directly
  • Supports TLS and UNIX sockets
  • Injects the agent into each request context so middleware can spawn runs
  • Startup banner: prints listen address, health path, base path, and optional endpoints
  • Request logs: per-request/response lines, redaction support
  • Events API: listening, request, response, error, close

Community & Support

Discover what you can do through examples or documentation. Check it out at https://github.com/finger-gun/sisu. Example projects live under examples/ in the repo.


Documentation

CorePackage docs · Error types

AdaptersOpenAI · Anthropic · Ollama

Anthropichello · control-flow · stream · weather

Ollamahello · stream · vision · weather · web-search

OpenAIhello · weather · stream · vision · reasoning · react · control-flow · branch · parallel · graph · orchestration · orchestration-adaptive · guardrails · error-handling · rag-chroma · web-search · web-fetch · wikipedia · terminal · github-projects · server · aws-s3 · azure-blob


Contributing

We build Sisu in the open. Contributions welcome.

Contributing Guide · Report a Bug · Request a Feature · Code of Conduct


Star on GitHub if Sisu helps you build better agents.

Quiet, determined, relentlessly useful.

Apache 2.0 License