Skip to main content
Version: v0.8.3

External Data Sources

Bind external platforms โ€” Feishu Wiki, Feishu Drive, Yuque, or RSS โ€” to a knowledge space. Documents from those platforms are pulled automatically (chunked, embedded, searchable) and kept in sync on a schedule you choose.

Knowledge base list with Wiki-enabled spaces

Screenshots in this guide use the English UI; ไธญๆ–‡็•Œ้ข๏ผˆSetting โ†’ Language๏ผ‰ๅธƒๅฑ€ไธ€่‡ดใ€‚

Supported sourcesโ€‹

SourceWhat it syncsCredentials
Feishu WikiWiki spaces โ†’ docx documents (blocks โ†’ Markdown), sheet/bitable linksApp ID + App Secret
Feishu DriveDrive folders โ†’ docx files, other types as reference linksApp ID + App Secret
YuquePersonal + team repos โ†’ documents (body as Markdown)Personal Token
RSS / AtomFeed entries โ†’ MarkdownFeed URL

Notion is coming soon (the card is already in the picker and will light up once the connector ships).

Binding a sourceโ€‹

Step 1 โ€” Create or open a knowledge spaceโ€‹

You can bind a source in two places:

  • During space creation โ€” pick a binding-style card (Feishu Wiki / Yuque Wiki / RSS). After the space is created, the binding wizard opens inline and pre-selects the connector for you.
  • On the space detail page โ†’ Sources tab โ€” click Bind external data source.

Create wizard with datasource cards

Step 2 โ€” Choose the connector typeโ€‹

The wizard walks through four steps. Pick the platform first (when entering from space creation this step is already answered and skipped).

Binding wizard โ€” choose type

Step 3 โ€” Configure credentialsโ€‹

Credentials are validated against the platform before anything is saved, then stored AES-256-GCM encrypted in the metadata DB.

Step 4 โ€” Pick the scopeโ€‹

The resource tree loads lazily from the platform (e.g. Feishu wiki spaces โ†’ node trees, Yuque personal/team repos). Check what you want to sync โ€” rows never expose raw URLs.

Step 5 โ€” Choose the sync strategyโ€‹

FieldMeaning
Sync scheduleManual only, every 15/60/1440 minutes
Sync modeIncremental (cursor-based, only changed items) or Full
Conflict strategyOverwrite (update + re-chunk) or Skip unchanged
Sync deletionsWhen ON, items removed at the source are deleted locally (full passes only)

Click Finish โ€” the first fetch runs immediately and a toast reports created/updated counts. Documents appear in File View; if the space also has the Wiki index method enabled, wiki pages regenerate automatically.

Managing bindingsโ€‹

Sources tab with a binding card

Each binding card shows live status (active / paused / running / error), the last sync time, and its error message. Available actions:

  • Sync now โ€” manual full/incremental run
  • Pause / Resume โ€” stops or resumes scheduled runs
  • Sync logs โ€” the last 50 runs with created/updated/skipped/failed/deleted counts
  • Delete โ€” unbind (synced documents are kept)

Troubleshootingโ€‹

SymptomFix
knowledge source encrypt key not configuredSince v0.7 the key is auto-provisioned; only pin DB_GPT_KS_ENCRYPT_KEY (or [rag.knowledge_source] encrypt_key) if you want DBA-level confidentiality for credentials
Yuque HTTP 429Rate-limited โ€” retry in 1โ€“2 minutes; consistent 429 means the token is throttled or shared by another script. Rotate the token
CERTIFICATE_VERIFY_FAILEDA corporate proxy intercepts TLS. Set DB_GPT_KS_CA_BUNDLE to the corporate root CA (or temporarily DB_GPT_KS_INSECURE=1) and restart
Errno 8 nodename nor servnameDNS failure โ€” check the server host's network/proxy
Feishu invalid app_id/secretCreate an enterprise self-built app with wiki:wiki:readonly, docx:document:readonly, drive:export:readonly scopes and publish it

Community connectorsโ€‹

New platforms follow a small contract: BaseKnowledgeSourceConnector with validate / list_resources / fetch_all / fetch_incremental methods and a ConnectorMeta that renders the credential form automatically.

[project.entry-points."dbgpt.knowledge_sources"]
my_source = "my_pkg.connector:MyConnector"

After pip install, restart DB-GPT โ€” the connector shows up in the wizard with zero frontend code. See the full developer guide: docs/design/datasource-connector-dev-guide.md.