CloudAI-X (@cloudxdev)

2025-12-29 | โค๏ธ 601 | ๐Ÿ” 51


How to setup a multi agent system? Bookmark it ๐Ÿ“‚

โ€œThe Trading Floorโ€

Multi-Agent Market Analysis Council to analyze a stock ticker

@Zai_org GLM-4.7 ๐Ÿค @opencode

Agent framework: @crewAIInc

How it works?

  1. User enters a stock ticker to analyze
  2. 5 AI agents wake up, each with distinct expertise:
    • Quant Analyst โ€” technical indicators & price patterns
    • Sentiment Scout โ€” market mood & crowd psychology
    • Macro Strategist โ€” sector dynamics & economic context
    • Risk Manager โ€” volatility, drawdowns & position sizing
    • Portfolio Chief โ€” synthesizes all perspectives
  3. Agents analyze independently using real market data
  4. They debate, challenge assumptions, and identify disagreements
  5. Portfolio Chief resolves conflicts and delivers a consensus recommendation
  6. Final output: buy/hold/sell rating with confidence level, position size, and key risks

How to built The Trading Floor?

  1. Chose CrewAI as the agent framework โ€” handles multi-agent orchestration out of the box
  2. Defined 5 agents with distinct roles, goals, and backstories in Python
  3. Built custom tools wrapping yfinance for real market data (prices, indicators, volatility)
  4. Configured sequential workflow โ€” specialists analyze first, Portfolio Chief synthesizes last
  5. Set up FastAPI backend with SSE to stream agent thoughts in real-time
  6. Built Next.js frontend to visualize the โ€œboard of directorsโ€ deliberating live
  7. One environment variable (MODEL=openai/gpt-5.2) powers all agents
  8. Generated unique agent icons with AI image tools Total cost: $0 for the framework, pay only for LLM API calls

Tech stack:

  • GLM-4.7 with opencode to build the app
  • CrewAI (open source) for agent orchestration
  • GPT-5.2 powering each agent
  • FastAPI + SSE for real-time streaming
  • Next.js frontend showing live agent deliberations

๋ฏธ๋””์–ด

video thumbnail

image


Tags

3D AI-ML LLM