Agamar system
The Agamar system, also known as the Mirgoshir system, was a star system that was home to the planet called Agamar, which itself was situated in the Outer Rim Territories. As the Clone Wars neared their end, a battle erupted over Agamar between the forces of the Galactic Republic and the Separatist Alliance, leading to the crash of a Separatist supply ship during the conflict.
Some years following the conclusion of that war, during the Galactic Civil War, Agamar became the location of an engagement involving rebel forces and a Separatist army of battle droids commanded by the super tactical droid known as General Kalani. During this clash, the rebels and the battle droids found themselves allied against the Galactic Empire, which had launched an assault on Agamar, ultimately forcing both factions to evacuate the planet.
Description
The Agamar system, which is also referred to as the Mirgoshir system, was a star system that was located in the Outer Rim Territories of the galaxy. Found along the Braxant Run at grid coordinates M-5 on the Standard Galactic Grid, the system included the planet of Agamar, which was inhabited by humans.
History
Clone Wars

During the Clone Wars fought between the Galactic Republic and the Confederacy of Independent Systems, after he was defeated during the civil war on Onderon, General Kalani, the super tactical droid, received orders to withdraw his remaining forces to Agamar, where they were to await further instructions. While in orbit aboard a DH-Omni Support Vessel, Kalani and his forces were engaged by Republic forces, leading to a crash landing on the planet's surface, where they remained stranded as the war approached its conclusion.
Later, following the deaths of the Separatist Council on Mustafar in 19 BBY, Kalani was given the order to deactivate himself and his droids. However, suspecting a Republic ploy, the droid refused to comply, leaving Kalani and his garrison of battle droids stranded on Agamar for several years.
Imperial Era

Seventeen years following the transition of the Galactic Republic into the Galactic Empire, during the [Galactic Civil War](/article/galactic_civil_war], a group of rebels belonging to Phoenix Cell embarked on a supply mission to Agamar, hoping to recover proton bombs. Rex, a former Clone Captain, along with the Spectres, landed on the planet and entered the wreckage of Kalani's Dual Hemisphere-Omni Support Vessel, where they were captured by the B1-series battle droids still under the command of the active super tactical droid.
Taken to the supply ship's command bridge, the rebels were greeted by Kalani, who explained that, despite the Clone Wars ending for most of the galaxy with the deactivation of the Separatist Droid Army, he and his droids remained active due to his refusal to follow the deactivation order. Consequently, he forced the rebels to participate in a combat simulation against his garrison in an attempt to secure a Separatist victory in the Clone Wars. However, the rebels overcame Kalani's waves of B1 battle droids and droidekas, returning to the command bridge, where Ezra Bridger, a Padawan, convinced both Rex and Kalani that the Clone Wars had resulted in a victory for neither the Republic nor the Separatists, but rather for the Empire.
During their discussion, the Empire, having intercepted a transmission from the C1-series astromech droid Chopper, dispatched an Imperial I-class Star Destroyer and two Gozanti-class cruisers, which deployed several squadrons of Imperial stormtroopers, two All Terrain Defense Pods, and two All Terrain Armored Transports. As a result, the rebels and Kalani formed an alliance against the Empire, destroying an AT-AT in the process, creating an opportunity for them to escape the planet aboard Sheathipede-class transport shuttles.
Behind the scenes
The Agamar system was first introduced into the new Star Wars canon with "The Last Battle," which was the sixth episode of the Star Wars Rebels' animated television series third season, and was broadcast on October 22, 2016. It was also identified as the Mirgoshir system in the first issue of the Star Wars Helmet Collection magazine, published in 2016. Originally, the system was introduced as the Mirgoshir system within the Star Wars Legends continuity, making its debut in The Farlander Papers, a 1993 strategy guide written by Rusel DeMaria for the Star Wars: X-Wing video game.