> For the complete documentation index, see [llms.txt](https://aiflow-2.gitbook.io/aiflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aiflow-2.gitbook.io/aiflow/getting-started-with-aiflow/creating-a-new-ai-agent.md).

# Creating a New AI Agent

## Creating a New AI Agent

* **Set Up Your Repository**

  1. Create a new repository on GitHub (public or private).
  2. Clone the official AIFlow repository to your local machine:

  `git clone https://github.com/YourUsername/aiflow.git[folder_name]`&#x20;

&#x20;   `cd [folder_name]`&#x20;

* **Configure Remotes**

  1. Add your new repository as the origin remote.
  2. Add the AIFlow repository as the upstream remote.

  `git remote set-url origin https://github.com/AIFlowwork/YourNewRepo.git`&#x20;

&#x20;   `git remote add upstream https://github.com/AIFlowwork/aiflow.git`

* **Create a Character File**

  1. In the `characters/` folder, create a new JSON file (e.g., `my_character.json`).
  2. Use the following template to define your character (adjust fields based on your needs):

  &#x20;`{ "name": "YourCharacterName", "description": "Brief character description", "personality_traits": ["trait1", "trait2"], "twitter_username": "@YourTwitterHandle" }`
* **Set Environment Variables**

  1. Rename `.env.example` to `.env`, and fill in the required values.

  &#x20; `CHARACTER_NAME_ID=your_character_name`
* **Push Changes**

  1. Rename `.gitignore.example` to `.gitignore` if necessary.
  2. Push your changes to your new repository:

  `git push -u origin main`
* **Sync Updates**

  1. Keep your repository up to date by fetching updates from the AIFlow upstream:

  &#x20; `git fetch upstream`&#x20;

&#x20;   `git merge upstream/main`
