Skip to content

Workflow: AI agent reports

This page describes AI-assisted reports in the main user app (glacez-webapp-ui), the glacez-soa-agent service that generates them, and how infrastructure cron schedules the global jobs.

Report types

Report Scope Role
Daily positions report Per user Summarizes position context for the user (Copilot-backed).
Daily portfolio report Per user Portfolio-level narrative (Copilot-backed).
BTC trend report Global (one per UTC day) Optional macro/technical context; can be injected into daily positions when enabled in agent config.
News digest report Global (one per UTC day) Structured digest from findata news articles in a rolling lookback window; can be injected into daily positions/portfolio for the same UTC reportDate only (no fallback).

All reports expose status such as PROCESSING, COMPLETED, and FAILED, plus provider/model metadata where applicable.

UI routes (glacez-webapp-ui)

These routes use MainLayout (authenticated app shell):

Path Purpose
/ai-agent or /reports Hub: grid of available report types and entries.
/positions-report/:reportId? Daily positions report detail.
/portfolio-report/:reportId? Daily portfolio report detail.
/portfolio-reports List of portfolio reports.
/btc-trend-report/:reportDate? Global BTC trend (date = UTC calendar day, yyyy-MM-dd).
/news-digest-report/:reportDate? Global news digest (same date convention).

Data is loaded via glacez-soa-webservice (Feign), which aggregates or proxies glacez-soa-agent where needed.

Backend touchpoints

  • glacez-soa-agent: Owns generation, persistence (Mongo), and REST for jobs + report reads.
  • glacez-soa-findata: Stores news articles (CoinDesk ingest on a separate schedule). Agent digest jobs read news through findata APIs; an optional hours window limits articles to a rolling lookback.
  • glacez-soa-portfolio: Supplies portfolio/position inputs for user reports.
  • copilot-api: LLM proxy used by the agent (configured in agent deployment / chart).

Scheduled jobs (HTTP POST, no body)

Cron runs run_job.py against Kong fronting the agent. Each call uses today’s UTC calendar date as the logical reportDate for that run.

Defined in Glacez-Infra repository:

  • glacez-infra-cron/docker/cronfiles/glacez-prod/agent.cron
  • glacez-infra-cron/docker/cronfiles/glacez-ctlq/agent.cron

Why order matters

For a given UTC day, news digest and BTC trend should complete before daily positions (and any flow that embeds those digests) so the global documents exist when user reports are built.

Production (UTC, daily)

  1. 06:00POST …/jobs/reports/news-digest
  2. 07:00POST …/jobs/reports/btc-trend
  3. 08:00POST …/jobs/reports/daily-positions

Ctlq (UTC, weekly Sunday)

  1. 10:00 — news digest
  2. 11:00 — BTC trend
  3. 12:00 — daily positions

Other agent jobs (e.g. daily portfolio, investment profile summarization) may be triggered on demand or by additional cron entries—check the same agent.cron files for the latest schedule.

Related: findata news ingest (CoinDesk snapshot) is scheduled separately (e.g. findata.cron), not in agent.cron.

Configuration (agent)

Not exhaustive; see agent application.yaml for authoritative keys.

Concern Typical configuration
News lookback window glacez.agent.news.lookback-hours — override with env GLACEZ_AGENT_NEWS_LOOKBACK_HOURS.
Max articles in digest prompt glacez.agent.news.max-articles-for-prompt / GLACEZ_AGENT_NEWS_MAX_ARTICLES.
Inject digest into user reports glacez.reports.daily-positions.include-news-digest, glacez.reports.daily-portfolio.include-news-digest (with env overrides as implemented).
User-scoped LLM model Resolved from the user’s subscription via glacez.model.* (Free vs Pro). Global scheduled jobs use task-models where no user tier applies.
Monthly agent call cap Per user and tier under glacez.quota in the agent application.yaml; enforced on user-scoped agent calls.