She agreed with my idea.

Literal

She [topic-は] my idea [to-に] agreed.

同意する ('to consent / to agree') takes its target with the particle に — agreement is grammatically directed 'toward' an idea or proposal. The verb is more formal than 賛成する ('to be in favor of') or the casual そうだね ('right, you said it'); 同意 carries a slightly contractual or weighty tone, fitting decisions, opinions, or formal proposals. 考え here means 'idea / opinion / way of thinking,' not literally 'thought' — context determines which English word fits.