If you're close enough to witness this use of juveniles as sewing tools, some workers are probably going to be biting you, having caught your motion with their keen eyes, sensed the odors in your breath, or felt movement when you brushed a branch. When you're really close, an agitated throng coats the nearest plant parts like bristling fur, each ant lifting its body high on four legs, raising its gaster—the largest and hindmost segment of its body—up (sometimes vibrating it), a posture that signals excitement. The two front legs flail forward; they can hardly wait to grab you. The sharp-tipped, curving jaws are cocked open, poised to pincer, puncture, and inject some glandular concoction that adds extra hurt; it may make you woozy as the number of bites adds up.

Meanwhile the troops are spraying formic acid, which burns the nostrils like a whiff of ammonia. They're also releasing alarm pheromones, from that upraised rear end as well as those formidable jaws, while other workers race off to contact nest mates directly, establishing scent trails along the way to guide them toward the threat. Give the recruiters a few minutes, and thousands may be streaming in your direction. Don't linger. The population of some colonies exceeds half a million.

In one of the completed nests a queen, many times the size of typical workers (called majors and minors), is pumping out eggs. When the larvae hatch from the eggs, some of the workers feed and clean them and transport a portion of them to nurseries in other nests. Every so often a large batch of reproductive females and males is produced. They sprout wings and fly off to mate, and the fertilized females may start new colonies. The rest of the time, the queen's offspring all become nonbreeding females—a fierce sisterhood of near clones that patrol their colony's territory, search out and collect food, and grapple with any invader, no matter how big, no matter how deadly, in service to her majesty and the survival of the colony as a whole.

A queen may live years, the average worker maybe months, Moffett says, adding: "Any major that actually dies of old age hasn't been doing its job for the colony." Two of the scientists he worked with when he was a graduate student at Harvard University, leading ant experts Bert Hölldobler and Edward O. Wilson, found that the oldest workers end up in barrack nests near the front lines of a colony's territory; they're the most likely to encounter enemies and fall in battle. "A principal difference between human beings and ants," those researchers have written, "is that whereas we send our young men to war, they send their old ladies."

Somewhere off in the black rain forest night, Moffett is singing nonsense jingles interrupted by little squeaks and hmmms. It means he's trying to keep focused while being bitten. When I find him, he's peeling back silk-hemmed leaves to peer at the inner workings of a nest, and defenders are swarming his arms, sprinting toward his bare neck.

Mapping out colonies in an orchard at the forest's edge the following morning, we find one that encompasses 17 trees. "Compared with a continuous ground surface, treetops aren't able to support many heavy-bodied animals," Moffett says. "Plenty of territory to roam up there, but it's mainly leaves. So if you're a predator, the best way to control a large territory in the canopy is to be small yourself but abundant enough to reach all those little surfaces. Think of a colony as a single critter spreading itself through the trees as a thin film."

As predators, weaver ants hunt practically every kind of invertebrate big enough for a meal—and so effectively that the ants' territories become patches where many creatures can exist only at low populations, if at all. Chinese farmers noticed this 1,700 years ago and placed nests in orchards to safeguard fruit, making Oecophylla the oldest known form of bio­control. Lately ecologists have been promoting it in Africa as a safe, effective, and inexpensive alternative to pesticide sprays. The poorest farmer can run strings from a weaver ant nest to fruit trees, and legions of female warriors will tirelessly eliminate fruit flies, caterpillars, and other potential pests for free.

As soon as a major latches on to prey, another maneuvers to grab and pull a leg or antenna. Within moments, half a dozen or more majors will have the victim—be it soft-winged moth, scout from a foreign ant colony, or burly scorpion—spread-eagled, stretched beyond its limits, and about to be ripped apart. A couple more sisters gnaw at weak points to hasten the job. Holding the pieces aloft, workers join the river of ants flowing back toward a nest laden with prizes from other hunts. The heaviest chunks are carried by groups that somehow keep coordinated, even as some team members leave and new workers join in.

All the while, different platoons are out tending scale insects and other homopterans (sucking insects that feed on plant juices). The shepherds physically carry this livestock to prime pastures, guard the herds vigilantly from enemies, and gather special droplets of sugar-rich syrup, known as honeydew, that the bugs excrete. Like every bounty, it is then carried off to be shared with nest mates—added to the communal gut.

Even the stodgiest scientists are growing more comfortable with the notion of the ant colony as a superorganism. Moffett's musings lean further out. He keeps trying to explain to me how weaver ants operate in an Einsteinian universe where space bends and warps. Mentally shrink yourself to ant size and set out walking on a leaf. It's a two-dimensional plane, except that it curves and twists and after a while suddenly falls off into thin air. No matter, you just climb over the edge and keep walking on the underside, then wend your way down a stem to another curling green surface.

"Weaver ants weigh so little, they're scarcely affected by gravity," Moffett says. "The rocking of branches in the wind is a stronger force to them, so they often don't know which way is down. But if an ant wants to go from one tree to the next, there's a huge gap relative to its size. It might have to travel all the way to the ground, back up again, and then out on another branch. What Oecophylla often does, though, is get a bunch of buddies together to form an air bridge and cross directly to the other side."

Moffett may be the only person who perceives ants in Star Wars hyperspace, short-circuiting the usual rules of time and gravity. Still, the rest of us can look almost anywhere and see an ant crawling around and be reminded that nature has invented many ways for animals to be powerful and multitudes of ways for them to be smart.

Douglas H. Chadwick’s new book is The Wolverine Way; Mark W. Moffett’s is Adventures Among Ants. Both were published in 2010.