Saltar al contenido principal

Analysis Agents

Three interpretation agents + one deferred reflector. Together they close the Alpha-GPT three-stage loop (Ideation → Implementation → Review) and the TradingAgents-style outcome-reflection loop.

Specs

SpecModulePurpose
analysis.stepalphaswarm/agents/analysis/step_analyst.pyVerdict + improvements for a single agent step.
analysis.runalphaswarm/agents/analysis/run_analyst.pyEnd-to-end interpretation of a backtest / paper / live run.
analysis.portfolioalphaswarm/agents/analysis/portfolio_analyst.pyPortfolio aggregate + risk + regulatory exposure.
Reflector (helper)alphaswarm/agents/analysis/reflector.pyResolve outcomes + write reflections + re-index L0.

Reflection loop (TradingAgents pattern)

  1. The reflector pulls every recent decision row that doesn't yet have an outcome.
  2. It computes raw / benchmark / excess return over a configurable window via the bars adapter.
  3. It writes one MemoryOutcome row + one MemoryReflection row.
  4. It re-indexes the decision into the L0 decisions corpus so the next research / selection / trader run picks it up via HierarchicalRAG.

REST + Celery

POST /agents/analysis/step              — task
POST /agents/analysis/run — task
POST /agents/analysis/portfolio — task
POST /agents/analysis/reflect — task wrapper for run_reflection_pass
POST /agents/analysis/sync/run — synchronous variant
POST /memory/reflect/run — synchronous reflection pass

Tasks live in alphaswarm/tasks/analysis_tasks.py.

YAMLs