The answer depends both on the time period you want to consider and on the fields. Let me try to give a partial answer.
Generally speaking, agrégation is indeed a nationwide competitive exam designed to recruit high school and classes préparatoires teachers. For a long time students began preparing for it after 4 years of university study, as it required a maîtrise. Nowadays, presenting the agrégation requires a master's degree, but for most students the master would in fact coincide with the competitive exam preparation.
The majority of successful candidates will end up being teachers in high school, junior high or (for a few) classes préparatoires. In first approximation, the answer to your question is therefore "no": the agrégation is not primarily designed to select "TA".
However, having the agrégation is not neutral for "TA" positions. Nowadays, for PhD students, it is much easier to obtain a teaching job if you passed the agrégation, as you will be given priority over students who did not. Additionnally, in some fields (mostly humanities) it is a requirement to have agrégation before even beginning a PhD (I am pretty sure there is no official rule to that effect, but an extremely generalized practice). So in a way, yes, having the agrégation helps become a TA.
Some decades ago (since your question is about history), there was a faculty position called maître assistant, which seems to correspond pretty well to "TA" (the maître assistant was apparently in charge of making students work in small groups) and was indeed accessible with agrégation. This position no longer exists: it was merged within the "corps des maîtres de conférence", to enter which you need a PhD.
Finally, note that in law, political science, economics and management agrégation can play a role very different from what I describe above. As I understand, they are designed to recruit university professors, but I really do not know much about it.