system
Given the following post, respond as if you're commenting on Reddit:
human
How did the Jedi come to hold their position in the republic?

And is there an official title for their position? Enforcers? Peacekeepers?
gpt
The Jedi Order formed after the fracturing of their "parent" order, the Je'Daii Order. The Je'Daii were concerned with the balance of the Light Side and the Dark Side, and gave no particular credence to either. There were followers of both among the Je'Daii, and they mostly worked together. Eventually, though, disagreements arose and led to more and more problems. Finally, several hundred years before the formation of the Republic, the followers of Light and Dark, or Ashla and Bogan as they called it, split. There was a series of conflicts called the Force Wars, and the Bogan users were eventually defeated at the cost of the Je'Daii's home planet Tython. The Ashla followers then formed themselves into a new order led by a High Council, called the Jedi, and fled into Wild Space, hoping to avoid the new Republic that was forming.

The newborn Jedi Order colonized a planet named Ossus, founding an academy but mostly keeping themselves isolated from the rest of the Galaxy. They spent most of their time experimenting with Ashla. Sometimes Force users would find their way to the Jedi and would be welcomed, often being assimilated into the Jedi philosophy while enhancing it with their own traditions. They Jedi also took this time to enhance the Force-infused durasteel swords they used as ceremonial items and weapons while also improving upon the Je'Daii version of the lightsaber, making it more efficient and viable as a personal weapon.

By 25,000 BBY, the Jedi Order had elected to join the Republic, as they agreed with the Republic's general goal of galactic peace. This led to more visitors arriving on Ossus from around the Galaxy, and these visitors and their philosophies had a profound effect on the Jedi way of life. Most prominant were a group of Caamasi who preached the teachings of the Caamasi philosopher Hespecia Tik'kla. These Caamasi taught the Jedi Tik'kla's views on Justice, and these teachings paved the way towards the Jedi wanting to take a larger role in bringing about galactic justice and becoming peacekeepers.

It was around this time that the High Council started pushing harsher restrictions on the Jedi, leading one man named Xendor to peacefully break from the Jedi and form his own academy. Many Jedi who felt their individuality was being repressed by the High Council followed him. The High Council declared that these people who followed Xendor strayed dangerously close to Bogan, and formed an army with which to annihilate them. Xendor's followers, called the Legions of Lettow for the planet upon which Xendor's academy was formed, were forced into an open war. Xendor struck first with a preemptive attack, landing ships on Ossus. The Legions of Lettow were quickly repelled into the Core. Xendor then began spreading propaganda around the Republic, claiming the Jedi were not the peaceful monks they said they were. The Republic didn't believe Xendor, and rushed to the aid of the Jedi. Xendor himself was eventually killed in battle, and the Legions of Lettow fled into deep space. Over time, they were hunted to extinction.

After this brief alliance, the Jedi returned to their isolationist ways. This lasted up until the Tionese Wars, which took place around 24,000 BBY. The Tionese states formed a loose confederation to invade the Republic, which they saw as technologically superior but had almost no military capabilities. The Jedi found that the Tionese were building a large fleet, and warned the Republic. The Republic ignored the Jedi's warnings and were unprepared for the invasion. The Jedi, unable to dissuade the Tionese, returned to Ossus and contemplated the war, the Republic, and their place in it. Eventually they decided to enter as commanders into the Republic Army and help the Republic repel the Tionese. After the war was over, the Republic Army was disbanded but the Jedi set up a series of fortress worlds on the border of the Hutt and Tionese territories.

This cycle of isolationism, then aiding the Republic in a war, then back to isolationism but with slightly more respect for the Republic and more participation in galactic events. The biggest step for the integration of the Jedi occured when the Jedi decided to construct a large temple on Coruscant for the Jedi who directly aided Republic officials. The relationship between the two entities grew steadily from there, eventually resulting in the peacekeeper role they had in the Republic. The Republic then grew slow, corrupt, and sickly. The Jedi were so heavily intertwined with the Republic at this point that they were dragged down with it, and the two of them imploded with a nudge from Palpatine. If Luke Skywalker is even slightly intelligent, he'll return to the roots of the Jedi Order rather than what it turned into.