Skip to content

arzdevapp/AgentCom-backend-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentCom Backend Server

AgentCom banner

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.

Requirements

  • 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.

Run the Backend

Install dependencies:

npm install

Start the server:

npm start

By default, the server listens on:

http://localhost:8090

Override the host or port when needed:

HOST=0.0.0.0 PORT=8090 npm start

Run Alongside the AgentCom App

Use two terminal windows.

Terminal 1, backend repo:

cd /path/to/AgentCom-backend-server
npm start

Terminal 2, app repo:

cd /path/to/AgentCom
npm install
npm run start

In 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

API Contract

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.png

Chat Request

POST /api/chat
Content-Type: application/json
{
  "model": "agentcom-server",
  "messages": [
    { "role": "user", "content": "hello" }
  ],
  "stream": true
}

Chat Response

{
  "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.

Verify

Check server health:

curl http://localhost:8090/health

Check app bootstrap data:

curl http://localhost:8090/api/bootstrap

Send 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 test

Backend-Owned App Data

Edit these files to change data displayed by the app:

  • src/cron.js: scheduled job rows for the cron card
  • src/statusDeck.js: status deck cards and selectable rows
  • public/assets/agentcom-banner.png: backend-owned banner image

Security Notes

  • 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.

Repository Boundary

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.

About

AgentCom - backend server for the Expo mobile app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors