You could be forgiven for getting the flying snake confused with the couatl, since they seem to come from the same source material. The easy way to think about it is that the flying snake is the cute, undomesticated wild version, while the couatl is the powerful, otherworldly, people-size version. Or, in Scholastic Aptitude Test format, couatl : flying snake :: angel : titi monkey.
Flying snakes, by and large, avoid combat. First, they’re unaligned, so they have no evil intent to drive them. Second, they’re very low in Strength. Usually, this indicates a preference for fighting in numbers, but snakes are predominantly solitary, not social. (Note that the Monster Manual contains no “Swarm of Flying Snakes” entry.) A flock or nest of flying snakes would be a rare thing, perhaps the result of control by some more powerful being with an affinity for reptiles.
Their Dexterity is exceptional, their Constitution merely average, and they have just 5 hp. If they attack at all, such as if a player character surprises it or stumbles across a nest of its eggs, it will be a shock strike: one hit, then fly away as fast as possible. They can do decent enough damage with this strike—their teeny fangs do just 1 point of puncture damage, but they deliver 3d4 points of toxic venom—to make them a legitimate threat to entry-level adventurers.
If a group of them are being controlled by a more powerful being, it can use them as a sort of aerial ranged weapon attack by having them hold station 20 to 30 feet up in the air between attacks, fly down to bite, then fly back up out of reach. Thanks to their Flyby feature, they don’t incur opportunity attacks when they fly out of their foes’ reach.
They also have a swimming speed, although they’re not amphibious, so rather than swimming through the water, they’re more likely slithering across the surface of it.
A flying snake under the control of another being will attack until that being tells it to stop attacking, so survival instincts don’t apply. A flying snake in control of itself will flee after just one strike—or before striking at all—and doesn’t need to wait until it’s injured, unless it’s guarding a nest of eggs. In that case, it flees after taking any hit that does 3 or 4 hp of damage. (Any more than that would kill it.)