Why Build a Custom Connector?
While Omni includes connectors for popular platforms (Google Workspace, Slack, Atlassian, HubSpot), you may need to integrate:- Internal systems — Databases, wikis, or custom applications
- Niche SaaS tools — Industry-specific platforms not yet supported
- Proprietary data sources — File formats or APIs unique to your organization
- Legacy systems — Older systems with custom APIs
SDK Features
Both SDKs provide the same core capabilities:| Feature | Description |
|---|---|
| Connector Base Class | Abstract base with sync lifecycle management |
| Sync Context | Utilities for emitting documents and tracking progress |
| Content Storage | Store document content for indexing |
| SDK Client | Communication with the connector-manager service |
| HTTP Server | Built-in server exposing standard connector endpoints |
| Data Models | Type-safe models for documents, events, and metadata |
Available SDKs
Python SDK
Build connectors in Python with FastAPI
TypeScript SDK
Build connectors in TypeScript with Express
Choosing an SDK
| Choose Python if… | Choose TypeScript if… |
|---|---|
| Your team is experienced with Python | Your team prefers TypeScript/Node.js |
| The data source has a Python SDK | The data source has a JavaScript/TypeScript SDK |
| You’re prototyping quickly | You need strong type safety |
| You prefer FastAPI/async patterns | You prefer Express patterns |
Architecture
Custom connectors integrate with Omni through the connector-manager service:Connector Lifecycle
- connector-manager triggers a sync via HTTP
POST /sync - Your connector receives the request with source configuration and credentials
- Your connector fetches data from the external source
- Documents are emitted through the SDK, which sends them to connector-manager
- connector-manager queues events for the indexer
- Your connector reports completion or failure
HTTP Endpoints
The SDK automatically exposes these endpoints:| Endpoint | Method | Purpose |
|---|---|---|
/health | GET | Health check for container orchestration |
/manifest | GET | Returns connector metadata and capabilities |
/sync | POST | Triggers a sync operation |
/cancel | POST | Cancels a running sync |
/action | POST | Executes connector-specific actions |
Quick Start Example
Here’s a minimal connector implementation in Python:Environment Variables
All SDK-based connectors require:| Variable | Required | Description |
|---|---|---|
CONNECTOR_MANAGER_URL | Yes | URL of the connector-manager service |
PORT | No | HTTP server port (default: 8000) |
DATABASE_URL | Conditional | PostgreSQL connection string |
DATABASE_HOST,DATABASE_PORT,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME
Example Connectors
Both SDKs include an RSS connector example that demonstrates:- Fetching data from an external API
- Parsing and transforming content
- Emitting documents with metadata
- Implementing incremental sync
- Handling errors and cancellation
- Implementing custom actions
Deploying Your Connector
Docker Deployment
Create a Dockerfile for your connector:docker-compose.override.yml: