Local setup recipes
Cortex runs on your machine, so the whole loop can be local. Three recipes.
Ollama (local models)
Section titled “Ollama (local models)”- Install Ollama and pull a model that supports tools:
ollama pull qwen3:8b. - Start Cortex (
rax cortex). In Settings, Providers the Ollama endpoint defaults tohttp://localhost:11434. - In Settings, Defaults pick provider
ollamaand the model. Model pickers list what Ollama serves right now.
Ollama loads models on demand and serves one request per model at a time, so a turn can read Waiting for Ollama (loading the model or queued) before its first token. In the Lab Builder, Model, Context length (numCtx) pins Ollama’s num_ctx.
Ollama Cloud
Section titled “Ollama Cloud”- Settings, Providers: press the Ollama Cloud preset beside the endpoint (it fills
https://ollama.com) and Apply. - Add your Ollama API key on the Ollama Cloud (API key) row, or set
OLLAMA_API_KEYin the server environment. Press Test to list the models. - Pick a cloud model in the model picker.
The key is sent only to a non-local endpoint, never to localhost. A rejected key reads “Ollama Cloud key missing or invalid”. Judgments cannot use Ollama Cloud.
Speaches (local speech to text and text to speech)
Section titled “Speaches (local speech to text and text to speech)”Speaches serves the OpenAI audio API, so one container covers listening and reading. Run it (CPU image shown; use the latest-cuda tag and --gpus=all for a GPU; see the Speaches docs for the current image tags):
docker run --rm --detach --name speaches --publish 8000:8000 \ --volume hf-hub-cache:/home/ubuntu/.cache/huggingface/hub \ ghcr.io/speaches-ai/speaches:latest-cpuDownload the models, because Speaches preloads none:
curl -X POST http://127.0.0.1:8000/v1/models/Systran/faster-whisper-smallcurl -X POST http://127.0.0.1:8000/v1/models/speaches-ai/Kokoro-82M-v1.0-ONNXcurl http://127.0.0.1:8000/v1/models # lists what is installedThen in Settings, Voice set Listening engine and Reading engine to the server engine, pick the Speaches (local) and Speaches (local, Kokoro) presets (http://localhost:8000/v1, models Systran/faster-whisper-small and speaches-ai/Kokoro-82M-v1.0-ONNX, voice af_heart), press Save endpoint and Test. If Test answers 404 “Model … is not installed locally”, Settings shows a copyable curl for the model you set. More engines and the browser option: Voice.
Let Cortex keep Speaches running
Section titled “Let Cortex keep Speaches running”Instead of running the container yourself, turn on Keep the local speech server running in Settings, Voice. It appears once the saved listening or reading endpoint is a local Speaches one: http://localhost:<port>/v1 (also 127.0.0.1), with a Hugging Face model id such as the presets use. It is off by default, and turning it on lets Cortex run docker on this machine.
When it is on, Cortex checks the server at startup, when voice is used, and every minute. If the server is down it:
- starts the container named
cortex-speachesif it exists, otherwise creates it (--restart unless-stopped, port published only on127.0.0.1, thehf-hub-cachevolume). It uses thelatest-cudaimage with--gpus allwhen Docker reports an NVIDIA runtime, elselatest-cpu; - downloads the configured speech-to-text and text-to-speech models through the server’s own model API when they are missing.
Settings shows Checking, Starting, Downloading models, Ready or Failed with the last error. After three failed attempts Cortex stops trying until you press Retry. If Docker is missing, not running, or refuses access, the message says so. Docker restarts the container itself after a crash or a reboot. Cortex never touches a container you named differently (for example the speaches one from the commands above), and refuses to manage a cortex-speaches container that uses another image or port. Cortex runs docker only when it listens on loopback or has an access token (CORTEX_TOKEN).
A second Cortex for screenshots and tests
Section titled “A second Cortex for screenshots and tests”From a source checkout, run a separate Cortex next to your own so a screenshot or test run never touches the one you use:
bun run dev-stack start --port 4399 --ui-port 4398 --cwd <dir>bun run dev-stack statusbun run dev-stack stop --port 4399It keeps its own database under <dir>/.cortex/ and its pid files and logs under <dir>/.cortex-run/, refuses a port that is busy, and stop ends only the processes it started. Run these from apps/cortex.
Install
Bun (recommended)bun add reactive-agentsNode 22.5+npm install reactive-agentsGet notified on new releases