Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

Add contribution docs (#2294)

Dev Khant8b53b1473acc
diff --git a/docs/contributing/development.mdx b/docs/contributing/development.mdx
new file mode 100644
index 000000000..e65b20705
--- /dev/null
+++ b/docs/contributing/development.mdx
@@ -0,0 +1,87 @@
+---
+title: Development
+icon: "code"
+---
+
+# Development Contributions
+
+We strive to make contributions **easy, collaborative, and enjoyable**. Follow the steps below to ensure a smooth contribution process.
+
+## Submitting Your Contribution through PR
+
+To contribute, follow these steps:
+
+1. **Fork & Clone** the repository: [Mem0 on GitHub](https://github.com/mem0ai/mem0)
+2. **Create a Feature Branch**: Use a dedicated branch for your changes, e.g., `feature/my-new-feature`
+3. **Implement Changes**: If adding a feature or fixing a bug, ensure to:
+ - Write necessary **tests**
+ - Add **documentation, docstrings, and runnable examples**
+4. **Code Quality Checks**:
+ - Run **linting** to catch style issues
+ - Ensure **all tests pass**
+5. **Submit a Pull Request** πŸš€
+
+For detailed guidance on pull requests, refer to [GitHub's documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
+
+---
+
+## πŸ“¦ Dependency Management
+
+We use `poetry` as our package manager. Install it by following the [official instructions](https://python-poetry.org/docs/#installation).
+
+⚠️ **Do NOT use `pip` or `conda` for dependency management.** Instead, run:
+
+```bash
+make install_all
+
+# Activate virtual environment
+poetry shell
+```
+
+---
+
+## πŸ› οΈ Development Standards
+
+### βœ… Pre-commit Hooks
+
+Ensure `pre-commit` is installed before contributing:
+
+```bash
+pre-commit install
+```
+
+### πŸ” Linting with `ruff`
+
+Run the linter and fix any reported issues before submitting your PR:
+
+```bash
+make lint
+```
+
+### 🎨 Code Formatting with `black`
+
+To maintain a consistent code style, format your code using `black`:
+
+```bash
+make format
+```
+
+### πŸ§ͺ Testing with `pytest`
+
+Run tests to verify functionality before submitting your PR:
+
+```bash
+make test
+```
+
+πŸ’‘ **Note:** Some dependencies have been removed from Poetry to reduce package size. Run `make install_all` to install necessary dependencies before running tests.
+
+---
+
+## πŸš€ Release Process
+
+Currently, releases are handled manually. We aim for frequent releases, typically when new features or bug fixes are introduced.
+
+---
+
+Thank you for contributing to Mem0! πŸŽ‰
\ No newline at end of file
diff --git a/docs/contributing/documentation.mdx b/docs/contributing/documentation.mdx
new file mode 100644
index 000000000..33b445deb
--- /dev/null
+++ b/docs/contributing/documentation.mdx
@@ -0,0 +1,55 @@
+---
+title: Documentation
+icon: "book"
+---
+
+# Documentation Contributions
+
+## πŸ“Œ Prerequisites
+
+Before getting started, ensure you have **Node.js (version 23.6.0 or higher)** installed on your system.
+
+---
+
+## πŸš€ Setting Up Mintlify
+
+### Step 1: Install Mintlify
+
+Install Mintlify globally using your preferred package manager:
+
+<CodeGroup>
+
+```bash npm
+npm i -g mintlify
+```
+
+```bash yarn
+yarn global add mintlify
+```
+
+</CodeGroup>
+
+### Step 2: Run the Documentation Server
+
+Navigate to the `docs/` directory (where `docs.json` is located) and start the development server:
+
+```bash
+mintlify dev
+```
+
+The documentation website will be available at: [http://localhost:3000](http://localhost:3000).
+
+---
+
+## πŸ”§ Custom Ports
+
+By default, Mintlify runs on **port 3000**. To use a different port, add the `--port` flag:
+
+```bash
+mintlify dev --port 3333
+```
+
+---
+
+By following these steps, you can efficiently contribute to **Mem0's documentation**. Happy documenting! ✍️
+
diff --git a/docs/docs.json b/docs/docs.json
index 0c197d58c..54bcd16b7 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -155,6 +155,14 @@
]
}
]
+ },
+ {
+ "group": "Contribution",
+ "icon": "handshake",
+ "pages": [
+ "contributing/development",
+ "contributing/documentation"
+ ]
}
]
},