dd-agents 标志

dd-agents

社区
zoharbabin

Legal flags a risk. Finance flags another. We connect and cite. Open-source forensic M&A due diligence: 13 AI agents read your data room across 9 domains (Legal, Finance, Commercial, Tech, Cyber, HR, Tax, Regulatory, ESG), cross-reference findings no single reviewer connects, and trace every one to an exact page & quote.

发布者zoharbabin
代码仓库due-diligence-agents
语言Python
复刻数
23
星标数
106
可用工具
0
传输类型stdio
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    dd-agents 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 106 个星标和 23 个复刻。


See a sample report — interactive HTML output from a synthetic deal, no install required.

📑 Walkthrough deck


https://github.com/user-attachments/assets/03ae7e38-8280-488c-898a-61c1a361bb7d


Finds what gets buried across hundreds of contracts — cross-references it across 9 specialist domains (Legal, Finance, Commercial, ProductTech, Cybersecurity, HR, Tax, Regulatory, ESG) — and traces every finding to an exact page, section, and quote. Use the structured output alongside your advisors to build IC memos, advisor reports, negotiation checklists, or integration plans.

Battle-tested across multiple completed acquisitions, not just synthetic benchmarks — every quality gate and verification layer below was shaped by what actually broke on real deals.

This tool does not replace professional advisors. Legal, financial, and regulatory conclusions should always be made by qualified professionals. This tool helps your team and advisors work faster.

Why This Exists

I built this to solve my own problem. As a corp dev lead, I'd spend weeks assembling the cross-domain picture from siloed advisor reports — legal, financial, and commercial teams all flagging the same subject independently, with nobody connecting the dots. A termination clause in one contract and a revenue concentration risk in the same subject would be flagged in separate workstreams, if at all.

The numbers tell the story:

  • 31% of M&A failures trace back to due diligence shortcomings — Acquisition Stars, citing HBR, McKinsey, and KPMG research
  • DD timelines keep compressing — what used to be a six-week process becomes three weeks, with no reduction in scope — Spellbook
  • Corp dev teams screen 200-1,000+ companies/year but close only 1-10 — a 1-3% conversion rate, with DD costs sunk on every deal that doesn't close — CorpDev.AI
  • AI contract analysis reaches 95% accuracy with clause-aware prompting (up from 74% baseline) — Addleshaw Goddard RAG Report, 510 contracts tested
  • 86% of M&A organizations have integrated GenAI into deal workflows — Deloitte 2025 M&A Trends

This tool runs all nine workstreams in parallel across every document, cross-references findings automatically, and produces structured analysis your team can search, filter, and drill into — the kind of cross-domain picture that used to take weeks to assemble manually.

Who uses this: Corp dev teams screening targets, PE firms running portfolio DD, legal teams doing contract review, advisors accelerating workstreams. Anyone who needs to search hundreds of contracts and connect findings across domains — it's already run on real acquisitions, not just demo data rooms.

What You Can Do

Full Pipeline — Integrated Due Diligence

bash
dd-agents run deal-config.json

Analyzes every document through 9 domain lenses, cross-references findings, and validates quality through 5 blocking gates. Produces:

  • Interactive HTML report — Go/No-Go verdict with executive narrative, progressive disclosure (decision → actions → domain details → full evidence), severity filtering, and a clause library section that groups findings by canonical clause type (change of control, termination, indemnification, and more) against market-norm comparisons
  • 16-sheet Excel report — structured findings, cross-references, audit trail for downstream modeling
  • Per-subject JSON findings — every finding with severity, citations, cross-references, and governance graph edges

Quick Scan — Red Flag Triage in Minutes

bash
dd-agents run deal-config.json --quick-scan --model-profile economy

GREEN / YELLOW / RED signal across 8 deal-killer categories. Get a first read before committing to full analysis.

Contract Search — Targeted Questions, No Full Pipeline

