JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q47333F
  • License MIT

Blax - Enhanced HMS Dev multi-agent collaboration platform with human-in-the-loop supervision, deal-centric value contracts, and comprehensive agent orchestration.

Package Exports

  • blax

Readme

Blax v2.0 - Advanced Multi-Agent Collaboration Platform

npm version License: MIT Node.js TypeScript

Blax is a powerful multi-agent collaboration platform that combines human-in-the-loop supervision with value-driven decision making. Built for enterprise environments requiring sophisticated agent orchestration, real-time monitoring, and comprehensive audit trails.

πŸš€ What's New in v2.0

Blax v2.0 represents a complete transformation from a basic terminal agent into a comprehensive multi-agent collaboration platform:

  • πŸ”§ Unified System Orchestration - Manage complex multi-component systems with health monitoring
  • πŸ’Ό Deal-Centric Value Contracts - Structure collaboration with stakeholders, financing, and measurable outcomes
  • πŸ‘οΈ Human-in-the-Loop Supervision - Real-time agent monitoring with pause, resume, escalate controls
  • πŸ“Š Comprehensive Analytics - KPI tracking, performance metrics, and automated alerting
  • βš™οΈ Dynamic Configuration - Runtime system tuning with feature flags and rollout management

🌟 Key Features

Multi-Agent Orchestration

  • Agent Hub with skill execution and telemetry
  • Message Bus for real-time agent communication
  • Control Channels for human oversight and intervention
  • Delegation System for hierarchical task distribution

Value-Driven Decision Making

  • Deal Management with CRUD operations for collaborative contracts
  • Value Evaluation Engine providing binary YES/NO recommendations
  • Financial Provenance with complete audit trails
  • Standards Compliance validation across 197+ industry regulations

Real-Time Monitoring

  • Interactive Terminal UI for live agent monitoring
  • Event Streaming with filtering and correlation
  • Alert Management with automated anomaly detection
  • Health Monitoring with component status tracking

Enterprise Ready

  • Production Deployment with Docker and Kubernetes support
  • Scalable Architecture with Redis-backed communication
  • Security Features with capability-based access control
  • Compliance Tools with comprehensive audit logging

πŸ“¦ Quick Start

Installation

# Install globally
npm install -g blax@2.0.0

# Or install locally
npm install blax@2.0.0

Prerequisites

  • Node.js 18+ for TypeScript execution
  • Redis for message bus (install via brew install redis or apt install redis-server)

Basic Usage

# Original terminal agent (v1.x compatibility)
blax interactive

# New HMS Dev system
blax system start

# Monitor agents in real-time
blax watch start

# Manage collaborative deals
blax deal create --name "API Integration" --budget 5000

Web Dashboard

Once started, access the web dashboard at:

🎯 Use Cases

Software Development Teams

# Create development deal
blax deal create \
  --name "User Authentication System" \
  --problem "Implement secure OAuth 2.0 login" \
  --budget 15000 \
  --stakeholders "Security Team,Frontend Team" \
  --standards "OAUTH2,GDPR"

# Evaluate implementation approach
blax deal evaluate deal_123 --action-type implementation

# Monitor development progress
blax watch start

Enterprise Operations

# Start full system with monitoring
blax system start --dashboard-port 9090

# View real-time metrics
blax metrics show

# Check compliance status
blax deal list --status in_progress

Human-in-the-Loop Workflows

# Interactive agent supervision
blax watch start

# Control agent execution
blax watch control agent_123 PAUSE --reason "Code review required"
blax watch control agent_123 RESUME

# Escalate to human oversight
blax watch control agent_123 ESCALATE --reason "Complex decision needed"

πŸ—οΈ Architecture

