ailabx/agilab

AgiLab(Agi实验室),专注于将前沿AI技术落地:量化投资,多智能体落地,科研自动化。

What it solves

Traditional financial research pipelines often mix data fetching, indicator calculation, and report writing into one monolithic script. AgiLab separates concerns by defining skills that only handle data (collecting quotes, computing technical/fundamental/sentiment indicators, and emitting structured JSON) and a router agent that performs reasoning. This makes the data layer reusable, testable, and independent of any LLM, while the agent can generate Chinese-language analysis reports from the structured output.

How it works

AgiLab exposes a FastAPI backend with Server-Sent Events (SSE) for streaming Q&A. When a user asks about a financial asset (e.g., a stock, ETF, futures contract, convertible bond, or off-market fund), the router_agent is the unified entry point. It calls a standardized skill—skills/financial-research—which runs a modular pipeline:

  1. market_data.py pulls market price data.
  2. technical.py computes technical indicators.
  3. fundamental.py fetches fundamental data.
  4. sentiment.py gathers sentiment metrics.

The skill's main.py orchestrates these scripts and outputs a JSON data package. The router agent then takes that data package and uses an LLM to produce a Chinese analysis report. The whole backend can be started by running backend/server.py, which serves a chat interface at http://localhost:8765. Each script in the skill is also independently runnable via a standardized CLI, emitting JSON to stdout—so you can test a single step without the full stack.

Who it's for

Developers or researchers who want to build financial analysis tools with a clean separation between data acquisition/reasoning. It suits those who prefer a modular architecture with standardized skill interfaces, and who need a chat-style frontend that streams answers. The project is designed to be extended with new skills or asset types.

Highlights

  • Skill-only-data principle: the financial-research skill never calls an LLM; it only fetches and computes.
  • Agent-only-reasoning principle: the router agent invokes skills, receives JSON data, and lets an LLM craft the final report.
  • Standardized CLI: every script under skills/.../scripts runs independently and outputs JSON to stdout.
  • Multiple asset types: supports stocks, ETFs, futures, convertible bonds, and off-market funds (e.g., tickers like 600519, 510300, RB, 113052, 000001).
  • Streaming chat UI: FastAPI + SSE provides a live Q&A interface at http://localhost:8765.

Related

  • Project
  • Project
  • Project
  • Project