Multi-Agent Architecture Design and Engineering Practices for Investment Research Systems

    This article explains how to design and build a multi-agent system for investment research in futures and derivatives markets. It covers the structural limitations of single-agent setups, how to define roles by cognitive function, environment isolation and least-privilege tool access, orchestration logic, confidence scoring, threshold-based monitoring, memory and continuous learning, observability and cost control, and practical rollout advice for running the system as a reliable long-running service.

    1. Why Single Agents Fall Short in Investment Research

    Using a general-purpose agent directly for futures and derivatives research usually breaks down in four places. First, context pollution: market data, news text, financial definitions, and historical backtest conclusions all sit in the same context window, so the model treats noise as evidence. Second, unclear responsibilities: one role both cleans data and produces conclusions, and behavior becomes unpredictable when instructions conflict. Third, no auditability: where a conclusion came from, how many reasoning steps it went through, and which step introduced an assumption are all untraceable. Fourth, no self-improvement: every analysis starts from scratch, and yesterday’s judgment errors never turn into today’s rules.

    The value of a multi-agent architecture is not “more people, more strength.” It is trading structural constraints for reliability: breaking one large, vague reasoning task into several subtasks with clear boundaries that can be verified independently.

    2. Role Design: Split by Cognitive Function, Not Business Labels

    A common mistake is splitting roles by product (methanol team, rebar team), which makes roles highly homogeneous and unable to cross-check each other. A better basis for splitting is cognitive function:

    • Data collection role: only fetches and cleans data, outputs structured data objects, and is forbidden from giving conclusions.
    • Fundamental role: handles slow variables such as supply and demand, capacity, inventory, and imports/exports.
    • Technical role: handles fast variables such as price structure, volatility, and changes in open interest.
    • Risk role: runs stress tests, correlation exposure analysis, and drawdown estimates under extreme scenarios.
    • Compliance and logic review role: checks whether other roles’ reasoning has data that does not match conclusions, or misaligned time windows.
    • Chief investment officer (final decision role): adds no new facts, and only performs weighting, conflict resolution, and confidence assessment.

    The key constraint is one-way data flow: lower-level roles only output upward, and the综合 role must not modify lower-level inputs in reverse. This single rule determines whether the system is reproducible.

    3. Environment Isolation and Least-Privilege Tool Access

    The point of isolation is not “preventing agents from doing harm,” but preventing one role’s failure from polluting global state. Three layers of isolation are recommended in practice:

    1. Filesystem isolation: each role is bound to its own working directory, intermediate artifacts are written to that directory, and cross-role exchange happens only through explicit message channels.
    2. Network and tool permission isolation: the collection role has external access, while reasoning roles have no external network access by default, so prompt injection through web content cannot influence the decision chain.
    3. Execution sandbox: any code execution happens in a restricted container with limits on runtime, memory, and outbound network policy.

    A sample role configuration looks like this (field names are illustrative only):

    1. role: fundamental_analyst
    2. workspace: /sandbox/fundamental
    3. tools: [data_query, calculator]
    4. network: none
    5. max_steps: 12
    6. output_schema: FundamentalReport

    output_schema is often overlooked but extremely important: constraining output with a structured schema lets downstream roles parse it reliably instead of guessing from natural language.

    4. Orchestration: From One Instruction to One Report

    A complete analysis run can be abstracted into five stages:

    1. def analyze(target: str):
    2. raw = collector.fetch(target) # Stage 1: fetch data and align time windows
    3. facts = validate(raw) # Stage 2: data quality validation
    4. views = parallel_run([ # Stage 3: parallel independent analysis
    5. fundamental_analyst(facts),
    6. technical_analyst(facts),
    7. risk_analyst(facts),
    8. ])
    9. review = auditor.review(views, facts) # Stage 4: logic and compliance review
    10. return chief_investment_officer( # Stage 5: synthesis and confidence assessment
    11. views, review
    12. )

    Running the intermediate perspectives in parallel is the key to reducing total latency, and the review stage must be serial and must come before synthesis; otherwise wrong conclusions get weighted directly into the final report.

    5. Confidence Scoring: Turning Subjective Judgment into a Computable Value

    Confidence should not come from the model “feeling” it, but should be composed from observable signals:

    • Data completeness: the proportion of missing key fields;
    • Perspective agreement: how far the roles’ conclusion directions diverge;
    • Time decay: the interval between the data and the current time;
    • Historical calibration: how well the role’s past judgments matched subsequent price action.

    A simple way to compose them is a weighted geometric mean, which avoids one zero term being masked by an average:

    1. confidence = (completeness ** w1) * (agreement ** w2) \
    2. * (timeliness ** w3) * (calibration ** w4)

    Weights need to be adjusted per product, and regressed and calibrated once enough samples accumulate, rather than set by hand.

    6. Threshold Monitoring and Proactive Awareness

    Moving from “passive Q&A” to “proactive observation” requires turning observed metrics into a rule set with thresholds. For chemicals, for example, you can set thresholds across five categories: weekly inventory change, operating rate, basis, cross-product spread, and open interest concentration. When a rule is hit, it triggers incremental analysis rather than a full recompute:

    1. trigger:
    2. metric: inventory_wow
    3. operator: ">"
    4. threshold: 0.08
    5. action: incremental_review
    6. cooldown: 6h

    cooldown suppresses repeated triggers caused by jitter, and is one of the most practical stability designs for long-running operation.

    7. Memory and Continuous Learning

    The system’s real compounding comes from three layers of memory: fact memory (historical data snapshots), judgment memory (each role’s conclusion and reasoning at the time), and calibration memory (the deviation between conclusions and subsequent results). Each is written automatically after every analysis round, and a deviation attribution report is generated periodically to adjust role prompts and weights. Note that the learning loop must keep a human review entry point, so wrong patterns are not automatically reinforced.

    8. Observability and Cost Control

    The cost of a multi-role design grows roughly linearly with the number of roles and steps, so a budget mechanism is required: set a maximum step count and token limit per analysis, and when exceeded, degrade to a single-role quick conclusion labeled “low confidence.” Also write each run’s intermediate artifacts, tool calls, and elapsed time to a logging service, and pair it with monitoring and alerting, so you can quickly tell whether a quality drop is a data problem or an orchestration problem.

    9. Rollout Advice

    Start by running the full loop with two or three roles, verify that structured output and the review step are stable, then expand roles and threshold rules gradually. Metrics should focus on three things: conclusion reproducibility rate, calibration error between confidence and actual results, and cost per analysis. On top of that, connecting general cloud capabilities such as a container platform, object storage, and a message queue lets the system evolve from a single-machine script into a continuously running service.