Blax v2.0 Architecture
β”œβ”€β”€ πŸ”§ Core System
β”‚   β”œβ”€β”€ Unified Launcher - Multi-component orchestration
β”‚   β”œβ”€β”€ Message Bus - Redis-backed communication
β”‚   β”œβ”€β”€ Agent Hub - Enhanced skill execution
β”‚   └── Event Bus - Real-time event distribution
β”œβ”€β”€ πŸ’Ό HMS Dev Components  
β”‚   β”œβ”€β”€ Deal Management - Value-centric contracts
β”‚   β”œβ”€β”€ Watch Mode - HITL supervision
β”‚   β”œβ”€β”€ Metrics Collection - KPI tracking
β”‚   └── Configuration - Dynamic system tuning
β”œβ”€β”€ πŸ”Œ Integration Layer
β”‚   β”œβ”€β”€ Cross-component communication
β”‚   β”œβ”€β”€ State synchronization
β”‚   └── Event correlation
└── πŸ’» Interfaces
    β”œβ”€β”€ CLI Commands - System management
    β”œβ”€β”€ Web Dashboard - Real-time monitoring
    β”œβ”€β”€ REST API - Programmatic access
    └── Interactive TUI - Terminal interface

πŸ“š Command Reference

System Management

blax system start [options]      # Start HMS Dev system
blax system stop                 # Stop system gracefully  
blax system status               # Show component status

Deal Operations

blax deal create [options]       # Create collaborative deal
blax deal list [filters]         # List deals with filtering
blax deal show <dealId>          # Show detailed deal info
blax deal evaluate <dealId>      # Evaluate deal actions

Agent Monitoring

blax watch start                 # Launch interactive TUI
blax watch agents                # List active agents
blax watch control <id> <cmd>    # Send control commands

Metrics & Monitoring

blax metrics show                # Display system metrics
blax metrics alerts              # Show active alerts

Quick Start Scripts

npm run hms:start               # Start full system
npm run hms:watch               # Start watch mode
npm run hms:status              # Check system status

Legacy Commands (v1.x Compatibility)

blax                            # Interactive mode
blax ask "question"             # One-shot Q&A
blax agents list                # List agents
blax cloud status               # Cloud service status

πŸ”§ Configuration

Environment Variables

# Core system
export HMS_REDIS_URL="redis://localhost:6379"
export HMS_API_HOST="0.0.0.0"
export HMS_API_PORT="8080"

# Dashboard
export HMS_DASHBOARD_HOST="localhost" 
export HMS_DASHBOARD_PORT="8090"

# Development
export HMS_DEBUG="true"
export HMS_DEVELOPMENT_MODE="true"

# Legacy v1.x compatibility
export BLAX_API_URL="https://api.blax.ai"
export BLAX_HUB_URL="wss://api.blax.ai/hub"
export OPENAI_API_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"

Configuration Files

# hms-config.yaml
apiVersion: config.hms.dev/v1
kind: HMSConfig
metadata:
  name: production-config
spec:
  scope: global
  data:
    redis_url: "redis://production:6379"
    enable_dashboard: true
    dashboard_port: 8090
    metrics_retention_hours: 24

πŸ’» Programming Interface

TypeScript Integration

import { UnifiedLauncher, DealRegistry, DealEvaluator } from 'blax';

// Start system programmatically
const launcher = new UnifiedLauncher({
  redisUrl: 'redis://localhost:6379',
  enableDashboard: true,
  developmentMode: true
});

await launcher.start();

// Create and evaluate deals
const dealRegistry = new DealRegistry();
await dealRegistry.initialize();

const deal = await dealRegistry.createDeal({
  name: 'AI Integration Project',
  problem: 'Implement machine learning features',
  stakeholders: [
    { name: 'Product Team', role: 'client', votingWeight: 1.0 }
  ],
  financing: {
    totalBudget: 25000,
    currency: 'USD',
    fundingType: 'milestone'
  }
});

// Evaluate actions with binary recommendations
const evaluator = new DealEvaluator(dealRegistry);
const evaluation = await evaluator.evaluateDeal(deal.dealId, {
  actionId: 'ml_implementation',
  actionType: 'implementation',
  agentId: 'ai_specialist',
  estimatedDuration: 60,
  resourceCost: 8000,
  riskLevel: 0.4,
  confidence: 0.85
});

console.log(`Recommendation: ${evaluation.recommendation}`);
console.log(`Value Delta: ${evaluation.valueDelta}`);
console.log(`Reasoning: ${evaluation.reasoning}`);

Human-in-the-Loop Integration

import { ControlAwareAgent, MessageBus } from 'blax';

// Create supervision-enabled agent
const messageBus = new MessageBus({ redisUrl: 'redis://localhost:6379' });
await messageBus.connect();

