omni-connector-sdk) is used by many built-in Omni connectors, including Google Workspace, Slack, Atlassian, IMAP, Nextcloud, Filesystem, Web, and Darwinbox. Use it when you want a native Rust connector with typed configuration, high-throughput sync logic, or direct reuse of Omni’s shared Rust models.
Installation
The Rust SDK is not published to crates.io. Connectors live in the Omni monorepo and depend on the SDK as a local path dependency. Create a connector underconnectors/ and add a Cargo.toml like:
The connector should be part of the Omni workspace so it is built, tested, and released with the matching SDK and shared model versions.
Server Startup
The SDK provides an Axum server with the standard connector endpoints and a registration loop that advertises the connector manifest to connector-manager every 30 seconds.Connector Trait
Implementomni_connector_sdk::Connector for your connector type.
Associated Types
Use
serde_json::Value for any associated type when you want to opt out of typed validation.
SyncContext
SyncContext is the connector’s handle back to connector-manager.
emit_event() buffers events. save_checkpoint() flushes buffered events before persisting the checkpoint so the checkpoint does not race ahead of emitted events.
Emitting Documents
Rust connectors emitConnectorEvent values directly.
DocumentUpdated; for removals, emit DocumentDeleted. For group-based permissions, emit GroupMembershipSync events.
Checkpoints and Resume
Usesave_checkpoint after batches or remote pages that are safe to resume past:
checkpoint argument to sync. ctx.is_resume() tells you whether the current run is a resume attempt after interruption.
Actions
Expose connector-specific actions by returningActionDefinition values and implementing execute_action.
Search Operators
Connectors can register inline search operators that map to document attributes.roadmap project:alpha in Search and Chat.
OAuth and MCP
Rust connectors can also expose:oauth_config()for Omni’s generic OAuth flow, including optional Dynamic Client Registration viaregistration_endpointand RFC 8707 resource indicatorsmcp_server()for stdio or Streamable HTTP MCP serversprepare_mcp_env()/prepare_mcp_headers()to inject credentials into MCP callsskills()for connector-owned skills that guide the Omni agent through connector-specific workflowsserve_with_extra_routes()for provider-specific callback/enrichment routes when the standard SDK routes are not enough
Testing
Rust connectors should use integration tests wherever possible. Existing Rust connector tests underconnectors/*/tests/ use testcontainers-backed ParadeDB, Redis, and connector-manager helpers from the repo’s shared test infrastructure.
Recommended coverage:
- Config and credential deserialization failures
- Full and incremental sync behavior
- Checkpoint/resume behavior
- Permission and group membership events
- Search operators and attributes
- Action success/failure cases
- Cancellation for long-running syncs
Reference Connectors
What’s Next
SDK Overview
Compare SDKs and connector lifecycle concepts
Connector Management
Learn how connector-manager schedules and monitors sources