| name | service-ops |
| description | How to manage imas-codex services (Neo4j graph, embedding server, LLM proxy, SSH tunnels). Use when starting, stopping, checking status, or troubleshooting services. |
Service Operations
Neo4j Graph Database
uv run imas-codex graph start
uv run imas-codex graph stop
uv run imas-codex graph status
uv run imas-codex graph shell
uv run imas-codex graph profiles
uv run imas-codex graph export
uv run imas-codex graph load <f>
uv run imas-codex graph pull
uv run imas-codex graph backup
uv run imas-codex graph clear
Ports by Location
| Location | Bolt | HTTP |
|---|
| iter | 7687 | 7474 |
| tcv | 7688 | 7475 |
| jt-60sa | 7689 | 7476 |
Neo4j Safety Rules
- Never delete Lucene
write.lock files — corrupts vector indexes
- Always backup before destructive operations
- Never use
DETACH DELETE without confirmation
- Use
NOT (x IN [...]) instead of x NOT IN [...] (Cypher 5 syntax)
Embedding Server
uv run imas-codex embed start
uv run imas-codex embed start -g 2
uv run imas-codex embed start -f
uv run imas-codex embed stop
uv run imas-codex embed restart
uv run imas-codex embed status
uv run imas-codex embed logs
uv run imas-codex embed service install
Embedding Configuration
- Model:
Qwen/Qwen3-Embedding-0.6B (dimension: 256)
- Default: 4× P100 GPUs on titan partition
- Port: 18765 (HTTP)
- SLURM script:
slurm/codex-embed.sh
Troubleshooting
| Symptom | Fix |
|---|
embed status shows node draining | Ask admin to resume node |
| Server healthy but no SLURM job | imas-codex embed stop kills rogues |
| Embedding calls timeout | Check tunnel: lsof -i :18765 |
| Rapid FAILED jobs | Check imas-codex embed logs, run uv sync on node |
LLM Proxy (LiteLLM)
uv run imas-codex llm start
uv run imas-codex llm stop
uv run imas-codex llm restart
uv run imas-codex llm status
uv run imas-codex llm spend
uv run imas-codex llm logs
sn generate and sn benchmark require the LLM proxy to be running. Model names must use the
openrouter/ prefix (e.g. openrouter/anthropic/claude-sonnet-4-5) to preserve
cache_control blocks — prompt caching is handled provider-side by OpenRouter, not by this
codebase.
SSH Tunnels
uv run imas-codex tunnel start iter
uv run imas-codex tunnel stop
uv run imas-codex tunnel status
HPC Job Management
uv run imas-codex hpc status
uv run imas-codex hpc shell
uv run imas-codex hpc run <cmd>
uv run imas-codex hpc submit <script>
uv run imas-codex hpc attach <jobid>
uv run imas-codex hpc cancel <jobid>
uv run imas-codex hpc info <jobid>
MCP Server
uv run imas-codex serve
uv run imas-codex serve --read-only
uv run imas-codex serve --dd-only --transport streamable-http
uv run imas-codex serve --transport stdio
Critical Rules
- All services MUST run as SLURM jobs — never nohup, screen, tmux, or ssh &
- Check SLURM allocation before starting services:
squeue -u $USER
- Never start services directly on compute nodes via SSH — use SLURM
- If a node is draining, the fix is to get the node resumed — not work around SLURM