Files
Cortex-Inara/README.md
Scott Idem ed472ce9a0 feat: Intelligence Layer Phase 1 — orchestrator service
Adds the Gemini API orchestrator (ReAct tool loop → Claude responder):

Orchestrator engine + router:
- orchestrator_engine.py: Gemini API tool loop, Claude CLI handoff
- routers/orchestrator.py: POST /orchestrate (async job queue), GET /orchestrate/{job_id}

Tools (cortex/tools/):
- web.py: DuckDuckGo web search (no key required)
- ae_knowledge.py: ae_journal_search + ae_journal_entry_create (AE V3 API)
- ae_tasks.py: ae_task_list (reads agents_sync Kanban filesystem)
- files.py: file_read (path-allowlisted to safe dirs)

Config + deps:
- config.py: orchestrator, DuckDuckGo, and AE API settings
- requirements.txt: google-genai, duckduckgo-search
- .env.default: reference config with all new keys documented

Docs:
- CLAUDE.md, README.md, documentation/ added to repo
- Port references updated 7331 → 8000 throughout
- Default model updated to gemini-2.5-flash

Tested: ae_task_list, ae_journal_search, web_search all working end-to-end.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:37:49 -04:00

2.5 KiB

Cortex / Inara — Project Root

Owner: Scott Idem (One Sky IT / Danger Zone) Started: 2026-03-04 Status: Active development

"You can't stop the signal."

Cortex is a self-hosted multi-agent orchestration layer. Inara is the primary conversational agent that lives inside it.


Quick Orientation

Directory What it is
cortex/ FastAPI service — dispatcher, routing, LLM backends, session management
inara/ Inara identity, memory, context, and help files
docs/ Integration reference docs (NC Talk bot, etc.)
documentation/ Architecture decisions, project plans, agent task lists

Running Cortex

# Start (Docker)
cd ~/agents_sync/projects/Cortex_and_Inara_dev
docker compose up -d

# Restart service only (after backend changes)
sudo systemctl restart cortex

# Logs
journalctl -u cortex -f

# Web UI
http://localhost:8000   (or cortex.dgrzone.com on WireGuard)

Config lives in cortex/config.py and a .env file at the project root (not tracked — see env.default).


Key Documentation

File Purpose
documentation/TODO__Agents.md Active task list — read first
documentation/ARCH__Intelligence_Layer.md Intelligence layer architecture (orchestrator, dev agents, knowledge)
docs/NEXTCLOUD_TALK_BOT.md NC Talk bot setup
inara/IDENTITY.md Inara persona and identity
inara/HELP.md In-app help content (rendered in UI)
inara/PROTOCOLS.md Inara behavioral protocols
~/agents_sync/projects/CORTEX.md High-level project vision and phases

Architecture at a Glance

[User / Cron / Webhook]
        ↓
  Cortex Dispatcher  (FastAPI, cortex/)
        ↓
  LLM Backend(s)
  • Claude CLI   — primary reasoning, coding, long-context
  • Gemini CLI   — secondary / cost routing
  • Ollama       — offline/private (scott_gaming, future)
        ↓
  Inara  (identity + memory in inara/)

See documentation/ARCH__Intelligence_Layer.md for the evolving orchestrator/responder and dev-agent architecture.


Inara

Inara is not tied to a specific model. The name is fixed; the backend may vary. Her identity and behavioral files live in inara/ and are loaded at startup via cortex/context_loader.py.


Project Path
Aether Platform API ~/OSIT_dev/aether_api_fastapi/
Aether Frontend ~/OSIT_dev/aether_app_sveltekit/
Fleet coordination ~/agents_sync/