Thank you for your interest in contributing to Airweave! This document provides guidelines and instructions for contributing to the project.
- Docker and Docker Compose
- Python 3.11+ (for backend development)
- Node.js 20+ (for frontend development)
- Cursor (recommended for optimal development experience)
As this is an open source project, we follow the fork and pull request workflow:
-
Fork the repository on GitHub
-
Clone your fork locally
git clone https://github.com/YOUR-USERNAME/airweave.git cd airweave -
Add the original repository as upstream
git remote add upstream https://github.com/airweave-ai/airweave.git
-
Create a new branch for your changes
git checkout -b feature/your-feature-name
-
Make your changes and commit them
-
Push to your fork
git push origin feature/your-feature-name
-
Open a pull request from your fork to the main repository
-
Setup pre-commit hooks
pip install pre-commit pre-commit install
-
Initial setup with Docker
./start.sh
-
For ongoing development, we recommend using VS Code with our provided launch configurations:
- Open the project in VS Code
- Use the "Run and Debug" view (Ctrl+Shift+D or Cmd+Shift+D)
- Select "FastAPI" configuration to run the backend
- Select "Debug React" for frontend development
- Use "FastAPI + ARQ Worker" compound launch for full stack development
These launch configurations are more efficient for development than repeatedly using
./start.sh.
Airweave is a monorepo with:
backend/: Python FastAPI applicationfrontend/: React/TypeScript application
- Backend: We use Ruff for linting and formatting Python code
- Frontend: We use ESLint and follow TypeScript best practices
- Pre-commit hooks will automatically check your code before committing
Adding a new source integration to Airweave is straightforward, especially when using the Cursor AI agent. Airweave's architecture makes it easy to connect to new data sources with minimal configuration.
Adding a source with Cursor should be pretty easy. Follow these steps to automate 95% of the work:
-
Read the documentation
- Review the Airweave documentation on extending connectors
- Examine existing source implementations like Slack (
backend/airweave/platform/sources/slack.pyandbackend/airweave/platform/entities/slack.py)
-
Add your API reference or OpenAPI spec to Cursor
- Find the API Reference of the source you'd like to integrate.
- Go to Cursor Settings > Features > Docs > + Add New Doc
- Add the API reference URL.
If you have an OpenAPI spec instead, simply add it to the folder.
-
Start Model Context Protocol Testing Server (Optional) You can allow Cursor to immediately test connections and synchronizations with your source if you allow it. In order to do this, you must do the following steps:
- Set
LOCAL_CURSOR_DEVELOPMENT=truein.env - Run the MCP server
python .cursor/mcp/sync_test/server.py - Navigate to Cursor Settings > MCP > Add New MCP Server
- Give a name, like "Run Sync Test Server", choose "SSE" and put in
http://localhost:8002/sseas URL.
Visit MCP README to read more info.
- Set
-
Explain your integration plan to Cursor Agent
- Describe what you want your Cursor Agent to do.
- Reference the newly added API reference or OpenAPI spec:
@your-docsor@your-openapi-spec - Also reference our Cursor rules with
@source-integration-rules.mdc
Example:
Write the source integration for Microsoft Teams with (@microsoft-teams-docs) and @source-integration-rules.mdc -
Let Cursor generate the integration code
- Cursor will help generate both the entity schemas and source connector code
- Review and refine the generated code as needed
-
Test your integration
- Use the MCP tools to test your connection and run a sync. Read the []
If you need help with your source integration, reach out to us on Discord.
A complete source integration consists of:
-
Entity Schemas (
backend/airweave/platform/entities/your_service.py)- Define the data structures for each entity type
- Extend from base classes like
BaseEntity,ChunkEntity, orFileEntity
-
Source Connector (
backend/airweave/platform/sources/your_service.py)- Implement authentication and API communication
- Create entity generators for each resource type
- Handle pagination, error retries, and file processing if needed
-
Ensure your fork is up to date with the upstream repository
git fetch upstream git merge upstream/main
-
Make your changes
-
Ensure all tests pass and linting checks pass
-
Submit a pull request to the main repository
-
Update the PR description with any relevant information
-
Respond to any feedback from maintainers
Follow conventional commit format for clear, consistent history:
type(scope): short summary
Optional longer description
Types: feat, fix, docs, style, refactor, test, chore
Example: feat(sources): add support for Notion API
- Backend: Run
pytestin the backend directory - Frontend: Run
npm testin the frontend directory - Use the "Pytest Debug" launch configuration in VS Code for debugging tests
- Update documentation when changing functionality
- Document new features, APIs, and configuration options
If you have any questions or need assistance, please:
- Open an issue for discussion
- Contact us directly!
Thank you for contributing to Airweave!