Add New Sources
Missing a connector for your favorite app or internal system? No problem! Airweave’s open-source architecture makes adding new sources straightforward - usually taking just a few minutes to get up and running.
🚀 Coming Soon: Connector SDK
We’re building a standalone Airweave CLI + Connector SDK that will make this even easier. For now, you’ll need to fork our repository, but the process is simple and well-documented.
Why Add Custom Sources?
Connect your internal databases, APIs, and custom applications to Airweave
Add connectors for apps we don’t support yet - and contribute back to the community
Create custom data processing and transformation logic for your specific needs
Step-by-Step Implementation
Here’s how to build a complete source connector, using the Studio Ghibli API as our example:
Create Authentication Schema
Define what credentials your source needs in backend/airweave/platform/configs/auth.py
.
Ghibli Example
Other Auth Types
Create Source Configuration
Define optional configuration options in backend/airweave/platform/configs/config.py
.
Ghibli Example
Common Patterns
Define Entity Schemas
Create entity schemas in backend/airweave/platform/entities/your_source.py
that define the structure of your data.
Ghibli Example
Common Patterns
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
Implement Your Source
Create your source connector in backend/airweave/platform/sources/your_source.py
.
Ghibli Example
Generic Template
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
Test Your Connector
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
🎉 Your custom source is live! Users can now connect to your data source just like any built-in connector.
Authentication Types
Choose the Right Auth Type
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.
OAuth2 Setup
For OAuth2 sources, you’ll also need to add your integration to the dev.integrations.yaml
file. Reach out to us for guidance on the OAuth2 flow setup.
File Structure
Your complete implementation will create files in these locations:
Real Examples
Learn from existing connectors in our open-source repository:
OAuth2 example - See how to handle complex authentication and data extraction
Database example - Learn how to connect to SQL databases and extract structured data
Contributing Back
🤝 Help the Community
Consider contributing your connector back to the main repository! File a PR and help other users benefit from your work.