The Problem

Quant teams must stitch together data ingestion, signal generation, portfolio construction and execution while preserving context across runs. Traditional algorithmic pipelines are static, making it difficult to reuse insights, adapt to new market regimes, or audit decisions end‑to‑end.

What This Does

The FinAgent Orchestration framework replaces a linear pipeline with a network of autonomous agents that communicate via the MCP/A2A protocols. Core components live under FinAgents/agentpools/alphaagentpool/:

core/ – defines domain models (models.py) and port interfaces (ports/) that each agent implements. agents/ – concrete agents such as autonomousagent.py, dataminingagent.py, meanreversionagent.py, and the memory client (alphamemoryclient.py). corepkg/ – reusable services (executor.py, orchestrator.py, planner.py) and policies (circuit‑breaker, retry, timeout).

A high‑level query is turned into a DAG by the Planner Agent (corepkg/services/planner.py), then executed by the Orchestrator (corepkg/services/orchestrator.py). The Memory Agent persists context in memoryunit.json and can be swapped for a Neo4j backend (referenced in corepkg/observability/logger.py).

Demo scripts illustrate usage:

FinAgents/agentpools/alphaagentdemo/exampleusage.py – runs a single alpha‑signal agent. FinAgents/agentpools/alphaagentpool/demodecoupledsystem.py – end‑to‑end walk‑through of planning, orchestration, and memory logging.

How To Use It

Setup

Install Python (>=3.9) – version pinned in .python-version python -m venv .venv source .venv/bin/activate pip install -r FinAgents/agentpools/alphaagentdemo/requirements.txt

The demo requirements include pydantic, networkx, and fastapi for the MCP server.

Configuration

Agent pool settings: FinAgents/agentpools/alphaagentpool/config/alphapool.yaml. Orchestrator policies: FinAgents/agentpools/alphaagentpool/config/autonomous.yaml. Memory store: edit FinAgents/agentpools/alphaagentpool/memoryunit.json if a custom path is needed.

No environment‑variable secrets are shipped; users must provide API keys for any external data source referenced in their own adapters.

Running

Run the full demo (planner → orchestrator → agents) python FinAgents/agentpools/alphaagentpool/demodecoupledsystem.py

For a quick single‑agent test: python FinAgents/agentpools/alphaagentdemo/exampleusage.py

Both scripts print execution logs and store results in alphasignalsoutput.json.

Real‑World Use

A hedge‑fund quant could embed the orchestrator into a nightly batch job that receives a strategic request (e.g., “generate long‑short equity signals for the next trading day”). The planner builds a DAG of data‑fetch, feature‑engineer, and alpha‑generation agents, the orchestrator runs the graph, and the memory agent writes the plan and outcomes to a central Neo4j graph for later analysis.

from FinAgents.agentpools.alphaagentpool.corepkg.services.planner import Planner from FinAgents.agentpools.alphaagentpool.corepkg.services.orchestrator import Orchestrator

plan = Planner().createplan(query="Long‑short equity signals for 2024‑09‑01") results = Orchestrator().execute(plan) print(results.summary())

Code Health & Issues

Medium – No CI/CD pipeline – repository lacks .github/, Makefile, or other automation; each change must be manually validated. Medium – Missing LICENSE – legal reuse unclear; add an MIT/Apache‑2.0 file. Low – No lockfile – requirements.txt is not version‑pinned; reproducibility depends on PyPI state. Low – Sparse test coverage – only three test files (testwithrealdata.py etc.) exist; many agents have no unit tests. Low – Hard‑coded file paths – several modules reference relative CSVs under qlibdata/; moving the repo will break them unless paths are updated. Low – Potential runtime errors – adapters such as agents/adapters/mcpclient/strategyadapter.py assume external services are reachable; no fallback or retry logic beyond the generic policy modules.

No obvious security secrets are committed, and the code follows a clean separation of ports/services, making future extensions straightforward.

The Bottom Line

FinAgent Orchestration provides a concrete, modular implementation of agent‑centric trading pipelines, with clear entry points and configurable policies. The codebase is sizable but organized; however, the lack of automated testing, licensing, and pinned dependencies raises maintenance risk. Teams ready to invest in custom adapters and operational tooling will find a solid foundation; smaller projects may need to trim the framework before production use.