The verbs accept and agree have different meanings. To express your willingness to do something, use agree with an infinitive. Accept is not possible in this case.
- She agreed to come. (= She expressed her willingness to come.) (NOT She accepted to come.)
- They agreed to part ways amicably. (NOT They accepted to part ways amicably.)
- My sister has agreed to look after my babies when I am away.
To accept is to take something which is offered because you believe that it is true, fair or right. In this case, accept is followed by a noun or a noun clause which acts as its object.
- She accepted the offer. (NOT She agreed the offer.)
- She said that she would accept the award with pleasure.
Accept can be followed by a noun clause or a that-clause.
- The majority of doctors accept that smoking can cause cancer. (= The majority of doctors recognize the fact that smoking can cause cancer.)