JabberHive Protocol - Version 1


There are three types of components: servers, filters, and gateways.

Generally, servers handle requests, filters transform that pass through, and gateways generate the requests.

The number of connections accepted by (and initialized by) components may be higher than one. Refer to a component's manual to know how it embeds itself in the network.


Must accept at least one connection.

Those components are assumed to be the knowledge database. This is where the actual reply creation, and the learning, are done.


Must accept, and generate, at least one connection.


Must generate at least one connection. Gateways allow other communication protocols to communicate with the JabberHive network. Those are expected to be the main initiator of requests.

Inter-component Communication

All messages are text based. Messages structure is as follows:

+ TAG + ' ' + CONTENT + '\n' +

Any request leads to at least one reply. Indeed, each sequence of replies is terminated by either a "Positive" or a "Negative" reply.

A connection between two components is directional in the sense that only one of the two component makes requests and the other one gives replies.

Unless Pipelining is supported by the component to which requests are made, simultaneous requests on a connection are not permitted: the request making component must wait for its previous request to be completed before making a new one.

Exchanges should be considered as happening between two directly connected components, not from a gateway to a server through filters. Indeed, filters may generate any number of requests of their own to handle an incoming request, as long as it is transparent to the component that made said incoming request.

Even if there is no CONTENT, the TAG and '\n' are separated by a space. "Any string" includes empty string. Strings are not null terminated.


Request Protocol Version

Example(s): ?RPV 1,66,2910, ?RPV 1

Upon reception of one such message, one should start using the latest JabberHive protocol version listed in CONTENT that one can. If none are supported, a "Negative" reply is sent. Otherwise, a "Confirm Protocol Version" message is sent, followed by a "Positive" reply.

Request Pipelining Support

Example(s): ?RPS .

Asks the component if it supports handling simultaneous requests from the same connection. A "Confirm Pipelining Support" reply is returned, followed by a "Positive reply" (regardless of whether pipelining is supported or not).

Request Learn

Example(s): ?RL Anything the bot may have to learn., ?RL Other..

Requests the learning of CONTENT. Response is either a "Positive" message, or a "Negative" message.

Request Reply

Example(s): ?RR Generated replies will be based on this., ?RR hello.

Requests the generation of a reply to CONTENT. Response is be either a "Positive" message preceded by a "Generated Reply" message, or a "Negative" message.

Request Learn & Reply

Example(s): ?RLR Generated replies will be based on this., ?RLR Other..

Requests the learning of CONTENT, followed by the generation of a reply. Response is either a "Positive: message preceded by a "Generated Reply" message, or a "Negative" message.


Confirm Protocol Version

Example(s): !CPV 1, !CPV 29110.

Indicates the JabberHive protocol version that will henceforth be used.

Confirm Pipelining Support

Example(s): !CPS 0, !CPS 1.

Indicates that the component supports (if CONTENT is set to 1), or does not support (if CONTENT is set to 0) handling simultaneous requests from the same connection.

Generated Reply

Example(s): !GR I am not a robot., !GR hi dan..

This is a string that has been generated because of the previous request.

Additional Information

Example(s): !AI [E] Would overflow., !AI [W] Could not store data..

Allows the transmission of information for debugging purposes.


Example(s): !P

Previous request has been completed (no more messages related to it will be sent).


Example(s): !N

Previous request could not be completed (no more messages related to it will be sent).

Dealing With Unknown Tags

Component Request Reply
Server Reply !N N/A
Filter Propagate Propagate
Gateway N/A Discard