Add New Connector
1. Fork the repository
Get the code and set up your development environment.
2. Create authentication schema
Define what credentials your source needs in backend/airweave/platform/configs/auth.py
.
3. Create source configuration
Define optional configuration options in backend/airweave/platform/configs/config.py
.
4. Define entity schemas
Create entity schemas in backend/airweave/platform/entities/your_source.py
that define the structure of the data in the source.
Key points about entities:
- Inherit from
ChunkEntity
for searchable content (documents, posts, issues) - Inherit from
FileEntity
for downloadable files (PDFs, images, attachments) - Use
Field(...)
for required fields,Field(default=...)
for optional ones - Add source-specific fields that are relevant for search and metadata
5. Implement source
Create your source connector in backend/airweave/platform/sources/your_source.py
.
Key implementation points:
- Import your custom entity classes
- Use the
@source()
decorator with your auth and config classes - Implement
create()
classmethod that handles credentials and config - Implement
generate_entities()
that yields your custom entity objects - Handle authentication based on your auth type
- Use config options to customize behavior
6. Test your source
Verify everything works by running Airweave and creating a test connection.
- Start Airweave: Your connector appears automatically in the dashboard
- Create a collection and add your new source
- Test the connection and verify data syncs correctly
- Search your data to confirm everything works end-to-end
File Structure
Your complete implementation will create files in these locations:
Notes
Be careful about what kind of authentication your app uses. Airweave supports many auth types including API keys, various OAuth2 flows, and database connections. Check your data source’s API documentation to determine the correct AuthType
to use in your @source()
decorator.
For OAuth2 sources, you’ll also need to add your integration to the dev.integrations.yaml
file.