I wasn't sure what this was, but it flew into my room and spent much of its time at the window sill, trying to get out.
Thanks to Jason's tip, I found out that this little attractive bug is in fact, an emerald cockroach wasp/jewel wasp (Ampulex compressa). It is a solitary wasp belonging to the family Ampulicidae and is much known for its unusual reproductive behaviour involving stinging a cockroach and using it as a host for its larvae. It is therefore considered a entomophagous paraside, i.e. insects which are parasitic on other insects.
The Emerald Cockroach Wasp is mostly native to the Pacific islands and South East Asia, and it’s unique in that it is a brightly colored, solitary wasp with a complex, paralytic venom. It has a metallic blue-green body with red legs.
It is also unique in that is a master of the undead that utilizes intricate stings, poisons, and amputation to achieve mind control of another species in order to birth its babies within their still-living bodies.
When it comes time for the female wasp to lay her eggs, she finds a roach and stings it in a precise spot in the thoracic ganglion to reversibly paralyze its front legs, then stings it in the ganglia (brain) to disable the escape reflex. The cockroach will first groom extensively, and then become sluggish and fail to show normal escape responses. She then chews off half the roach’s antennae, and uses the stubs to lead the zombified roach around like a dog on a leash until they reach her burrow where she lays her eggs in its stomach, and buries it alive. The lobotomized roach then rests quietly while the baby inside of it hatches in 3 days, and proceeds to systematically eat the roach’s internal organs in a specific order that keeps it alive until the very end, at which point the new wasp finishes hollowing out the shell and emerges. While a number of venomous animals paralyze prey as live food for their young, Ampulex compressa is different in that it initially leaves the roach mobile and modifies its behavior in a unique way.
Here is an interesting article on the bug