Building a Multi-Agent Investment Research System: Architecture and Implementation

    This article walks through the architecture of a multi-agent investment research system built to overcome the three limitations of single-turn LLM conversations: missing stance, invisible reasoning, and no executable interface. It covers the end-to-end pipeline, six reusable capability abstractions (profiles, skills, kanban, dispatcher, scratch workspaces, and heartbeat-reclaim), a 7+1 role roster that separates bulls from bears, the skill and command inventory, and a fixed-field structured output contract with explainable confidence, invalidation conditions, and observation thresholds. It closes with evolution directions and practical caveats on isolation cost, sandbox permissions, and human-in-the-loop review.

    1. Why Single-Turn Chat Cannot Support Investment Research

    Hand a general-purpose chat model a prompt like “analyze methanol futures for me” and you usually get a well-structured block of text: supply and demand, inventory, operating rates, and technicals all get a mention, and it reads convincingly. The problems show up the moment you try to act on it.

    The first is a missing stance. The value of investment research lies precisely in the confrontation between bulls and bears, and a report that offers only one narrative carries confirmation bias by construction. The second is that the process is invisible. Where the conclusion came from, which assumption is the weakest, and under what conditions the conclusion breaks down are all lost. The third is the absence of an executable interface. With no confidence score, no position constraints, and no trigger thresholds, the report can only be read; it cannot be hooked into any workflow.

    A multi-agent architecture addresses exactly these three points: role isolation creates genuine disagreement, intermediate artifacts leave a traceable audit trail, and structured output turns conclusions into objects a machine can consume.

    2. Overall Shape of the Target System

    The external interface is deliberately minimal — a single natural-language instruction. Internally, it is a pipeline:

    1. User instruction
    2. ↓
    3. Task decomposition (the plan is confirmed with the user once)
    4. ↓
    5. Kanban dispatch: subtasks enter the task list
    6. ↓
    7. Parallel execution in isolated workspaces (multiple roles, separate processes)
    8. ↓
    9. Artifact collection and deduplication
    10. ↓
    11. Synthesis role aggregates → structured report
    12. ↓
    13. Scheduled inspection + proactive push (optional)

    A typical run takes on the order of ten minutes end to end. Actual agent execution is under ten minutes; the rest is the human-in-the-loop time spent confirming the decomposition plan. That ratio is worth noting: exposing the decomposition step for explicit human confirmation costs very little and measurably reduces the chance of the run going off track.

    3. Six Key Capability Abstractions

    The original discussion is framed around one specific framework, but what actually transfers is a set of six general capabilities. Any agent platform that provides them can reproduce the same architecture.

    1. Profile. One profile equals one AI role, bound to its own model selection, persona rules, memory space, and skill set. Once started, profiles are mutually isolated processes that cannot see each other’s intermediate artifacts — isolation is the precondition for real disagreement. If every role shared the same context, the bull and the bear would converge on the same view quickly.

    2. Skill. Domain knowledge, data-fetching scripts, and report templates are packaged into reusable, versionable units and mounted onto roles on demand. Skills solve the problem of knowledge not being lost between sessions.

    3. Kanban. Decomposed subtasks enter the list as cards with state transitions, serving as the only handoff contract between roles.

    4. Dispatcher. Assigns cards to the appropriate profile, controls concurrency, and handles retries on failure.

    5. Scratch workspace. Each role reads and writes files and runs scripts inside its own sandbox; artifacts are persisted to disk and then collected, which prevents cross-contamination.

    6. Heartbeat and reclaim. A scheduled wake-up plus timeout reclamation mechanism lets the system run periodic inspections unattended and release resources when a role hangs.

    4. Role Roster (7+1)

    Role Core responsibility Key output
    Default entry point Receive instructions, confirm decomposition, return the report Decomposition plan
    Chief Investment Officer Aggregate and adjudicate, arbitrate conflicts Synthesis report
    Bull researcher Argue the upside drivers Bullish evidence chain
    Bear researcher Argue the downside risks Bearish evidence chain
    Technical analyst Price and volume, structure, key levels Levels and signals
    Market researcher Macro, supply chain, events Event calendar
    Risk control Position, stop-loss, drawdown constraints Risk budget
    Memory reflector Review deviations in historical conclusions Calibration suggestions

    Splitting the bull and bear into two roles, rather than having one role “cover both sides,” forces the generation of two non-compromising evidence chains, which the Chief Investment Officer then arbitrates explicitly.

    5. Skills and Commands

    Two skills are enough; more invites over-abstraction. The first is a data skill, responsible for pulling and cleaning structured data such as quotes, inventory, and operating rates. The second is a report skill, responsible for converging free text into structured output with fixed fields.

    On the command side, roughly ten commands cover the full lifecycle:

    1. Initialize roles and mount skills
    2. Create/view the task kanban
    3. Dispatch a subtask
    4. Inspect a role's workspace artifacts
    5. Collect artifacts and aggregate
    6. Generate the structured report
    7. Enable scheduled inspection
    8. Configure the push channel
    9. Review historical conclusions and deviations
    10. Emergency shutdown

    6. The Structured Output Contract

    What makes a report usable is fixed fields. A sketch of the structure:

    1. {
    2. "symbol": "Methanol main contract",
    3. "direction": "bullish bias",
    4. "confidence": 0.68,
    5. "position": {"max_ratio": 0.2, "entry_zone": [2380, 2410]},
    6. "invalidations": ["Port inventory builds for two consecutive weeks", "Operating rate rebounds above threshold"],
    7. "thresholds": [
    8. {"name": "Spot basis", "op": ">", "value": 80},
    9. {"name": "Inventory WoW", "op": ">", "value": 5},
    10. {"name": "Operating rate", "op": "<", "value": 60},
    11. {"name": "Open interest change", "op": ">", "value": 3},
    12. {"name": "Spread", "op": "<", "value": -50}
    13. ],
    14. "confidence_basis": "Difference in bull/bear evidence strength + hit rate of comparable historical conclusions"
    15. }

    Confidence must be explainable — derived jointly from the evidence-strength gap and the historical hit rate, not assigned subjectively by the model. Invalidation conditions and observation thresholds are the report’s shelf life; without them, a conclusion cannot be re-verified automatically.

    7. Where This Evolves

    The first direction is horizontal expansion to more instruments. The multi-role division of labor is instrument-agnostic; moving to equities only requires swapping the data skill and the rule thresholds. The second is shifting from passive response to proactive push. Scheduled inspection runs the system periodically, the system itself decides which instruments have crossed a threshold and are worth flagging, and the conclusion is pushed to an instant messaging tool — humans no longer need to ask.

    8. Implementation Notes

    Isolation produces disagreement, but it also produces cost, so the number of roles should follow the complexity of the topic. The kanban state machine needs explicit failure and timeout branches. Script execution inside the sandbox must have restricted permissions and restricted network egress. Push notifications need a rate limit and a quiet window, otherwise alert fatigue will render the whole system useless. Finally, every conclusion should retain a human final review step — the architecture can improve the efficiency of information processing, but it cannot replace responsibility for risk.