bash
dd-agents search prompts.json --data-room ./data_room

Ask specific questions across every contract and get an Excel report with answers, citations, and verification scores. The prompts file is plain JSON any legal professional can write:

json
{
  "name": "Change of Control Analysis",
  "columns": [
    {
      "name": "Consent Required",
      "prompt": "Does this agreement require consent upon a change of control? Answer YES, NO, or NOT_ADDRESSED."
    }
  ]
}

See examples/search/ for ready-to-use templates.

Post-Run Tools

bash
dd-agents chat --report _dd/forensic-dd/runs/latest         # Interactive multi-turn chat with memory
dd-agents query --report _dd/forensic-dd/runs/latest        # Ask questions about findings
dd-agents cost _dd/forensic-dd/runs/latest                  # Per-provider / per-model cost rollup
dd-agents assess ./data_room                                # Check data room quality
dd-agents portfolio add "Deal A" --data-room ./data_room_a  # Track multiple deals
dd-agents portfolio compare                                 # Compare risk across deals
dd-agents export-pdf report.html                            # Export to PDF
dd-agents log --data-room ./data_room                       # Browse the deal knowledge timeline
dd-agents lineage --data-room ./data_room                   # Trace finding evolution across runs
dd-agents diff run_a/ run_b/                                # Compare findings between two run directories
dd-agents health --data-room ./data_room                    # Check knowledge base integrity
dd-agents annotate --data-room ./data_room "Confirmed with counsel"  # Add analyst notes

Serve a finished report over the network. examples/agno-bindu/ exposes a completed report as a conversational Bindu A2A agent — ask it for P0 counts, domain risks, or the exact cited clause. Community-contributed example; not affiliated with or endorsed by the maintainers.

Customize the Agents (no code required)

Inspect, audit, and tailor each specialist's persona, focus areas, and severity calibration — by editing markdown, not Python. Safety rules can never be removed.

bash
dd-agents agents list                          # See every specialist and its status
dd-agents agents describe --agent legal        # Read an agent's persona + safety floor
dd-agents agents validate ./my-project         # Lint your dd-config/ customizations
dd-agents agents preview --agent legal --project-dir ./my-project  # Exact assembled prompt

Drop a dd-config/agents/legal.md next to your deal config to override personas, add focus areas, or adjust severity — optionally inheriting a bundled deal-type profile (saas, regulated-fintech, …). See Agent Customization.

Quick Start

Prerequisites: Python 3.12+ and an Anthropic API key.

bash
# 1. Install
pip install 'dd-agents[pdf]'

# 2. Set your API key
export ANTHROPIC_API_KEY="sk-ant-..."

# 3. Generate a deal config (AI scans the data room and infers entity aliases, focus areas)
dd-agents auto-config "Buyer Corp" "Target Inc" --data-room ./data_room

# 4. (Optional) Pre-flight: verify provider/model routing + validate the config
dd-agents doctor --config deal-config.json

# 5. Run the analysis
dd-agents run deal-config.json
bash
git clone https://github.com/zoharbabin/due-diligence-agents.git
cd due-diligence-agents
pip install -e ".[dev,pdf]"

Output appears at {data_room_path}/_dd/forensic-dd/runs/latest/report/dd_report.html — open it in your browser.

No API key yet? Generate a config without any API calls: dd-agents init --data-room ./data_room

json
{
  "config_version": "1.0.0",
  "buyer": { "name": "Acme Corp" },
  "target": { "name": "Target Inc" },
  "deal": { "type": "acquisition", "focus_areas": ["change_of_control", "ip_ownership"] },
  "data_room": { "path": "./data_room" }
}

deal.focus_areas must list at least one area. Everything else (entity_aliases, judge, execution, buyer_strategy, etc.) is optional and enhances analysis when provided. See Deal Configuration for the full schema.

See the Getting Started guide for a complete walkthrough with the included sample data room.

Environment variable (temporary):

