Aller au contenu

Getting started with Cortex

Ce contenu n’est pas encore disponible dans votre langue.

This guide walks you through cloning the repository, configuring environment variables, starting all services and verifying the installation. No cloud account is needed.

To understand the terms used (atom, HYOS, bloc, etc.), see 03-concepts.


  • Docker and Docker Compose (v2) installed on your machine
  • At least 4 CPU cores and 8 GB RAM available for the containers
  • A few GB of disk space (SurrealDB, PostgreSQL, MeiliSearch, MinIO, Ollama model weights)
  • Optionally, an API key from a GenAI provider (Google Gemini, OpenAI or Anthropic) if you plan to use provider features

Terminal window
git clone https://github.com/arka-labs/arka-cortex.git
cd arka-cortex
cp .env.example .env

Open .env and set the required secrets. At minimum you need:

VariablePurposeExample
SURREAL_USERSurrealDB root userroot
SURREAL_PASSSurrealDB root passworda strong random password
PG_PASSWORDPostgreSQL passworda strong random password
MEILI_MASTER_KEYMeiliSearch master keya random 32-character string
S3_ACCESS_KEYMinIO access keyminioadmin
S3_SECRET_KEYMinIO secret keya strong random password
ENCRYPTION_KEYAES-256-GCM key for provider credentials (base64, 32 bytes)generate with openssl rand -base64 32

All other variables have sensible defaults. Ports, database names and model names can be adjusted but the defaults work out of the box.


Terminal window
docker compose -f docker-compose.example.yml up -d

Docker Compose brings up the following services:

ServicePortRole
surrealdb8000Graph + relational database
postgres5432Audit trail, documents, auth tables
meilisearch7700Full-text search
minio9000 / 9001S3-compatible object storage
ollama11434Local embeddings (bge-m3) and optional LLM
cortex_api9096REST API
cortex_mcp3001MCP server
cortex_ui8080Web UI

Wait for all health checks to pass. You can monitor with:

Terminal window
docker compose -f docker-compose.example.yml logs -f cortex_api

Navigate to http://localhost:8080 in your browser.

The React interface shows the Cortex dashboard. From here you can:

  • Browse the atom catalogue (skills, expertises, methods, tools, scopes)
  • View and manage HYOS profiles
  • Navigate the taxonomy graph
  • Manage workspace projects
  • Consult memory entries

Terminal window
curl http://localhost:9096/health

Expected response:

{"ok": true}

If you set a CORTEX_API_KEY in your .env, include it in requests:

Terminal window
curl -H "X-API-Key: YOUR_KEY" http://localhost:9096/api/atoms

Step 5 — Connect an LLM client (optional)

Section titled “Step 5 — Connect an LLM client (optional)”

If you use Claude, ChatGPT or Cursor, point them at the MCP server:

http://localhost:3001

The MCP server supports OAuth 2.0 for production clients and API key authentication for local development. See 06-rest-and-mcp for details.


Step 6 — Configure a provider (optional)

Section titled “Step 6 — Configure a provider (optional)”

If you want Cortex to store and manage GenAI provider credentials:

  1. Open the UI and go to My Account > Providers
  2. Select a provider (Google Gemini, OpenAI or Anthropic)
  3. Paste your API key
  4. Choose default, fast and quality models
  5. Test the connection

Keys are encrypted at rest with AES-256-GCM. They are never returned to the UI in cleartext. See 05-providers for details.


Terminal window
# Stop all services (data persists in Docker volumes)
docker compose -f docker-compose.example.yml down
# Restart
docker compose -f docker-compose.example.yml up -d

All data is stored in named Docker volumes (surreal_data, pg_data, meili_data, minio_data, ollama_data). Stopping and restarting does not lose data.


DataStorage
Catalogue (atoms, blocs, profiles)SurrealDB volume
Memory entries (decisions, patterns, errors)SurrealDB volume
Documents and libraryPostgreSQL + MinIO
Full-text indexMeiliSearch volume
Embedding model weightsOllama volume
Provider credentials (encrypted)PostgreSQL

Cortex sends no telemetry, no analytics and no machine identifier to any external service.