c889a57b6b
Test Suites / Build CI Environment (push) Has been cancelled
Test Suites / Basic Tests (push) Has been cancelled
Test Suites / End-to-End Tests (push) Has been cancelled
Test Suites / CLI Tests (push) Has been cancelled
Test Suites / Slow End-to-End Tests (push) Has been cancelled
Test Suites / Graph Database Tests (push) Has been cancelled
Test Suites / Vector DB Tests (push) Has been cancelled
Test Suites / Temporal Graph Test (push) Has been cancelled
Test Suites / Search Test on Different DBs (push) Has been cancelled
Test Suites / Example Tests (push) Has been cancelled
Test Suites / Notebook Tests (push) Has been cancelled
Test Suites / OS and Python Tests Ubuntu (push) Has been cancelled
Test Suites / OS and Python Tests Extended (push) Has been cancelled
Test Suites / LLM Test Suite (push) Has been cancelled
Test Suites / S3 File Storage Test (push) Has been cancelled
Test Suites / Run Integration Tests (push) Has been cancelled
Test Suites / MCP Tests (push) Has been cancelled
Test Suites / Docker Compose Test (push) Has been cancelled
Test Suites / Docker CI test (push) Has been cancelled
Test Suites / Relational DB Migration Tests (push) Has been cancelled
Test Suites / Distributed Cognee Test (push) Has been cancelled
Test Suites / DB Examples Tests (push) Has been cancelled
Test Suites / Test Completion Status (push) Has been cancelled
Test Suites / Claude Code Review (push) Has been cancelled
Test Suites / basic checks (push) Has been cancelled
build | Build and Push Cognee MCP Docker Image to dockerhub / docker-build-and-push (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
build | Build and Push Docker Image to dockerhub / docker-build-and-push (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Core Functionality (3.11) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Core Functionality (3.12) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges with Different Graph Databases (kuzu, kuzu) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges with Different Graph Databases (neo4j, neo4j) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Examples (push) Has been cancelled
Weighted Edges Tests / Code Quality for Weighted Edges (push) Has been cancelled
56 lines
2.2 KiB
Markdown
56 lines
2.2 KiB
Markdown
# Integrations Hub
|
|
|
|
First-class connectors that pull data from external sources into cognee memory.
|
|
|
|
Every connector here is built on cognee's **DLT ingestion subsystem**, so they
|
|
all share the same guarantees instead of each reinventing ingestion:
|
|
|
|
- **One call to ingest** — pass the connector's source to `cognee.remember(...)`.
|
|
- **Incremental re-sync** — `write_disposition="merge"` upserts by primary key;
|
|
re-running only pulls the delta.
|
|
- **Forget-on-source-deletion** — records deleted upstream are removed from the
|
|
graph + vector + relational stores via the shared `orphan_cleanup` path.
|
|
- **Optional, lazy dependencies** — install just the extra you need.
|
|
|
|
## Available connectors
|
|
|
|
| Source | Extra | Factory | Example | Notes |
|
|
|---|---|---|---|---|
|
|
| **Gmail** | `cognee[gmail]` | `cognee.tasks.ingestion.connectors.gmail_source` | [`demos/gmail_connector_example.py`](../demos/gmail_connector_example.py) | Messages/threads, label & query scoped. Incremental via `historyId`; trashed/deleted mail forgotten on next sync. OAuth2 (read-only). |
|
|
|
|
## Gmail quickstart
|
|
|
|
```bash
|
|
pip install "cognee[gmail]" # or: uv sync --extra gmail
|
|
```
|
|
|
|
```python
|
|
import cognee
|
|
from cognee.tasks.ingestion.connectors import gmail_source
|
|
|
|
await cognee.remember(
|
|
gmail_source(label_ids=["INBOX"], credentials_path="credentials.json"),
|
|
dataset_name="gmail_inbox",
|
|
primary_key="id",
|
|
write_disposition="merge",
|
|
max_rows_per_table=0, # 0 = no read cap, so forget-on-delete sees the whole inbox
|
|
)
|
|
|
|
answer = await cognee.search(
|
|
query_text="What did my manager ask me to do this week?",
|
|
datasets=["gmail_inbox"],
|
|
)
|
|
```
|
|
|
|
See the [example](../demos/gmail_connector_example.py) for OAuth setup,
|
|
incremental re-sync, and the privacy / opt-in notes.
|
|
|
|
## Adding a new connector
|
|
|
|
1. Create `cognee/tasks/ingestion/connectors/<source>.py` exposing a factory
|
|
that returns a `dlt` resource/source (`primary_key`, `write_disposition="merge"`,
|
|
and a `hard_delete` marker column for deletions). Keep the SDK import lazy.
|
|
2. Add a matching optional-dependency extra in `pyproject.toml`.
|
|
3. Add a runnable example under `examples/demos/` and a row to the table above.
|
|
4. Add mocked-SaaS + mocked-LLM tests (no live credentials in CI).
|