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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sftech/ai-orchestrator-core

v0.0.19

Published

AI Orchestrator Core is a TypeScript library designed to provide the essential building blocks for orchestrating AI agents, assistants, and large language model (LLM) workflows. It is built with modularity and extensibility in mind, following Clean Archit

Readme

AI Orchestrator Core

AI Orchestrator Core is a TypeScript library designed to provide the essential building blocks for orchestrating AI agents, assistants, and large language model (LLM) workflows. It is built with modularity and extensibility in mind, following Clean Architecture principles, and is intended for use in advanced AI orchestration scenarios within Node.js/NestJS projects.


Table of Contents


Overview

AI Orchestrator Core provides the foundation for building, configuring, and running AI agents and assistants. It abstracts the orchestration of LLMs, agent logic, prompt management, and tool integration, making it easy to build scalable and maintainable AI-driven applications.

Features

  • Modular orchestration of LLMs and agents
  • Extensible base classes for agents, assistants, and orchestrators
  • Generic and file-based agent/assistant implementations
  • DTOs and controllers for REST API integration
  • Clean separation of domain, application, infrastructure, and presentation layers

Installation

Install via npm:

npm install @sftech/ai-orchestrator-core

Or with yarn:

yarn add @sftech/ai-orchestrator-core

Getting Started

Import the module into your NestJS application:

import { AiOrchestratorCoreModule } from '@sftech/ai-orchestrator-core';

@Module({
  imports: [
    AiOrchestratorCoreModule.register({
      // Provide orchestrator options here (see below)
    }),
  ],
})
export class AppModule {}

Orchestrator Options

The register method expects an options object implementing IOrchestratorOptions. This allows you to configure the orchestrator's behavior, such as agent/assistant types, tool integrations, and more. See src/domain/orchestrator-options.interface.ts for all available options.

Example:

const orchestratorOptions: IOrchestratorOptions = {
  // Define your orchestrator configuration here
};

AiOrchestratorCoreModule.register(orchestratorOptions);

Architecture

The library is structured according to Clean Architecture principles:

  • Domain: Core models, interfaces, and enums
  • Application: Base and generic orchestrators, agents, assistants, and file-based logic
  • Infrastructure: Mappers, seeders, and option handling
  • Presentation: REST controllers and DTOs for API integration

Core Modules & Concepts

  • Base Classes: Extend BaseOrchestrator, BaseAgent, BaseAssistant, or BaseLlmAssistant to implement custom logic
  • Generic Implementations: Use or extend GenericLlmOrchestrator, GenericLlmAgent, GenericLlmAssistant for LLM-based workflows
  • File Reader Agents/Assistants: Integrate file-based input/output via FileReaderAgent and FileReaderAssistant
  • Controllers: Use GenericOrchestratorController and ToolsController for REST API endpoints
  • DTOs: Data transfer objects for configuration and runtime (see src/presentation/dtos/)

Usage Examples

Registering the Module

import { AiOrchestratorCoreModule } from '@sftech/ai-orchestrator-core';
import { IOrchestratorOptions } from '@sftech/ai-orchestrator-core';

const options: IOrchestratorOptions = {
  // ...your orchestrator configuration...
};

@Module({
  imports: [AiOrchestratorCoreModule.register(options)],
})
export class AppModule {}

Using the REST API

The library provides controllers for orchestrator and tool operations. Once the module is registered, endpoints such as /orchestrator/generic and /tools are available for integration.

Extending Agents or Assistants

You can extend the base or generic classes to implement your own agent or assistant logic:

import { BaseAgent } from '@sftech/ai-orchestrator-core';

export class MyCustomAgent extends BaseAgent {
  // Implement your custom logic here
}

Extending the Library

  • Add new agent or assistant types by extending the base classes
  • Implement custom orchestrators for advanced workflows
  • Add new controllers or DTOs for additional API endpoints
  • Use the provided interfaces and enums for strong typing and consistency

License

© 2025 SFTech. All rights reserved.