Search for pics of detritus worms, and planaria see if any of those match. Some worm things are beneficial to a properly functioning cycle in a pond (or tank). Some aren't.
A couple of things.
Those fish are too large to live for 4-6 months in a 29G tank.
As a future thought, next time if you have a pond, keep some aquarium filter pads in the filter area if you have one and if you don't use a plastic water plant basket (also can use a plastic filter basket which is used /sits in the water around the pump - for an evaporative cooler) under the circulating area where there is decent water flow to build and maintain a BB colony to change into your tank if that is how you winter them.
You need a 46G-55G tank for those guys and a much bigger filtration set up. 10x tank size per gallon turn over rate.
If your ammonia is 7 or 8 and dark green you need to get it down to under 1 - ideally .25 or less.
Lots of pwc
!!!!!!!!! Keep doing it till the ammonia level is low.
FW & SW
Favorite tank right now - 72G Bowfront Wadai Tetra, Cardinal Tetras, Ghost Glass Cat Kryptopterus bicirrhis and Clown Loach Cory haven
New to FW fish? First tank in a long time or EVER??? Need some info on keeping fish?
Start here - Aquarium Advice Article