Skip to main content
Unsupported HAIP 1 archive. This is historical chat and streaming documentation, not the HAIP 2 review protocol. Its APIs, package examples and security advice must not be used for a HAIP 2 deployment. Start with the current HAIP 2 guides.

Overview

HAIP supports both text and audio messaging with streaming capabilities, allowing for real-time, multi-modal conversations between users and agents.

Text Messaging

Text messages in HAIP are streamed in chunks to support real-time typing indicators and progressive rendering.

Message Flow

Sending Text Messages

Receiving Text Messages

Audio Messaging

Audio messages support real-time streaming with binary data for efficient transmission.

Audio Formats

HAIP supports various audio formats:

Sending Audio Messages

Receiving Audio Messages

Message Sequencing

HAIP uses sequence numbers to ensure message ordering and handle out-of-order delivery.

Sequence Management

Message Channels

HAIP supports multiple channels for different types of communication.

Channel Types

Channel Management

Best Practices

Chunking

Break large messages into smaller chunks for better streaming and user experience.

Buffering

Implement proper buffering for audio messages to handle network jitter.

Error Recovery

Automatic recovery from message corruption and network interruptions.

Performance

Use binary frames for audio data and compress text when appropriate.