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

@agent-nuvira/sdk

v1.0.1

Published

Agent-Nuvira SDK — Build custom agents for the Agent-Nuvira multi-agent orchestration system

Readme

@agent-nuvira/sdk

Build custom agents for the Agent-Nuvira multi-agent orchestration system.

Installation

npm install @agent-nuvira/sdk

Quick Start

Create a custom agent in three steps:

1. Scaffold the project

# From the agent-nuvira project root
npx tsx src/index.ts sdk scaffold my-agent CodeFormatter "Formats source code"

# Or manually create the files (see examples below)

2. Implement your agent

// src/code-formatter.ts
import { Agent, type AgentContext, type AgentResult, type LLMCallFn } from '@agent-nuvira/sdk';

export class CodeFormatter extends Agent {
  readonly name = 'CodeFormatter';
  readonly description = 'Formats source code according to project conventions';

  async execute(context: AgentContext, callLLM: LLMCallFn): Promise<AgentResult> {
    // Read files from the context
    const files = context.artifacts;

    // Build a prompt
    const prompt = [
      `You are the CodeFormatter agent.`,
      `Goal: ${context.goal}`,
      '',
      `Files to format:`,
      ...files.map(f => `- ${f.path}`),
    ].join('\n');

    // Call the LLM
    const response = await callLLM(prompt);

    return {
      success: true,
      summary: `Formatted ${files.length} file(s)`,
      details: response,
    };
  }
}

// Required: export a descriptor for automatic registration
export const agentDescriptor = {
  AgentClass: CodeFormatter,
  name: 'CodeFormatter',
  description: 'Formats source code according to project conventions',
  agentType: 'code-formatter',
  tags: 'code, format',
};

3. Test your agent

// tests/code-formatter.test.ts
import { describe, it } from 'vitest';
import { CodeFormatter } from '../src/code-formatter.js';
import {
  createMockContext,
  createMockLLM,
  createFailingMockLLM,
  runAgentTest,
  assertAgentSuccess,
  assertAgentFailure,
} from '@agent-nuvira/sdk/testing';

describe('CodeFormatter', () => {
  const agent = new CodeFormatter();

  it('should format files', async () => {
    const ctx = createMockContext({
      goal: 'Format all TypeScript files',
      artifacts: [{ path: 'src/index.ts', content: 'const x=1', description: 'Source' }],
    });
    const llm = createMockLLM('Formatted content');

    const result = await runAgentTest(agent, ctx, llm);

    assertAgentSuccess(result);
  });
});

API Reference

Agent (base class)

| Method | Description | |---|---| | abstract execute(context, callLLM) | Main logic — implement this | | validate(context) | Optional pre-execution check | | cleanup() | Optional post-execution cleanup |

Core Types

| Type | Description | |---|---| | AgentContext | Shared context bus — read inputs, write outputs | | AgentResult | Success/failure result with summary and details | | TaskStep | A single step in the execution plan | | FileChange | A proposed file modification | | Artifact | A file artifact (input or output) | | LLMCallFn | Function signature for LLM calls | | InferenceOptions | LLM generation parameters |

Testing Utilities (@agent-nuvira/sdk/testing)

| Function | Description | |---|---| | createMockContext(options) | Build a fully typed mock AgentContext | | createMockLLM(response) | Mock LLM that returns a fixed response | | createFailingMockLLM(error) | Mock LLM that throws an error | | createSequentialMockLLM(responses) | Mock LLM with sequenced responses | | runAgentTest(agent, context, callLLM) | Execute agent with validate + cleanup | | assertAgentSuccess(result) | Assert result indicates success | | assertAgentFailure(result, errorSubstring?) | Assert result indicates failure | | addArtifact(context, path, content, description) | Add a file artifact | | addTaskStep(context, id, agentType, description, dependsOn) | Add a task step | | addFileChange(context, path, newContent, ...) | Add a file change |

Scaffolding

Generate a new agent project:

agent-nuvira sdk scaffold my-agent CodeFormatter "Formats source code"
agent-nuvira sdk scaffold --template basic-agent my-minimal-agent MinimalAgent "Minimal example"
agent-nuvira sdk scaffold --template agent-pack my-agent-pack AgentPack "Collection of agents"

List available templates:

agent-nuvira sdk templates

Publishing

# Build the SDK
npm run build:sdk

# Publish to npm
cd src/agent-sdk && npm publish

License

MIT