Research-Driven Agents: When an agent reads before it codes