Git Sync
Keep engineers in the loop
Triggering a Sync
You can trigger a sync by clicking the sync button in the studio header, or on the project home page. This will kick off a process that will:
- Get the state of the prompts from the studio database
- Get the state of the prompts from the connected GitHub repository
- Compare the two states
- Determine actions to take (create, update, delete)
- Apply those actions to the connected GitHub repository or the studio database
Viewing sync history
You can view the sync history by clicking the "Events" link in the studio navigation. Here you can see the status of any syncs that have been triggered, and when clicking on an event you can see the details. The details include in which direction the sync was ran, the diff of the changes, and a link to the GitHub PR.
Making changes in your GitHub repository
You can make changes to your GitHub repository by editing the files in the repository. Once you have pushed your changes, a sync is automatically triggered. Make sure to create your files in the correct directory structure to ensure they are properly synced to the studio. You can view the status of your sync by clicking the "Events" link in the studio navigation.
Note about publishing
When pushing changes to your GitHub repository, Agentsmith will create prompts that do not exist in the studio database. Agentsmith will publish those prompts ONLY if the push was made to the default branch of your repository. Otherwise, all prompt versions will be in DRAFT status. This is to prevent you from accidentally publishing changes to your prompts in a non-default branch.