Standalone Node.js backend server for the AgentCom Expo mobile app.
This repository intentionally contains only backend code. The Expo / React Native app should live in a separate repository and talk to this server over HTTP.
- Node.js 20 or newer
- npm
- The AgentCom mobile app repository checked out separately
- For physical-device testing, a backend URL reachable from the device
No npm packages are required at the moment; the server uses Node's built-in HTTP module.
Install dependencies:
npm installStart the server:
npm startBy default, the server listens on:
http://localhost:8090
Override the host or port when needed:
HOST=0.0.0.0 PORT=8090 npm startUse two terminal windows.
Terminal 1, backend repo:
cd /path/to/AgentCom-backend-server
npm startTerminal 2, app repo:
cd /path/to/AgentCom
npm install
npm run startIn the AgentCom app settings, set the server URL to the backend address:
http://localhost:8090
For Android emulator testing, use:
http://10.0.2.2:8090
For a physical phone, use your computer's LAN IP address instead:
http://YOUR_COMPUTER_LAN_IP:8090
For production builds, use a public HTTPS backend URL in the app:
EXPO_PUBLIC_AGENTCOM_SERVER_URL=https://your-agentcom-server.example.com
The AgentCom app expects these endpoints:
GET /health
GET /api/bootstrap
GET /api/cron
GET /api/status-deck
POST /api/chat
GET /assets/agentcom-banner.pngPOST /api/chat
Content-Type: application/json{
"model": "agentcom-server",
"messages": [
{ "role": "user", "content": "hello" }
],
"stream": true
}{
"choices": [
{
"message": {
"role": "assistant",
"content": "AgentCom server received: hello"
}
}
]
}Replace the placeholder chat handler in src/server.js when connecting a real
model, agent runtime, or hosted AI provider.
Check server health:
curl http://localhost:8090/healthCheck app bootstrap data:
curl http://localhost:8090/api/bootstrapSend a test chat message:
curl -X POST http://localhost:8090/api/chat \
-H 'Content-Type: application/json' \
-d '{"model":"agentcom-server","messages":[{"role":"user","content":"ping"}],"stream":false}'Run tests:
npm testEdit these files to change data displayed by the app:
src/cron.js: scheduled job rows for the cron cardsrc/statusDeck.js: status deck cards and selectable rowspublic/assets/agentcom-banner.png: backend-owned banner image
- Do not put secrets in the Expo app repository.
- Keep provider API keys, service credentials, and private tokens on the server.
- Treat all Expo public environment variables as visible to users.
- Use HTTPS for production.
- Tighten CORS before public deployment if the backend should only accept known clients.
This repository is the backend editing surface. Do not add Expo app source, mobile UI code, native Android/iOS folders, or app build artifacts here.
