Skip to main content
We welcome contributions from the community! Your input helps make Cognee better for everyone. This page outlines instructions and best practices for contributing to Cognee, ensuring your contributions are integrated into the project efficiently.

How To Contribute

There are many ways in which you can contribute to this project include: submitting bug reports and feature requests via GitHub issues, opening PRs with features, fixes, or tests, reviewing others’ PRs, and collaborating by commenting or answering questions in the Discord community.

Development Setup

Firstly, you will need to set up your local copy of the cognee code repository. Keep in mind that we have two different repositories: our core repo, which contains core cognee functionalities, and our community repo, which contains community-maintained add-ons and custom packages. Once you have chosen the repo you are going to work on, you have to fork it, and clone it to your machine:
git clone https://github.com/<your-github-username>/cognee.git
cd cognee
# OR
git clone https://github.com/<your-github-username>/cognee-community.git
cd cognee-community
After this, just create a branch for your work, and add your code there:
git checkout -b feature/your-feature-name

Development Guidelines

While working on new features and fixes, make sure to keep these guidelines in mind:
  • Code Style - Make sure to follow the PEP8 style guide, and also the style of the project codebase. Reuse as much of the code as possible, and follow the existing package and file hierarchy.
  • Tests - Make sure to add tests for new features, and that the tests pass before opening a PR
  • Commits - Write clear and concise commit messages

Linting and Formatting

Before creating a Pull Request, you need to make sure that your code is linted and formatted correctly. To do this, you first have to install ruff on your system. Ruff is part of the default dependencies, so you can install it via poetry in the root of the project, or through pip.
poetry install
# OR
pip install ruff

Submitting a Pull Request

After successfully linting and formatting your code, you can push your changes:
git add .
git commit -s -m "Description of your changes"
git push origin feature/your-feature-name
And now, create a Pull Request so your contribution can be reviewed, and eventually merged to the project repository:
  • Go to the repository you made changes for (i.e. the core repo or the community repo)
  • Click Compare & Pull Request and open a PR, being careful against which branch you open it (dev for core repo, main for community)
  • Fill in the PR template with details about your changes
After opening the PR, we will make sure to review it, and eventually your contribution will be a part of the Cognee project!