It is not known when Jiang Gongfu was born, but it is known that his family was from Ai Prefecture, although the family claimed to be originally from Tianshui. Jiang Gongfu's grandfather Jiang Shenyi served as a prefectural prefect, but his father Jiang Ting was not listed with any official titles. He had at least one younger brother, Jiang Fu. After Jiang Gongfu passed the imperial examinations he was made Xiaoshulang, an editor at the Palace Library. After he passed a special examination on policy proposals, he was made Zuo Shiyi, an advisor at the examination bureau of government, and he was also made an imperial scholar at Hanlin Pavilion. After more than a year, when he was to be given a different office, he submitted a petition, citing the poverty of his household and the agedness of his mother, requesting to be also made the census officer under the mayor of Jingzhao Municipality, because the census officer, while a low-level position, had a high salary, and his petition was granted. He was said to be capable and sensible, and whenever he met Emperor Dezong to make suggestions, Emperor Dezong often followed his suggestions. In 783, with Emperor Dezong waging wars against several warlords in the east, the soldiers from Jingyuan Circuit, were at Chang'an to await deployment to the east. They were angered that they were not given rewards that they felt they deserved, and they mutinied. Emperor Dezong sent his son Li Yi the Prince of Pu and Jiang to try to calm the soldiers, but the soldiers merely got angrier, and Emperor Dezong, in panic, decided to flee Chang'an. As he was ready to do so, Jiang tried to warn him about the dangers of leaving the senior generalZhu Ci in the city – as Emperor Dezong had removed Zhu Ci from his command in 782 due to his brother Zhu Tao's rebelling against imperial authority – and had served as the military governor of Jingyuan Circuit before, and therefore might receive the Jingyuan soldiers' support. He suggested to Emperor Dezong that either he should kill Zhu Ci before leaving or ask Zhu to accompany him. Emperor Dezong, in panic, could not carry out either action, and left Zhu in the city. Emperor Dezong fled to Fengtian, and Jiang followed him there. Emperor Dezong issued emergency edicts seeking aid from the nearby circuits. Meanwhile, the Jingyuan soldiers did as Jiang predicted and supported Zhu as their leader. Zhu initially claimed that he was merely calming the situation at Chang'an and was ready to welcome Emperor Dezong back to Chang'an, but soon there were rumors that Zhu was planning to claim imperial title himself and attack Emperor Dezong at Fengtian. In light of this, some officials who had fled to Fengtian suggested that Fengtian's defenses be shored up, but the chancellor Lu Qi, misjudging the situation, argued to Emperor Dezong that Zhu would surely remain faithful to Tang and advocated taking no precautions at all and stopping the incoming aid troops. It was only at Jiang's advice Emperor Dezong continued to receive the aid troops into Fengtian. At suggestion of Lu and Bai Zhizhen the commander of the imperial guards, Emperor Dezong sent his granduncle Wu Xu to Chang'an to communicate with Zhu. Zhu initially welcomed Wu as an honored imperial emissary, but soon put Wu to death. He declared himself emperor of a new state of Qin. He put Fengtian under siege, and during the siege, Emperor Dezong made Jiang Jianyi Daifu, a high-level advisor at the examination bureau, and gave him the designationTong Zhongshu Menxia Pingzhangshi, making him a chancellor de facto.
During chancellorship
In 784, because the general Li Huaiguang also rebelled, Emperor Dezong fled further to Liang Prefecture, and Jiang Gongfu accompanied him. On the way to Liang Prefecture, Emperor Dezong's oldest daughter Princess Tang'an died at Chenggu. After Emperor Dezong reached Liang Prefecture, he wanted to build a pagoda for Princess Tang'an and bury her with great wealth. Jiang submitted a petition stating: Emperor Dezong became angry and wanted to remove Jiang. Despite the intercession of Emperor Dezong's trusted advisor Lu Zhi, Emperor Dezong soon removed Jiang and made him a member of the staff of his crown princeLi Song.
After chancellorship
Jiang Gongfu's mother soon died, and he left governmental service to observe a period of mourning for her. After the period of mourning, he was returned to Li Song's staff, but went a long time without being promoted. By 792, Lu Zhi was a chancellor. Because he and Lu Zhi were colleagues while they were imperial scholars, Jiang met Lu to request his help. Lu secretly responded: In fear, Jiang offered to resign and asked to become a Taoist monk. When Emperor Dezong inquired as to the reason and found out that he was fearful, he did not dare to state that Lu had told him this information, and instead claimed that Dou told him the information. Angry that his words had been leaked, Emperor Dezong demoted Jiang to be the secretary general of Quan Prefecture, and sent imperial eunuch messengers to Dou, in exile, to rebuke him. After Emperor Dezong died in 805 and was succeeded by Li Song, Jiang was slightly promoted, to be the prefect of Ji Prefecture. He soon died, and was posthumously honored by Emperor Shunzong's son and successor Emperor Xianzong.