setup.md
markdown
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠ breaking
1 day ago
Setup
- Clone and install —
git clone <repo> && cd knowtation && npm install. (If you are copying this seed to a new repo instead, see COPY-TO-REPO.md.) - Config — Copy
config/local.example.yamltoconfig/local.yamland setvault_path(absolute path tovault/, e.g.$(pwd)/vault). For search without Qdrant: setvector_store: sqlite-vecanddata_dir: data/. Optionally setqdrant_urland embedding provider. Do not commitconfig/local.yaml. - Secrets — Copy
.env.exampleto.envand set API keys..envis gitignored and loaded automatically.- Two lanes: Embeddings (Meaning search /
knowtation index) and chat (Hub proposal Enrich, review hints,completeChatinlib/llm-complete.mjs) use different providers in config/env. Anthropic powers chat only (Messages API); it does not offer a public embeddings API for vectors. - Embeddings:
config/local.yaml→embedding: { provider, model }, optionally overridden byEMBEDDING_PROVIDER/EMBEDDING_MODEL. Providers:ollama(default),openai(OPENAI_API_KEY),voyage(VOYAGE_API_KEY, good cloud option if you want non–OpenAI vectors). Changing embed model or dimension requires a full re-index (existing sqlite-vec / Qdrant dimensions must match). - Chat:
OPENAI_API_KEYis tried first, thenANTHROPIC_API_KEY, then Ollama (OLLAMA_URL+ chat model). SetKNOWTATION_CHAT_PREFER_ANTHROPIC=1(ortrue) to try Anthropic before OpenAI when both keys are set (with OpenAI as fallback if Claude fails). - Transcription still uses
OPENAI_API_KEYwhen using Whisper (see step 8).
- Two lanes: Embeddings (Meaning search /
- Vault — Open your vault folder (see
vault_pathin config) in Obsidian or any Markdown editor. - Index (for semantic search) — Run once:
knowtation indexornpm run indexornode scripts/index-vault.mjs. You need:- Vector store (pick one in
config/local.yaml):sqlite-vec+data_dir: data/— vectors live in a local SQLite file (no extra server; easiest for self-hosted). Orqdrant+qdrant_url— vectors live in a separate Qdrant service (Docker or cloud). - Embeddings (pick one): Ollama — install ollama.ai, run
ollama pull nomic-embed-text, setembedding: { provider: ollama, model: nomic-embed-text }in config. Or OpenAI — setOPENAI_API_KEYin.envandembedding: { provider: openai, model: text-embedding-3-small }in config. Or Voyage — Voyage AI embeddings API: setVOYAGE_API_KEYandembedding: { provider: voyage, model: voyage-4-lite }(or another Voyage model); you can also setEMBEDDING_PROVIDER=voyageandEMBEDDING_MODEL=voyage-4-litein.env. After indexing, CLI and Hub semantic search have data. Listing notes in the Hub works without indexing; Search vault needs this step on self-hosted.
- Vector store (pick one in
- CLI — From repo root:
node cli/index.mjs --help,node cli/index.mjs list-notes,node cli/index.mjs get-note <path>,node cli/index.mjs index,node cli/index.mjs search "query",write,export,import. Use--jsonfor machine output. - Capture (optional) — File-based:
echo "Note" | node scripts/capture-file.mjs --source file --source-id id123. Webhook:node scripts/capture-webhook.mjs --port 3131then POST/capturewith JSON. See docs/CAPTURE-CONTRACT.md. - Transcription (optional) —
node cli/index.mjs import audio ./recording.mp3(requires OPENAI_API_KEY in.env). See docs/PHASE7-MANUAL-TEST.md. - Memory (optional) — Set
memory.enabled: truein config to store last search and export provenance. Query withknowtation memory query last_searchorlast_export. - Agents — The skill in
.cursor/skills/knowtation/SKILL.mdis auto-discovered by Cursor when this repo is open. For global use, copy that skill folder to~/.cursor/skills/knowtation/. For MCP (Cursor, Claude Desktop), runnode cli/index.mjs mcpornpm run mcpand configure per docs/AGENT-ORCHESTRATION.md. - Hub (optional) — Self-hosted API + OAuth + JWT for shared vault and proposals. From repo root:
cd hub && npm install && cd .., setKNOWTATION_VAULT_PATHandHUB_JWT_SECRET, thennpm run hub. Openhttp://localhost:3333/in a browser (Rich Hub UI is served by the same server). Log in with Google/GitHub if OAuth env vars are set; otherwise use the API only. See hub/README.md and docs/HUB-API.md. CLI:knowtation hub status --hub http://localhost:3333,knowtation propose <path> --hub <url> --intent "..."(requiresKNOWTATION_HUB_TOKEN).
Hosted admin (operators): On the hosted product (knowtation.store), admins are designated by setting HUB_ADMIN_USER_IDS in the gateway's env (comma-separated user IDs, e.g. google:108077705743543803349). Users in that list get role admin (Edit, Team tab); others get member. See hub/gateway/README.md.
File History
2 commits
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠
1 day ago
sha256:9103f98c89257ed2b01c237cea895dabb3e85ea337dccb1161c175e4422355b6
docs: accept Calendar Events v0 spec with Phase 0 security …
Human
1 day ago