bash
export ANTHROPIC_API_KEY="sk-ant-..."

.env file (persistent, recommended):

bash
cp .env.example .env
# Edit .env and add your key

AWS Bedrock (if you use AWS):

bash
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_PROFILE=default
export AWS_REGION=us-east-1

Any model — no vendor lock-in. dd-agents is provider- and model-agnostic by env config (no code change): Anthropic API, your own AWS Bedrock or Google Vertex AI account, or any model (GPT, Gemini, DeepSeek, local) behind an Anthropic-compatible gateway. Verify your setup with dd-agents doctor. See Model Providers.

Organize contracts into folders by subject or counterparty:

data_room/
  SubjectGroup_A/
    Acme_Corp/
      master_agreement.pdf
      amendment_2024.pdf
    Beta_Inc/
      license_agreement.pdf
  SubjectGroup_B/
    Gamma_LLC/
      services_contract.docx
  _reference/                    # Optional: buyer overview, customer database, etc.
    buyer_overview.pdf

Supports PDFs, Word, Excel, PowerPoint, and images. Scanned PDFs are handled via OCR.

How It Works

  Data Room (PDFs, Word, Excel, Images)
       │
       ▼
  ┌─────────────────────────────────────┐
  │        Python Orchestrator          │
  │         38-step pipeline            │
  │       5 blocking quality gates      │
  └──────────────┬──────────────────────┘
                 │
    ┌────────────┼────────────┐
    │            │            │
    ▼            ▼            ▼
 ┌──────┐  ┌────────┐  ┌──────────┐  ┌──────────┐  ┌─────────────┐
 │Legal │  │Finance │  │Commercial│  │ProductTech│ │Cybersecurity│
 │Agent │  │ Agent  │  │  Agent   │  │  Agent   │  │   Agent     │
 └──┬───┘  └───┬────┘  └────┬─────┘  └────┬─────┘  └──────┬──────┘
    │          │            │             │               │
 ┌──┴──┐  ┌────────┐  ┌─────┴──────┐  ┌───┴──┐    ┌───────┴─────┐
 │ HR  │  │  Tax   │  │ Regulatory │  │ ESG  │    │  + External │
 │Agent│  │ Agent  │  │   Agent    │  │Agent │    │   Agents    │
 └──┬──┘  └───┬────┘  └──────┬─────┘  └───┬──┘    └───────┬─────┘
    │         │              │            │               │
    └─────────┴───────┬──────┴────────────┴───────────────┘
                      │
              ┌───────▼────────┐
              │  Cross-Domain  │  ← Symbolic trigger rules detect
              │   Analysis     │    inter-domain dependencies
              └───────┬────────┘
                      │
              ┌───────▼────────┐
              │  Judge Agent   │  ← Validates findings
              │  (optional)    │
              └───────┬────────┘
                      │
              ┌───────▼────────┐
              │  Merge & Audit │  ← Dedup, numerical checks,
              │  31 QA checks  │    citation verification
              └───────┬────────┘
                      │
              ┌───────▼────────┐
              │   Executive    │  ← Severity calibration,
              │   Synthesis    │    Go/No-Go signal
              └───────┬────────┘
                      │
                      ▼
            HTML + Excel + JSON

The 13 agents

9 domain specialists analyze every document in parallel — each owns a domain and traces findings to exact citations (see What Gets Analyzed for per-domain focus areas):

#SpecialistOwns
1LegalChange of control, anti-assignment, termination, IP ownership, indemnification, liability caps
2FinanceRevenue cross-referencing, unit economics (CAC/LTV/NRR), cost structure, projections
3CommercialRenewal mechanics, customer concentration, SLAs, pricing models, MFN clauses
4ProductTechDPAs, security certifications, technical SLAs, integration & migration complexity
5CybersecuritySecurity governance, incident history, vulnerability management, disaster recovery
6HRCompensation, key-talent retention, labor compliance, workforce classification
7TaxTransfer pricing, NOL/tax attributes, deal structure, income-tax compliance
8RegulatoryLicense transferability, antitrust, data-privacy regulation, AML/sanctions
9ESGEnvironmental contamination, climate/carbon risk, supply-chain sustainability

