A tag is a small integer that is present in every wire-stream primitive. The tag is the only means that the interpreter has to synchronize the wire-stream with its template. Tags are user defined for each term in each message of the wire-stream. It is important therefore, that they be chosen carefully and in such a way as to not introduce ambiguity.