Agent Logs and Telemetry
View container logs for debugging and real-time telemetry metrics in the agent header.
Logs
Open the agent detail page and click the Logs tab.
A fixed-height scrollable container displays Docker container stdout/stderr.
Auto-refresh (10s) is a toggle; a line-count selector (50, 100, 200, or 500) sets how many lines are fetched, and a refresh button fetches on demand. Auto-scroll is smart: new content scrolls to the bottom automatically, but scrolling stops if you scroll up manually.
GET /api/agents/{name}/logs?tail=100get_agent_logs(agent_name, lines=100)Live Telemetry (Agent Header)
The agent header bar on the detail page displays live resource metrics:
Metrics auto-refresh every 10 seconds. API: GET /api/agents/{name}/stats (also reports network bytes in and out, which the header does not show)
Host Telemetry (Dashboard Header)
Host-level CPU, memory, and disk usage are shown in the Dashboard header. API: GET /api/telemetry/host
Centralized Logging via Vector
All container logs are captured by the Vector log aggregator and written to structured JSON files:
/data/logs/platform-YYYY-MM-DD.json/data/logs/agents-YYYY-MM-DD.jsonFiles rotate daily. Logs are enriched with container metadata (name, labels). To query agent logs directly:
docker exec trinity-vector sh -c "tail -50 /data/logs/agents-$(date -u +%F).json" | jq .OpenTelemetry
Claude Code agents export OTel metrics — cost and tokens by model, lines added and removed, sessions, active time, commits, and pull requests — to Trinity's OTel collector (on by default; OTEL_ENABLED=0 turns it off). Read the rollup with GET /api/ops/costs (admin, or an ops-scope key): it returns the totals, cost per model, tokens by type, productivity counts and daily-cost-limit alerts, and reports enabled: false when OTel is off or available: false when the collector cannot be reached. There is no UI panel for these metrics today.