Files
Cortex-Inara/documentation/MASTER.md
Scott Idem 45c95d20ba feat: model registry V2 — provider-aware schema with multi-account support
Adds a providers section to the per-user model registry for Anthropic and
Google as first-class providers alongside local hosts. Google accounts
(API keys) are now stored as a list so multiple Google accounts can coexist.

Changes:
- model_registry.py: V2 schema, auto migration V1→V2 (pulls gemini_api_key
  from auth.json into providers.google.accounts), _resolve_model() merges
  account API key for gemini_api type models
- routers/orchestrator.py: uses model-resolved api_key when orchestrator
  role resolves to a gemini_api model with account_id
- ANTHROPIC_CATALOG and GOOGLE_CATALOG constants for model picker (Phase 2)
- New functions: get_google_api_key(), save/remove_google_account(), get_catalog()
- Documentation: ARCH__BACKENDS.md updated to V2 schema, DESIGN doc added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 20:21:04 -04:00

3.5 KiB

Cortex / Inara — Master Index

Start here. This document is a map, not a manual. Last updated: 2026-04-27


What It Is

Cortex is a self-hosted personal AI platform. It routes messages from any input channel to AI backends, manages a resident agent (Inara) with persistent memory, and coordinates across a fleet of machines. It is infrastructure, not a product.

Running at: https://cortex.dgrzone.com | systemctl --user restart cortex


Current State

Component Status Notes
Web UI Live SPA, dark theme, mobile-responsive, session auth
Nextcloud Talk bot Live HMAC-signed, per-user routing
Google Chat Add-on Live JWT-verified, per-user routing
Claude backend Live Primary — via Claude Code CLI
Gemini backend Live Fallback — via Gemini CLI
Local backend Live Third option — Open WebUI/Ollama on scott_gaming
Gemini orchestrator Live Tool loop → Claude response, Agent mode in UI
Model registry V2 Live Providers (Anthropic/Google/Local), multi-account Gemini
Memory distillation Live Short (daily) / Mid (weekly) / Long (monthly)
Multi-user Live Scott, Holly, Brian — each with own personas
Session search Live Full-text search across past session logs
Proactive cron Live message and brief job types → NC Talk

Active users / personas: scott/inara, scott/developer, holly/tina, brian/wintermute


Document Map

Project-Level

Doc What it covers
This file Index and current state
CORTEX.md Vision, philosophy, "what it is and isn't"
ROADMAP.md Phases — what's done, what's next, what's deferred
TODO__Agents.md Active task list — read before starting work

Architecture

Doc What it covers
ARCH__SYSTEM.md Overall architecture, component map, key design decisions
ARCH__BACKENDS.md LLM backends, routing, fallback, per-user config
ARCH__PERSONA.md Persona system, context tiers, memory distillation
ARCH__CHANNELS.md Input channels — web, NC Talk, Google Chat, cron
ARCH__FUTURE.md Planned: local orchestrator, dev agents, knowledge layer

Setup & Reference

Doc What it covers
docs/NEXTCLOUD_TALK_BOT.md NC Talk bot setup and troubleshooting
docs/GOOGLE_CHAT_BOT.md Google Chat Add-on setup
docs/OPEN_WEBUI_API.md Open WebUI/Ollama API reference for local model work

Code-Level

Doc What it covers
CLAUDE.md Project instructions for Claude Code — directory map, run commands, design decisions
README.md Project root orientation, quick-start, user management
cortex/static/HELP.md In-app help (rendered in UI for all users)

Quick Reference

Start the service / check logs

systemctl --user restart cortex
journalctl --user -u cortex -f

Syntax check before restart

python3 -m py_compile cortex/<file>.py

Add a user

cd cortex && .venv/bin/python manage_passwords.py invite <username> <email>

Run tests

cd cortex && .venv/bin/python -m pytest tests/ -q