# Install Kernel dependencies
cd reference/kernel
npm install
# Install Gateway dependencies (if not already done)
cd ../gateway
npm install
# Build both services
cd ../kernel
npm run build
cd ../gateway
npm run buildTerminal 1 — Kernel:
cd reference/kernel
npm startTerminal 2 — Gateway:
cd reference/gateway
KERNEL_URL=http://localhost:5050/v1/evaluate node dist/server.jsTerminal 3 — ASWF Trader:
cd aswf_auto_trader/paper_trading
python live_trader.pySee scripts/start-all.ps1 (coming soon)
See docker-compose.yml (coming soon)
curl http://localhost:5050/healthExpected: {"status":"ok","service":"ssi-kernel-ref","version":"0.2.0"}
curl http://localhost:4040/v1/decisions -X POST -H "Content-Type: application/json" -d '{
"client_id": "test",
"system_id": "trading-prod",
"action": {
"type": "trade.order.place",
"payload": { "notional": 5000, "open_positions_count": 1 }
}
}'Expected: {"success":true,"decision":{"decision":"ALLOW",...}}
All three terminals should show coordinated activity:
- Kernel:
[kernel] evaluating request... - Gateway:
[gateway] calling kernel... - ASWF:
[SSI] Decision: ALLOW
- Check port 5050 isn't in use:
netstat -ano | findstr :5050 - Verify
npm installcompleted successfully - Check
reference/kernel/envelopes/directory exists
- Ensure Kernel started first and shows "listening on :5050"
- Verify
KERNEL_URLenvironment variable - Check firewall isn't blocking localhost connections
- Ensure Gateway started and shows "listening on :4040"
- Check ASWF config points to correct Gateway URL
- Verify Gateway logs show incoming requests
You now have a real multi-service SSI Protocol stack! 🎉