Architecture
A layered DAG of 39 crates; single-system by default, with an optional coordinator/worker layer that keeps the same guarantees.
Kortecx is built as a layered DAG of 39 crates. Lower layers know nothing about higher ones; the dependency graph is acyclic, so each layer can be reasoned about and tested in isolation.
Single-system by default
Out of the box the runtime is single-system: one process, one journal, one content store. This is the default and the simplest thing that works — the 60-second proof runs entirely single-system.
The optional distributed layer
Scaling out is wiring, not a rewrite:
kx-coordinator— the sole writer. Centralizing writes is what preserves the journal's single-source-of-truth invariant across nodes.kx-worker— executes motes handed out by the coordinator.
The distributed layer is optional and provides the same guarantees as single-system: exactly-once delivery, transparent recovery, and a policy-gated CapabilityBroker. You opt into it when you need capacity, not because the model changes.
Same guarantees, more capacity
The distributed layer does not relax any guarantee. A workflow behaves identically whether it runs on one machine or across the runtime — the difference is throughput, not semantics.
Where things live
- The journal and content store sit at the foundation (see Core concepts).
- The CapabilityBroker is the single door to effects.
- Trait seams at the boundaries make storage, inference, and scheduling swappable — see Extending.
Local inference
Optional Tier-1 local LLM inference via llama.cpp behind the InferenceBackend trait seam — GGUF by path, Metal on Apple, CUDA cloud-only.
Extending
Seven trait seams make the runtime swappable — Journal, ContentStore, CapabilityBroker, InferenceBackend, ResourceManager, SecretStore, WorkerRegistry.