New protocol version released: This page may contain outdated information.
--verbose flag for debugging.
Global Options
All commands support these global options:-v, --verbose- Enable verbose output--help- Show command help--version- Show version information
Core Commands
haip version
Show version information.
haip info
Show system information.
haip examples
Show usage examples.
Connection Commands
haip connect <url>
Connect to a HAIP server and maintain an interactive connection.
Syntax:
url- Server URL (e.g.,ws://localhost:8080)
-t, --transport <type>- Transport type (websocket,sse,http-streaming)--token <token>- JWT authentication token--timeout <ms>- Connection timeout in milliseconds (default: 10000)--reconnect-attempts <count>- Maximum reconnection attempts (default: 3)--reconnect-delay <ms>- Base reconnection delay in milliseconds (default: 1000)-v, --verbose- Enable verbose output
- Establishes connection and maintains it until 
Ctrl+C - Shows connection status and statistics
 - Handles reconnection automatically
 - Displays real-time connection events
 
Send Commands
haip send
Send messages to a HAIP server.
haip send text <message>
Send a text message.
Syntax:
message- Text message to send
-u, --url <url>- Server URL (default:ws://localhost:8080)-t, --transport <type>- Transport type (default:websocket)--token <token>- JWT authentication token-c, --channel <channel>- Message channel (USER,AGENT,SYSTEM) (default:AGENT)--author <author>- Message author--run-id <id>- Run ID--thread-id <id>- Thread ID-v, --verbose- Enable verbose output
haip send tool <tool> [params...]
Call a tool with parameters.
Syntax:
tool- Tool name to callparams- Tool parameters inkey=valueformat
-u, --url <url>- Server URL (default:ws://localhost:8080)-t, --transport <type>- Transport type (default:websocket)--token <token>- JWT authentication token-c, --channel <channel>- Message channel (default:AGENT)--run-id <id>- Run ID--thread-id <id>- Thread ID-v, --verbose- Enable verbose output
haip send run
Start a new run.
Syntax:
-u, --url <url>- Server URL (default:ws://localhost:8080)-t, --transport <type>- Transport type (default:websocket)--token <token>- JWT authentication token--thread-id <id>- Thread ID--metadata <json>- Run metadata (JSON string)-v, --verbose- Enable verbose output
Monitor Commands
haip monitor
Monitor HAIP server events in real-time.
Syntax:
-u, --url <url>- Server URL (default:ws://localhost:8080)-t, --transport <type>- Transport type (default:websocket)--token <token>- JWT authentication token--show-timestamps- Show message timestamps--show-metadata- Show message metadata--filter-types <types>- Filter by message types (comma-separated)--filter-channels <channels>- Filter by channels (comma-separated)--max-lines <count>- Maximum lines to display--follow- Follow new messages-v, --verbose- Enable verbose output
HAI- Protocol handshakePING/PONG- Heartbeat messagesMESSAGE_START/PART/END- Text messagesAUDIO_CHUNK- Audio dataTOOL_CALL/UPDATE/DONE/CANCEL- Tool operationsRUN_STARTED/FINISHED/CANCEL- Run managementFLOW_UPDATE- Flow controlERROR- Error messages
USER- User messagesAGENT- Agent messagesSYSTEM- System messagesAUDIO_IN- Audio inputAUDIO_OUT- Audio output
Test Commands
haip test
Test HAIP server connectivity and performance.
Syntax:
-u, --url <url>- Server URL (default:ws://localhost:8080)-t, --transport <type>- Transport type (default:websocket)--token <token>- JWT authentication token--message-count <count>- Number of test messages to send (default: 100)--message-size <bytes>- Size of test messages in bytes (default: 1024)--delay <ms>- Delay between messages in milliseconds (default: 100)--timeout <ms>- Test timeout in milliseconds (default: 30000)--validate-responses- Validate server responses-v, --verbose- Enable verbose output
- Connection Time - Time to establish connection
 - Message Throughput - Messages per second
 - Latency - Average message round-trip time
 - Success Rate - Percentage of successful messages
 - Error Count - Number of failed messages
 - Total Duration - Total test duration
 
Health Commands
haip health
Check HAIP server health status.
Syntax:
-u, --url <url>- Server URL (default:http://localhost:8080)--timeout <ms>- Request timeout in milliseconds (default: 10000)--format <format>- Output format (text,json)
Command Combinations
Complete Testing Session
Debugging Session
Load Testing Session
Environment Variables
All commands respect these environment variables:Exit Codes
The CLI uses standard exit codes:0- Success1- General error2- Configuration error3- Connection error4- Protocol error5- Timeout error
Next Steps
- Configuration - Advanced configuration options
 - Examples - Usage examples and patterns
 - API Reference - Technical API documentation