AGOS is a multi-package platform for Philippine market data ingestion, portfolio operations, forecasting, and operator-facing research and trading workflows.
| Path | Role |
|---|---|
frontend/ |
Vite + React UI for landing, login, research, portfolio, trading, and agent workflows. |
backend/ |
FastAPI service for portfolio CRUD, live PSE market access, stored Cosmos data reads, and AGOS agent threads and runs. |
engine/ |
FastAPI service for forecasting and rule-gated trade evaluation. |
cron/ |
Async ingestion pipeline that writes PSE, PSA, BSP, and news-sentiment data into Cosmos DB. |
research/ |
Offline Chronos training and evaluation workspace. |
- There is no global Python environment for this repo.
backend/,engine/,cron/, andresearch/are separate Python workspaces. Install dependencies and run commands from inside the target directory.backendmust run on port8000.enginemust run on port5000.- The frontend defaults to
http://localhost:8000for backend calls andhttp://localhost:5000for engine calls. - The engine expects
BACKEND_API_URL=http://localhost:8000/api/v1.
Start the backend, engine, and frontend for the full local stack. Run cron when you need fresh Cosmos data.
cd backend
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8000cd engine
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 5000cd frontend
npm install
npm run devcd cron
pip install -r requirements.txt
python main.pyUse this only for dataset preparation, training, and evaluation. The runtime model is served from engine/, not from research/.
- Cosmos DB is the shared storage layer.
- Firebase ID tokens are used by
frontend,backend, andengine. - Gemini is required for backend agent runs and cron news structuring.
- Tavily is required for cron news search.
Frontend bypass is guarded by VITE_ENABLE_DEV_BYPASS=true.
Backend and engine bypass are guarded by:
DEV_BYPASS_ENABLED=trueDEV_ADMIN_TOKEN=dev_admin_token
The frontend uses dev_admin_token when bypass is enabled, so the backend and engine token must match it.
- Frontend:
cd frontend && npm run lint && npm run build - Backend:
cd backend && pytest tests - Engine:
cd engine && pytest tests - Cron:
cd cron && ruff check . && pytest tests - Cron data check:
cd cron && python verify_results.py
cronwritespse_stock_data,macro_data, andnews_sentiment_data.backendreads those containers, manages portfolio state, and persists agent threads, messages, runs, and events.enginereads historical prices from Cosmos when possible, falls back to backend chart data when Cosmos history is too sparse, and fetches portfolio state frombackend.frontendexposes/research,/portfolio,/trading, and/agentbehind auth, with/and/loginas public routes.
research/requirements.txtis not a complete description of the research environment. Seeresearch/README.mdfor script-specific dependencies.- Use
cron/config.pyas the reference for environment variables in the ingestion pipeline.
backend/README.mdengine/README.mdcron/README.mdresearch/README.md
