Zekra
Menu · Zekra

Data sources

Load documents, web pages, GitHub repositories, SQL query results and webhook events into a Zekra brain with connectors.

A data source is a connector attached to one brain. When it syncs, it fetches documents from somewhere else, splits them into chunks of about 1,600 characters on paragraph and line boundaries, and retains each chunk into the brain. Each chunk goes through the normal retain pipeline: embedding, keyword indexing, secret detection and the write decision. Syncing the same content again is therefore cheap, because unchanged chunks resolve to noop.

You can manage data sources in the console (a brain's Sources tab), over the REST API, or with the MCP tools datasource_list, datasource_create, datasource_sync and datasource_delete.

Connector kinds

KindDirectionWhat it ingests
textpullInline text stored in the connector config
markdownpullInline markdown (handled the same way as text)
crawlerpullOne web page, fetched and reduced to text
githubpullText files from a GitHub repository tree
sqlpullThe rows returned by a SQL query, one document per row
webhookpushContent POSTed to Zekra by another system

text and markdown

KeyRequiredNotes
contentyesThe text to ingest
titleOptional title

crawler

KeyRequiredNotes
urlyesThe page to fetch

github

KeyDefaultNotes
reporequiredowner/name
branchthe repository's default branch, else main
pathrepository rootOnly files under this path
ext.mdOne suffix, or a list or comma-separated string (".go,.ts,.sql") to index source code
excludeExtra path substrings to skip. Directories such as node_modules, vendor and dist, lock files, minified and generated files are always skipped.
maxBytes60000Skip files larger than this
maxDocs500Maximum files per sync
fileDatesfalseDate each file by its last commit instead of the repository's last push (one extra API call per file)
tokenGitHub token, needed for private repositories

sql

KeyDefaultNotes
driverpgx (PostgreSQL)
dsnrequiredConnection string. Use a read-only database user.
queryrequiredEach returned row becomes one document, written as column: value lines
refColumnColumn used as each memory's sourceRef, so a memory can be traced to its row
titleColumnColumn used as the document title

A sync reads at most 5,000 rows. Each sync runs the whole query again, and the write decision skips rows that have not changed.

webhook

KeyNotes
secretShared secret that senders present in the X-Webhook-Secret header. Set it yourself when you create the source. If you omit it, Zekra generates one (whk_…), but secrets are masked in every API response, so you cannot read a generated secret back.

Webhook sources are push-only. Calling sync on one returns an error.

Secrets in connector configs

The config keys secret, token, password, apiKey and dsn are returned as •••• by every API response. The stored values are used only on the server.

Examples

Create a GitHub source and sync it:

sh

Index rows from a database:

json

Push events with a webhook:

sh

The ingest body takes content (required), sourceRef and metadata.

Source status

GET /api/brain/datasources?namespace= returns each source with status (idle, syncing, ok or error), lastError, docCount and lastSyncAt, plus the list of available kinds. Deleting a source keeps the memories it already ingested.