Repository navigation
Operations
Christian Pojoni edited this page Apr 27, 2026
·
2 revisions
Operational notes for running and maintaining Karta.
- Configure env.
- Ensure storage paths exist.
- Start server or use Rust API.
- Add a note.
- Search/ask.
- Run dreaming if needed.
- Check schema health.
Common config areas:
- LLM provider
- embedding model
- reranker config
- Lance path
- SQLite path
- server host/port
- OAuth credentials
- ACTIVATE/read config
- dream config
- forget config
Keep secrets in env/secret manager, not checked-in docs.
Karta uses two embedded stores. SQLite is opened with journal_mode=DELETE for network-filesystem compatibility; do not assume WAL.
flowchart LR
Karta --> Lance[(LanceDB)]
Karta --> SQLite[(SQLite DELETE journal)]
Lance --> Notes[Notes + embeddings]
SQLite --> Graph[Links/dreams/rules/contradictions/schema]
Backup both stores together for consistency.
SQLite graph store tracks schema metadata.
Expected ops:
- startup initializes tables
- pending migrations apply idempotently
- health checks expose warnings/applied/pending state
If migration fails:
- stop writers
- backup SQLite file
- inspect schema metadata
- rerun with debug logs
- restore from backup if needed
If answer quality poor:
- Check notes exist.
- Run
searchmanually. - Check query mode.
- Enable ACTIVATE if disabled.
- Check embedding provider/config.
- Check reranker config.
- Run dream pass for consolidation.
- Inspect linked notes.
- Check contradiction injection.
If notes are not linking:
- Check embedding generation.
- Check similarity threshold.
- Check candidate count.
- Check LLM link decision output.
- Inspect graph links.
- Confirm
add_link/add_link_typedsucceeds.
If dreams not written:
- Confirm enabled dream types.
- Ensure enough notes/clusters.
- Check dream cursor.
- Check duplicate detection.
- Check LLM errors/token limits.
- Inspect dream run record.
If memories disappear:
- Run preview first.
- Check access stats and last_accessed_at.
- Check protected note reasons.
- Check archive threshold.
- Confirm status: Active/Deprecated/Superseded/Archived.
- Keep SQLite on persistent disk.
- Keep Lance data on persistent disk.
- Use filesystem with reliable SQLite file locking; current code uses DELETE journal mode for FUSE/network-FS compatibility.
- Back up before migrations.
- Keep LLM API keys outside repo/wiki.
- Use OAuth in public deployments.
- Clamp top_k for MCP/server endpoints.
| Symptom | Likely cause | Fix |
|---|---|---|
| No search results | empty vector store / embedding failure | add notes, check provider. |
| Weak recall | ACTIVATE off / thresholds too strict | enable ACTIVATE, tune top_k/thresholds. |
| Bad chronological answers | missing session_id/follows links | use add_note_with_session. |
| No dreams | not enough notes / dream cursor already current | add notes or reset/inspect cursor. |
| Contradictions ignored | no contradiction dream/rule path run | run dreaming, inspect contradiction list. |
| Slow first query | prototype embeddings/reranker init | cache/warm startup. |