Core Concepts
This section explains how QARK works under the hood. The features in Core Features, Agents, Tools, and Universal Overlay build on these concepts. Understanding them helps you make better decisions about model selection, context management, cost optimization, and agent design.
The Agent Kernel How every prompt dispatches an agent through the kernel — config resolution, tool vector assembly, context strategy, streaming, and tool loops.
Context Strategies Six strategies that control what conversation history reaches the model: auto_compact, last_n, first_n, all, none, token_budget. Compaction, context bar, and tradeoffs.
The @Mention System How tools are activated from the composer — built-in tools, MCP tools, agent-tools, autocomplete, tool turn limits, and locked tools.
Fine-Grained Control The ConfigOverrides system — per-conversation overrides for 20+ parameters, the 4-level configuration cascade, override dots, and dynamic LLM parameters from the model registry.
File Attachments & Auto-Routing Five attachment methods (images, files, folders, Finder selection, clipboard), vision vs document paths, and the threshold-based auto-routing between direct injection and RAG.
Tokens & Costs What tokens are, the three token types (input/output/thinking), the cost formula, context window vs max output, and cost optimization strategies.
Message Rendering & Actions The rendering pipeline — GFM markdown, KaTeX math, Shiki code highlighting, citations, thinking blocks, tool call blocks. Plus message actions (copy, regenerate, fork, export, delete) and live streaming token/context percentage display.
Artifacts The Artifacts panel — generated images, videos, and PDFs alongside user attachments and indexed documents, with inline previews, lightbox, drag-drop, and per-item actions.
Export Export conversations, groups, or individual messages as Markdown, HTML, or PDF — with full branch history, asset folders, and interactive sibling browsing in HTML.
Privacy Model Local-first architecture — what stays on your machine, what goes to providers, AES-256 key encryption, no accounts, no telemetry, and how to verify it.