Tutorial: Github Content Manager Agent
This Agent is designed to help you manage your GitHub repository content. The capabilities include retrieving the content of a repository, including specific files like README.md
. It can also create and update file content. The aim is to help you navigate and handle your GitHub repositories with ease.
GitHub Access Tokens
- Navigate to
.
- In the upper-right corner of the page, click your profile photo.

- Then, click
Settings
.

- In the left sidebar, scroll down then click
Developer settings
.

- In the left sidebar, click
Personal tokens
then clickGenerate New Token (classic)
.

- Add a note to your
Token
, set the expiration, and then checkmark the scopes.

- Then, click the
Generate Token
button.

- Make sure to copy your personal access token because you won’t be able to see it again.
- Example:
ghp_wtOAM5BSYSCgnTN5elXEUAerngae4P3pqFmc
- Example:

GitHub Repository Owner & Name
You can skip this step if you already have your Repositories.
- In the upper-right corner of the
GitHub
page, click your profile photo.

- Then, click
Settings
.

- In the left sidebar, go to
Code, Planning, and Automation
then clickRepositories
.

- Click
create one
.

- The owner’s name will be automatically created, you only need to input your repository name.
- Example:
- Repository Owner:
janicesmyth
- Repository Name:
SmythOS-GitHub-Manager
- Repository Owner:
- Example:

- Then, click the
Create Repository
button.

Agent Setup
- In SmythOS, navigate to the Templates tab.

- You can scroll down to find the
GitHub Content Manager
or simply search for it in the Search tab, then click theRemix
button.

- Allow the template to initialize and configure.
GitHub Integrations Setup
- In
SmythOS
, look forGitHub
integration components. This agent utilized fiveGitHub
component integrations. Click the gear icon to open the settings.

- Click the key icon and select your
GitHub Access Token
stored in your vault. Remember to click the check mark to save your configuration. -
Note: Click here to learn more about adding your API keys to the vault.

- You’re all set!
Test the Agent
Open the ChatBot embodiment and click on the chat icon.

Note: GitHub handles the file content encoded in base64.
Create a New file
- Sample Prompt:
- Create a new file in SmythOS-GitHub-Manager with the following:
- File content: aGVsbG8=
- Path: text11.txt
- Commit message: agent message
- Name: janice
- Email: janice@inkco.co
Note: The file content is
hello
.

- The agent will verify that the file has been successfully created in your GitHub repository.

- You can review your GitHub account to find the newly created file.

Update File Content
- Sample Prompt:
- Update the file content in SmythOS-GitHub-Manager with the following information:
- File content: dXBkYXRlIHN1Y2Nlc3NmdWw=
- Path: text11.txt
- Commit message: agent message
- Name: janice
- Email: janice@inkco.co
Note: The file content is
update successful
.

- The agent will verify that the file has been successfully updated in your GitHub repository.

- The file content before the update was
hello
.

- Following the update, here is the result.

Get Repository Content
- Sample Prompt:
- Get repository content from text11.txt

- Here’s the result.

- Since the content is in base64, the agent is equipped to decode it for your convenience. Just type, Yes.

- Here’s the result.

Get all Repository Content
- Sample Prompt:
- Get all repository content.

- In GitHub, these are the current contents.

- Here’s the result from the agent.

Get ReadMe
- Sample Prompt:
- Get READ ME file.

- Here’s the result.

