Programs with agents to solve problems