What You’ll Build
A complete source connector consists of:- Authentication schema - Define credentials needed to connect
- Configuration schema - Optional settings for the connector
- Entity schemas - Data structures for each entity type
- Source implementation - The connector logic that fetches and yields entities
Before starting, review the Contributing Overview to set up your development environment.
Prerequisites
- Airweave development environment set up
- API documentation for the service you’re integrating
- Test account or credentials for the service
- Basic understanding of Python async/await patterns
Step-by-Step Guide
Plan your connector
Before writing code, understand:Authentication type:
- OAuth2 (browser flow, token-only, or with refresh)
- API Key
- Username/Password
- Database connection
- What entities will you sync? (e.g., files, messages, issues)
- What metadata is important? (title, author, timestamps)
- Are there hierarchies? (workspaces → projects → tasks)
- Rate limits
- Pagination approach
- File size limits
Create configuration schema
Define optional settings in Common configuration patterns:
backend/airweave/platform/configs/config.py:- Workspace/project filters
- Date ranges for incremental sync
- Entity type selections
- File type filters
Define entity schemas
Create entity definitions in Entity Base Classes:AirweaveField Parameters:
backend/airweave/platform/entities/myapp.py:embeddable=True- Include in vector embeddingsis_entity_id=True- Use as unique identifieris_name=True- Use as display nameis_created_at=True- Creation timestampis_updated_at=True- Last modified timestampunhashable=True- Exclude from change detection
Implement the source connector
Create your connector in Key Implementation Points:
backend/airweave/platform/sources/myapp.py:- Use
@sourcedecorator with metadata - Implement
create()classmethod for initialization - Implement
validate()to test connection - Implement
generate_entities()as async generator - Handle pagination properly
- Use structured logging with
self.logger
Add OAuth support (if needed)
For OAuth sources, additional configuration is required:1. Update the @source decorator:2. Add integration to 3. Update create() method:4. Use token manager for API calls:
dev.integrations.yaml:Test your connector
1. Manual testing in the UI:Start Airweave and create a test collection:Navigate to http://localhost:3000, create a collection, and add your new source.2. Unit testing:Create tests in 3. Integration testing with Monke:See the Monke README for end-to-end testing.
backend/tests/sources/test_myapp.py:Advanced Patterns
Hierarchical Entities with Breadcrumbs
For nested structures (workspaces → projects → tasks):File Downloads
For sources that include files:Access Control
For sources with entity-level permissions:Real-World Examples
Study these existing connectors for reference:Slack
Federated search example
- No sync, search at query time
- OAuth with token refresh
- Rate limiting with retry
sources/slack.pyNotion
Complex hierarchy example
- Pages, databases, properties
- Breadcrumb navigation
- Lazy loading with semaphores
sources/notion.pyGitHub
File-based connector
- Repository files and issues
- Direct authentication
- Branch filtering
sources/github.pyAsana
Task management example
- Projects, tasks, attachments
- OAuth integration
- Workspace filtering
sources/asana.pySubmitting Your Connector
Once your connector is complete:-
Run all checks:
- Test end-to-end in the Airweave UI
- Update documentation if needed
- Submit a pull request following the Contributing Guidelines
Include in your PR description:
- Link to API documentation
- Test account setup instructions (if needed)
- Screenshots of successful sync
- Any special considerations
Getting Help
Stuck? We’re here to help:Discord Community
Get real-time help from maintainers and contributors
Example Connectors
Browse existing connectors for reference