The agreement comes as Treasury Secretary Timothy Geithner and Federal Reserve chief Ben Bernanke faced a grilling from lawmakers over government aid for the troubled American International Group.