CognitiveVault Integration
Ingestible integrates with CognitiveVault for bi-directional knowledge synchronization. Documents ingested by Ingestible can be pushed to CognitiveVault as structured entries, and edits made in CognitiveVault are synced back to update the local chunks.
Export to CognitiveVault
Push ingested documents to a CognitiveVault instance:
# Export a specific document
ingest export-cv my-document \
--cv-url https://cv.example.com \
--cv-api-key cvk_... \
--cv-vault-id vault-abc
# Export all documents
ingest export-cv \
--cv-url https://cv.example.com \
--cv-api-key cvk_... \
--cv-vault-id vault-abc
# Clean up removed entries
ingest export-cv --delete-removed \
--cv-url https://cv.example.com \
--cv-api-key cvk_... \
--cv-vault-id vault-abc
Each chunk becomes a CognitiveVault entry with a sourcePath of ingest:{doc_id}/{chunk_id}. The export is idempotent — unchanged entries are skipped, modified entries are updated, and new entries are created.
Environment variables
Instead of CLI flags, you can set:
CV_URL=https://cv.example.com
CV_API_KEY=cvk_...
CV_VAULT_ID=vault-abc
Watch + Auto-Push
Combine the file watcher with CognitiveVault auto-push for a fully automated pipeline:
ingest watch ./docs/ -v --cv-push \
--cv-url https://cv.example.com \
--cv-api-key cvk_... \
--cv-vault-id vault-abc
When a file changes:
- Ingestible detects the change and re-ingests the document
- After ingestion completes, chunks are automatically pushed to CognitiveVault
- Unchanged chunks are skipped (content-hash comparison)
Webhook: CognitiveVault → Ingestible
When a user edits a chunk in CognitiveVault, the webhook syncs the change back:
Setup
-
Set the webhook secret:
INGEST_WEBHOOK_SECRET=your-shared-secret -
Configure CognitiveVault to send
entry.updatedwebhooks to:POST https://your-ingestible-host/webhooks/cv -
CognitiveVault signs each request with HMAC-SHA256 using the shared secret in the
X-Webhook-Signatureheader.
How it works
When CognitiveVault sends an entry.updated event for an entry with an ingest: sourcePath:
- Ingestible verifies the HMAC-SHA256 signature
- Parses the
sourcePathto extractdoc_idandchunk_id - Updates the chunk content on disk (under document lock)
- Triggers selective re-enrichment for just that chunk
- Returns confirmation
Webhook payload
{
"event": "entry.updated",
"payload": {
"entryId": "cv-entry-id",
"sourcePath": "ingest:my-document/chunk-abc123",
"content": "Updated chunk content...",
"checksum": "sha256hex..."
}
}
Response
{
"status": "ok",
"doc_id": "my-document",
"chunk_id": "chunk-abc123",
"re_enriched": true
}
Events with non-ingest: sourcePaths or non-entry.updated event types are silently ignored.
Architecture
File system ──→ Ingestible ──→ CognitiveVault
↑ │
└── webhook ────┘
- Forward flow:
ingest export-cvor--cv-pushpushes chunks to CognitiveVault - Reverse flow: CognitiveVault webhook updates local chunks when edited
- Dedup: Content hashes prevent unnecessary updates in both directions
- Locking: Document-level file locks (
portalocker) prevent concurrent modifications