Skip to content

@smartpointstech/sptflo-engine

SPTFlo engine - swarm coordination, neural/SONA integration, hooks, and performance

Overview

This package is the core engine for SPTFlo, consolidating swarm coordination, neural network integration, hook lifecycle management, performance monitoring, verification, security, transport, and middleware into a single module. It implements ADR-003's unified swarm coordinator supporting 15-agent hierarchical mesh topologies with consensus algorithms.

Installation

bash
npm install @smartpointstech/sptflo-engine

Key Features

  • Unified Swarm Coordinator -- single coordination engine supporting mesh, hierarchical, centralized, and hybrid topologies
  • Consensus Algorithms -- raft, byzantine, and gossip protocols with configurable thresholds
  • Neural/SONA Integration -- optional integration with @smartpointstech/sona and @smartpointstech/attention
  • Hook Lifecycle -- pre/post task hooks for extensible agent behavior
  • Verification and Security -- built-in verification and security modules

Dependencies

Key internal dependencies:

  • @smartpointstech/sptflo-shared -- shared types and utilities
  • @smartpointstech/sptflo-memory (optional) -- persistent memory
  • @smartpointstech/sona (optional) -- adaptive learning engine
  • @smartpointstech/attention (optional) -- attention mechanisms

Quick Start

typescript
import { swarm } from '@smartpointstech/sptflo-engine';

const coordinator = swarm.createUnifiedSwarmCoordinator({
  topology: { type: 'hierarchical', maxAgents: 15 },
  consensus: { algorithm: 'raft', threshold: 0.66 },
});

API Reference

Module Exports

ExportTypeDescription
swarmnamespaceSwarm coordination (UnifiedSwarmCoordinator, topologies)
neuralnamespaceNeural network and SONA integration
hooksnamespaceHook lifecycle management
performancenamespacePerformance monitoring and benchmarking
verificationnamespaceOutput verification utilities
securitynamespaceSecurity policies and enforcement
transportnamespaceInter-agent transport layer
middlewarenamespaceRequest/response middleware pipeline

Released under the MIT License.