The two chased down and bit a man accused of stabbing one of his former colleagues on the roadside in what police describe as a "revenge attack".
Locals were then able to catch the man, identified as R Raghunath.
The victim is currently receiving treatment for abdominal injuries.
Police say Mr Raghunath attacked the woman because he had lost his job after she accused him of sexual harassment.
"When they bit him, he could not run because his focus was on the dogs. That is when I and other members of the public got hold of him until the police came and took him away,'' S Raman, a rickshaw driver who takes care of the dogs, told BBC Hindi's Imran Qureshi.
Mr Raman said that the dogs, both of whom are named "puppy", chased the man after the victim, who was stabbed in the stomach, started screaming.
Natasha Chandy, a Bangalore-based Canine Counsellor, told BBC Hindi that the dogs' behaviour was not surprising.
"Dogs on the streets are highly instinctive. They can sense stress and read body language very well. In this case, the dogs may have sensed something wrong, especially if the lady screamed when she was stabbed,'' she said.
She added that it was also not unusual for dogs to go to the rescue of those who are hurt. But, she said that it was also highly likely that the animals' "chase instinct" kicked in because the man ran away.