Skip to content

Boot Sequence

OppaAI edited this page Apr 30, 2026 · 1 revision

Boot Sequence

GRACE requires four services running in order before she's ready. Each step depends on the previous one.


Prerequisites

  • Jetson Orin Nano Super with JetPack 6.2.2
  • ROS2 Humble sourced in your shell
  • vLLM Docker image pulled (embedl/vllm:latest-jetson-orin-flashhead)
  • Repository cloned to ~/AGi

Step-by-Step

1. Clone and build (first time only)

git clone https://github.com/OppaAI/AGi ~/AGi
cd ~/AGi/AuRoRA
 
# Install ROS2 dependencies
rosdep install --from-paths src --ignore-src -r -y
 
# Install Python dependencies
pip3 install -r requirements.txt --break-system-packages
 
# Build the SCS package
colcon build --packages-select scs

2. Source the workspace

Every new terminal needs this:

cd ~/AGi/AuRoRA
source install/setup.bash

3. Start Cosmos vLLM

bash launch/cosmos.sh

Wait for this line before continuing — it takes ~3 minutes on cold start:

INFO:     Application startup complete.

Cosmos runs on http://localhost:8000 and serves the OpenAI-compatible /v1/chat/completions endpoint that CNC streams from.

4. Start GRACE (CNC node)

In a new terminal (with workspace sourced):

ros2 run scs cnc

You should see:

============================================================
🧠 CNC — Central Neural Core starting…
============================================================
   [Working Memory Cortex]  ONLINE ✅ — 7±2 PMT slots | N chunks allocated
⏳ Activating Encoding Engine (BAAI/bge-small-en-v1.5)…
✅ Encoding Engine activated
🔄 EMC encoding cycle started
✅ EMC initialized → /home/<user>/.aurora/neural_gateway/engram_complex/emc.db
✅ Memory Coordination Core Activated
✅ Subscribed  : /cns/neural_input
✅ Publishing  : /gce/response
✅ vLLM        : http://localhost:8000
✅ Model       : embedl/Cosmos-Reason2-2B-W4A16-Edge2-FlashHead
============================================================
🌸 GRACE is ready
============================================================

5. Start rosbridge

In a new terminal:

ros2 launch rosbridge_server rosbridge_websocket_launch.xml

rosbridge exposes the ROS2 topics over WebSocket so the GUI can communicate with GRACE.

6. Serve the GUI

python3 -m http.server 9413 --directory ~/AGi/AuRoRA/src/scs/scs

Open in a browser on any device on the same network:

http://<jetson-ip>:9413/AGi.html

Terminal Layout

Running GRACE comfortably needs four terminals side by side:

Terminal Command Purpose
T1 bash launch/cosmos.sh Cosmos vLLM inference server
T2 ros2 run scs cnc GRACE — Central Neural Core
T3 ros2 launch rosbridge_server rosbridge_websocket_launch.xml WebSocket bridge to GUI
T4 python3 -m http.server 9413 --directory src/scs/scs GUI file server

Shutdown

Shut down in reverse order — CNC first, Cosmos last.

  1. Ctrl+C in T2 (CNC) — triggers graceful destroy_node(): closes MCC, drains encoding cycle, releases SQLite connection
  2. Ctrl+C in T3 (rosbridge)
  3. Ctrl+C in T4 (GUI server)
  4. Ctrl+C in T1 (Cosmos) — or docker stop if running in Docker CNC's shutdown is graceful — the encoding cycle gets a stop signal, waits up to 3 seconds for a clean exit, then the engram connection is released. Don't kill the process hard mid-conversation if you can avoid it; unencoded PMTs in the binding stream are protected by the staging table and will be recovered on next boot.

Crash Recovery

If CNC crashes mid-session, any PMTs that were in the binding stream but not yet encoded are safe. On next boot, CNC checks emc_staging and recovers them back into the binding stream before the encoding cycle starts:

⚡ EMC recovered N unencoded episode(s) from engram → binding stream

Working memory (WMC) is in-RAM only — it does not persist across restarts. Episodic memory (EMC) is permanent.


Common Issues

Cosmos not ready — CNC times out on first message Wait for Application startup complete in the Cosmos terminal before sending any messages. CNC will log a timeout error and GRACE will respond with an error chunk — just try again once Cosmos is up.

Encoding Engine offline warning at startup sentence-transformers is not installed. Run:

pip3 install sentence-transformers --break-system-packages

EMC will fall back to lexical-only recall in the meantime — GRACE still works, just without semantic search.

sqlite-vec not available warning at startup

pip3 install sqlite-vec --break-system-packages

Same fallback as above — lexical recall only until resolved.

GUI can't connect Check that rosbridge is running and that you're using the Jetson's LAN IP, not localhost, when connecting from another device.