New protocol version released: This page may contain outdated information.
Production Ready
Docker support, monitoring, security, and comprehensive testing
Multiple Transports
WebSocket, Server-Sent Events (SSE), and HTTP streaming support
Tool Integration
Dynamic tool registration and execution with built-in test tools
100% Test Coverage
93/93 tests passing with no async cleanup issues
Features
Core Protocol Support
- Complete HAIP Implementation - All message types and event handling
 - Multi-Transport Support - WebSocket, SSE, and HTTP streaming
 - Authentication - JWT token validation and session management
 - Flow Control - Credit-based flow control with adaptive adjustment
 - Error Handling - Comprehensive error codes and recovery
 
Production Features
- Docker Support - Containerized deployment with docker-compose
 - Health Monitoring - Real-time statistics and health checks
 - Security - Helmet.js, CORS, compression, and rate limiting
 - Logging - Structured logging with Morgan
 - Session Management - Per-client session tracking with cleanup
 
Tool Integration
- Dynamic Tool Registration - Register tools at runtime
 - Built-in Test Tools - Echo, add, and weather tools included
 - Tool Lifecycle - Call, update, complete, and cancel operations
 - Schema Validation - JSON Schema validation for tool inputs/outputs
 
Development Features
- TypeScript - Full type safety and IntelliSense support
 - Event System - Comprehensive event emission for all operations
 - Test Suite - 100% test coverage with Jest
 - Examples - Working examples for all major features
 
Architecture
The HAIP Server is built with a modular, event-driven architecture:Key Components
Server Core
- HAIPServer - Main server class extending EventEmitter
 - Session Management - Per-client session tracking with flow control
 - Message Routing - Route messages to appropriate handlers
 - Event System - Emit events for all server operations
 
Transport Layer
- WebSocket Server - Full-duplex communication
 - SSE Endpoint - Server-sent events for one-way streaming
 - HTTP Streaming - HTTP-based bidirectional streaming
 
Tool System
- Tool Registry - Dynamic tool registration and management
 - Tool Executor - Execute tools with progress updates
 - Schema Validation - Validate tool inputs and outputs
 
Monitoring
- Statistics - Real-time server statistics
 - Health Checks - 
/healthand/statsendpoints - Logging - Structured logging with different levels
 
Quick Start
Get started with the HAIP Server in minutes:- WebSocket: 
ws://localhost:8080/haip/websocket - SSE: 
http://localhost:8080/haip/sse - HTTP Streaming: 
http://localhost:8080/haip/stream - Health Check: 
http://localhost:8080/health - Statistics: 
http://localhost:8080/stats 
Docker Deployment
Deploy with Docker for production:Configuration
The server is highly configurable through environment variables or configuration objects:Built-in Tools
The server includes several built-in tools for testing and development:Echo Tool
Add Tool
Weather Tool
Testing
The server includes comprehensive tests:Next Steps
- Installation Guide - Set up the server
 - Quick Start - Get up and running quickly
 - Configuration - Configure the server
 - API Reference - Complete API documentation
 - Deployment - Deploy to production
 
Repository
- GitHub: https://github.com/haiprotocol/haip-server
 - NPM: 
@haip/server(available now) - Docker Hub: 
haip/server(future) 
Contributing
The HAIP Server is open source and welcomes contributions:- Fork the repository
 - Create a feature branch
 - Make your changes
 - Add tests for new features
 - Submit a pull request