Its likely they have nest somewhere in the house. Sometimes the nest is located in an area of wet rotten wood, other times its located in some other location. Fascia boards behind gutters is popular spot.
There is bait product in a syringe that has worked well for me
https://www.seedworldusa.com/produc...MIm5fLluWj2gIVhR9pCh0yrgwkEAYYBCABEgIYmvD_BwE
The ants carry the bait back to the nest and then it kills the nest. I have tried the granules in the past and was far less successful. I dont like the granules as you are supposed to cover a "zone of death" around the home so the pet and ground exposure is high. The gel is applied in small quantities where the ants are present. I think its a "sweet bait" so you would need to keep it clear where a pet might try to lap it up or you need to get it down in crevice that is out of the weather. I put mine under a door sill. Psychologically you dont get much for $20 buck but it was far more effective than the granules for me.
Some folks advocate a home brew of boric acid and sugar but I have tried it a few times and never had any luck.
I had an earlier infestation under a front door sill where the builder didnt detail it right so I had some rot. I rarely saw ants there but saw plenty of them 20 feet away. Once I replaced the door and part of the sill, I dont see them. They also will tunnel and nest in foam insulation. I have 1" of foam on the exterior of my house and they tunneled up through it from ground level up under the clapboards. They are quite careful not to tunnel through the surface but the underlying foam was swiss cheese.
The annoying thing with carpenter ants is where they are swarming may not be that close to the nest. I had a nest in between my second floor and 1st floor several feet away from the outside walls. When I had an outside wall open during re insulating, I found a very distinct ant highway from under the outside clapboards through a gap in the plywood and then up the wall to the top plate and then presumably across the top of the ceiling to the nest.