Backend: - Replace bare print() with structured logging module - Include LLM prompt snippets and response content in streamed events - Extract proper node names from LangGraph metadata (langgraph_node) - Add latency tracking (start/end time per node) - Add tool input/output content in events - Add system log event type for informational messages - Stream on_tool_end events for tool results Frontend: - Fix node disappearing/reappearing: use useNodesState/useEdgesState + useEffect for incremental updates instead of useMemo that rebuilt all nodes on each event - Fix duplicate node creation: use useRef to track seen node IDs persistently - Fix useAgentStream reconnection loop: remove stale `status` from connect deps - Use statusRef to avoid stale closure in onclose handler - Add auto-scroll to terminal, event count, type labels/colors - Show prompt snippets, tool I/O, and response content in terminal - Handle 'log' event type Packages: - Update all npm deps to latest compatible minor versions - Remove node_modules from git tracking, add to .gitignore Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com> Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/5c511c4e-5172-4eda-b6de-aefa1859e8ac |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| DESIGN.md | ||
| README.md | ||
README.md
AgentOS: Visual Observability & Command Center
AgentOS is a real-time observability and command center for the TradingAgents framework. It provides a visual interface to monitor multi-agent workflows, analyze portfolio risk metrics, and trigger automated trading pipelines.
System Architecture
- Backend: FastAPI (Python)
- Orchestrates LangGraph executions.
- Streams real-time events via WebSockets.
- Serves portfolio data from Supabase.
- Port:
8088(default)
- Frontend: React (TypeScript) + Vite
- Visualizes agent workflows using React Flow.
- Displays high-fidelity risk metrics (Sharpe, Regime, Drawdown).
- Provides a live terminal for deep tracing.
- Port:
5173(default)
Getting Started
1. Prerequisites
- Python 3.10+
- Node.js 18+
- uv (recommended for Python environment management)
2. Backend Setup
# From the project root
export PYTHONPATH=$PYTHONPATH:.
uv run python agent_os/backend/main.py
The backend will start on http://127.0.0.1:8088.
3. Frontend Setup
cd agent_os/frontend
npm install
npm run dev
The frontend will start on http://localhost:5173.
Key Features
- Literal Graph Visualization: Real-time DAG rendering of agent interactions.
- Top 3 Metrics: High-level summary of Sharpe Ratio, Market Regime, and Risk/Drawdown.
- Live Terminal: Color-coded logs with token usage and latency metrics.
- Run Controls: Trigger Market Scans, Analysis Pipelines, and Portfolio Rebalancing directly from the UI.
Port Configuration
AgentOS uses port 8088 for the backend to avoid conflicts with common macOS services. The frontend is configured to communicate with 127.0.0.1:8088.