4 orchestration & synthesis agents turn raw findings into a decision:

#AgentRole
10JudgeAdversarially spot-checks specialist findings for quality and consistency
11Executive SynthesisCalibrates severity across domains and produces the Go/No-Go signal
12Red Flag ScannerFast GREEN/YELLOW/RED triage pass (run --quick-scan)
13Acquirer IntelligenceMaps findings to the buyer's investment thesis (when configured)

That's 13 AI agents in total. Specialists are config-driven — enable/disable per deal via deal-config.json — and external specialists can be added via pip entry-points without modifying core code.

Built-in deep-dive lenses (not separate agents): three specialists carry extra focus areas that act as deeper passes within their domain — Insurance (within Finance), Operations (within Commercial), and IP Deep / freedom-to-operate (within Legal). They surface as their own categories in the report but run inside the parent specialist, so they don't add to the agent count.

The pipeline halts on quality failures rather than producing unreliable output. Runs can be resumed from any step.

Security & Privacy

  • Local execution — all analysis runs on your machine. Documents only leave your machine as API calls to your configured LLM endpoint — Anthropic API, AWS Bedrock, Google Vertex AI, or an Anthropic-compatible gateway you point it at. See Model Providers.
  • No telemetry — the tool does not phone home, collect usage data, or send analytics anywhere.
  • Read-only — the tool never modifies files in your data room. Output is written to a separate _dd/ directory.
  • No persistent credentials — API keys are read from environment variables or .env files, never stored in output artifacts.

See SECURITY.md for the full security policy, vulnerability reporting, and data handling details.

What Gets Analyzed

DomainFocus Areas
LegalChange of control (5 subtypes), anti-assignment, termination clauses, IP ownership, IP portfolio strength, freedom to operate, data privacy, indemnification, liability caps, warranty, dispute resolution, governance graph construction
FinanceRevenue cross-referencing (flags >5% ARR mismatch), revenue decomposition, unit economics (CAC/LTV/NRR/GRR), pricing compliance, cost structure, financial projections, insurance program analysis
CommercialRenewal mechanics, churn risk, SLA commitments, volume commitments, customer segmentation (flags >30% concentration), pricing models, MFN clauses, competitive positioning, supply chain risk, operational capacity
ProductTechDPA analysis, security certifications (SOC2/ISO27001), technical SLAs, integration requirements, data portability, migration complexity, technical debt, vendor lock-in
CybersecuritySecurity governance, incident history, vulnerability management, identity & access, network infrastructure, data protection, third-party risk, disaster recovery, compliance certifications, cyber insurance
HRWorkforce composition, compensation analysis, benefits liabilities, key talent retention, organizational structure, labor compliance, union/collective bargaining, culture integration, succession planning, workforce classification
TaxIncome tax compliance, transfer pricing, NOL/tax attributes, sales & use tax, international tax, deal structure tax, tax provisions, tax controversy, employee tax, indirect tax
RegulatoryLicense transferability, antitrust/competition, data privacy regulation, financial regulation, healthcare regulation, AML/sanctions, government contracts, environmental regulation, consumer protection
ESGEnvironmental contamination, environmental permits, climate/carbon risk, hazardous materials, supply chain sustainability, ESG governance, social impact, ESG disclosure, biodiversity/land use, circular economy

Pipeline Output