const agent = new ControlAwareAgent('ai_agent', messageBus, {
  canPause: true,
  canEscalate: true,
  maxAutonomyLevel: 0.8,
  requiresApproval: ['database_changes', 'external_api_calls']
});

await agent.initialize();

// Handle human oversight events
agent.on('paused', ({ reason }) => {
  console.log(`⏸️ Agent paused: ${reason}`);
});

agent.on('escalated', ({ escalationRequest }) => {
  console.log(`🚨 Human intervention required: ${escalationRequest.reason}`);
});

// Self-escalate for complex decisions
await agent.selfEscalate('ML model selection requires domain expertise', 'high', 'advisory');

πŸš€ Deployment

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY dist/ ./dist/
COPY bin/ ./bin/
EXPOSE 8080 8090
CMD ["npm", "run", "hms:start"]

Docker Compose

version: '3.8'
services:
  blax-hms:
    build: .
    ports:
      - "8080:8080"
      - "8090:8090"
    environment:
      - HMS_REDIS_URL=redis://redis:6379
    depends_on:
      - redis
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: blax-hms
spec:
  replicas: 3
  selector:
    matchLabels:
      app: blax-hms
  template:
    spec:
      containers:
      - name: blax-hms
        image: blax:2.0.0
        ports:
        - containerPort: 8080
        - containerPort: 8090
        env:
        - name: HMS_REDIS_URL
          value: "redis://redis-service:6379"

πŸ“Š Key Metrics

Blax v2.0 tracks comprehensive metrics for operational excellence:

  • System Availability: 99.9% uptime target
  • API Response Time: <200ms for 95% of requests
  • Deal Success Rate: >90% successful collaborations
  • Agent Efficiency: >80% productive utilization
  • Error Rate: <1% system-wide errors
  • Human Intervention: Automated escalation workflows

πŸ”„ Migration from v1.x

Blax v2.0 maintains full backward compatibility:

# v1.x commands continue to work
blax interactive              # βœ… Still available
blax ask "What is TypeScript?" # βœ… Still available
blax agents list              # βœ… Still available

# New v2.0 features are additive
blax system start             # πŸ†• HMS Dev system
blax deal create              # πŸ†• Collaborative deals
blax watch start              # πŸ†• Real-time monitoring

Migration Steps

  1. Install Redis: brew install redis && brew services start redis
  2. Update Blax: npm install -g blax@2.0.0
  3. Verify: blax system status

See CHANGELOG.md for detailed migration guide.

πŸ› οΈ Development

Building from Source

git clone https://github.com/hms-dev/blax.git
cd blax
npm install
npm run build
npm test

Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open Pull Request

Development Workflow

npm run dev                   # Start development server
npm run typecheck            # Type checking
npm run lint                 # Code linting  
npm run test                 # Run tests
npm run test:coverage        # Coverage report

πŸ› Troubleshooting

Common Issues

System won't start:

# Check Redis connection
redis-cli ping

# Check port availability  
lsof -i :8080
lsof -i :8090

# Debug mode
blax system start --debug

High memory usage:

# Reduce event buffer
export HMS_WATCHDOG_MAX_EVENTS=1000

# Disable compression
export HMS_WATCHDOG_COMPRESS=false

Dashboard not accessible:

# Check component status
blax system status

# Try custom port
blax system start --dashboard-port 9090

Debug Mode

export HMS_DEBUG=true
export HMS_LOG_LEVEL=debug
blax system start --debug

πŸ“– Documentation

🀝 Support

πŸ“„ License

MIT License - see LICENSE file for details.


πŸŽ‰ What's Next

Blax v2.0 establishes the foundation for advanced multi-agent collaboration. Future releases will focus on:

  • Enhanced AI Integration - Advanced LLM coordination and decision-making
  • Extended Platform Support - Cloud deployments and managed services
  • Advanced Analytics - Machine learning-powered insights and optimization
  • Integration Ecosystem - Third-party tool and service connectors

Thank you for choosing Blax for your multi-agent collaboration needs! πŸš€


Ready to get started? Run npm install -g blax@2.0.0 and blax system start to experience the future of human-AI collaboration.


Powered by HMS-OPM Agency Ecosystem
203+ Professional Domain Agents | 197+ Industry Standards Compliance