(Merger Arbitrage AI Agent Pipeline)
A multi-agent system that automates preliminary deal analysis for a merger arbitrage fund. Given a merger announcement, the pipeline fans out to specialist AI agents, each focused on a distinct analytical domain, and combines their outputs into a unified deal brief.
The system uses the ReAct (Reason + Act) pattern powered by LangGraph and Anthropic's Claude models.
For deep technical and architecture details, see ARCHITECTURE.md.
- Equity Research Agent (Phase 1 MVP): Scrapes SEC EDGAR and web data to produce a research-grade initiating coverage report.
- Legal M&A Agent (Phase 2): Summarizes merger agreements and flags key deal risk clauses using RAG for long documents.
- Antitrust Agent (Phase 3): Performs regulatory risk assessment across DOJ, FTC, EC, SAMR with probability scores.
- Framework:
FastAPIfor async REST endpoints. - AI/LLM:
LangGraphfor orchestrating agents, AnthropicClaude-3.5-Sonnet(for fast tool use) andClaude-3-Opus(for synthesis). - Package Manager:
uvfor blazing-fast dependency management and environments. - Data Sources: SEC EDGAR (Free), Tavily Search API.
Ensure you have uv installed:
curl -LsSf https://astral.sh/uv/install.sh | shClone the repository and install dependencies:
git clone https://github.com/vikbht/dealflowAI.git
cd dealflowAI
uv syncCopy the template and add your API keys (e.g., Anthropic, Tavily):
cp .env.example .envEdit .env to include your specific tokens.
You can test the pipeline locally using the CLI script (no server needed):
uv run python run_example.pyStart the FastAPI server:
uv run uvicorn merger_arb.main:app --reloadYou can then hit the endpoint:
curl -X POST http://localhost:8000/analyze/equity-research \
-H "Content-Type: application/json" \
-d '{
"target_ticker": "ATVI",
"target_name": "Activision Blizzard",
"acquirer_ticker": "MSFT",
"acquirer_name": "Microsoft",
"announcement_date": "2022-01-18",
"offer_price": "$95.00",
"deal_value": "$68.7 billion"
}'