_dd/forensic-dd/
  index/text/                     # Extracted document text (cached across runs)
  inventory/                      # File discovery and company registry
  runs/
    latest/                       # Always points to the most recent run
      findings/
        legal/                    # Per-subject findings from each agent
        finance/
        commercial/
        producttech/
        merged/                   # Deduplicated cross-domain findings
      report/
        dd_report.html            # Interactive HTML report
        dd_report.xlsx            # 16-sheet Excel report
      audit.json                  # 31 quality validation checks
      numerical_manifest.json     # Every financial figure traced to source
      metadata.json               # Run metadata and API costs
  knowledge/                      # Deal Knowledge Base (compounds across runs)
    articles/                     # Structured knowledge articles
    chronicle.jsonl               # Append-only timeline of all events
    graph.json                    # Cross-reference knowledge graph
  entity_resolution_cache.json    # Company name matching (reused across runs)

Installation

bash
pip install 'dd-agents[pdf]'      # Recommended (includes PDF extraction via pymupdf)
bash
# macOS (Homebrew)
brew install zoharbabin/due-diligence-agents/dd-agents

# Docker
docker pull zoharbabin/due-diligence-agents:latest

# Extras
pip install dd-agents           # Core only (no PDF extraction)
pip install 'dd-agents[vector]'   # + semantic search via ChromaDB
pip install 'dd-agents[ocr]'      # + OCR for scanned documents (English)
pip install 'dd-agents[glm-ocr]'  # + multilingual OCR (100+ languages, Apple Silicon)
DependencymacOSLinuxPurpose
popplerbrew install popplerapt install poppler-utilsFallback PDF extraction
tesseractbrew install tesseractapt install tesseract-ocrOCR for scanned PDFs

These are optional — the tool works without them but may produce lower-quality text from some scanned documents.

bash
# Pre-built image (recommended)
docker pull zoharbabin/due-diligence-agents:latest
docker run -e ANTHROPIC_API_KEY="sk-ant-..." \
  -v ./data_room:/workspace/data_room \
  -v ./deal-config.json:/workspace/deal-config.json \
  zoharbabin/due-diligence-agents run deal-config.json

# Or build from source
docker build -t dd-agents .
docker run -e ANTHROPIC_API_KEY="sk-ant-..." \
  -v ./data_room:/workspace/data_room \
  -v ./deal-config.json:/workspace/deal-config.json \
  dd-agents run deal-config.json

Licensing

All core dependencies use permissive open-source licenses (Apache 2.0, MIT, BSD). The optional [pdf] extra installs pymupdf, which is AGPL-3.0 licensed — if you redistribute software that bundles pymupdf, AGPL copyleft terms apply to your distribution. Using it internally or as a tool does not trigger copyleft.

Documentation

GuideDescription
Getting StartedInstallation, first run with sample data room
Deal ConfigurationConfig file structure, auto-generation
Running the PipelineExecution modes, resume, quality gates
Reading the ReportNavigating the HTML and Excel output
CLI ReferenceComplete command reference
TroubleshootingCommon errors, exit codes, recovery steps
Search GuideContract search for legal teams
Agent CustomizationTailor agent personas, focus areas, and severity (no code)
Bindu A2A agent (community example)Serve a completed report as a conversational agent over the A2A protocol

Contributing

See CONTRIBUTING.md for development setup, code style, and PR process.

Press & Coverage

Star History

If this project is useful to you, consider giving it a star — it helps others discover it.

Star History Chart

License

Apache 2.0. See LICENSE.

将 dd-agents MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 dd-agents 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 dd-agents 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 dd-agents MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "due-diligence-agents": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 dd-agents MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 dd-agents MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 dd-agents 帮我完成这项任务吗?
dd-agents
当然,我看过了。
以下是我使用 dd-agents 得到的结果。

常见问题

dd-agents MCP 服务器有什么用途?

dd-agents 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 dd-agents MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 dd-agents。

为什么在 TypingMind 中使用 dd-agents MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 dd-agents 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 dd-agents MCP 连接到 TypingMind?

dd-agents 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

dd-agents MCP 在 TypingMind 中提供哪些工具?

dd-agents 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 dd-agents MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 dd-agents 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