AI

ai-berkshire

11,503PythonSpecialized Agent Framework

AI value investing research framework built for Claude Code / Codex with multi-agent adversarial analysis.

PythonInvestment ResearchValue InvestingMulti-AgentFinancial Analysis

Overview

ai-berkshire is an open-source investment research framework built for Claude Code and Codex, implementing a multi-agent adversarial analysis system inspired by the investment philosophies of Warren Buffett, Charlie Munger, and Li Lu. It generates structured investment memos through collaborative and adversarial agent debates, covering moat analysis, management quality evaluation, financial health scoring, and margin-of-safety calculations.

Features

  • Multi-agent adversarial analysis with bull/bear/neutral debates
  • Moat analysis framework using Buffett-Munger criteria
  • Management quality scoring and capital allocation analysis
  • Financial health assessment with ROE/ROIC trends
  • Margin of safety calculator with multiple methodologies
  • Structured investment memo output (PDF-ready)

Installation

git clone https://github.com/xbtlin/ai-berkshire

Pros

  • +Domain-specific expertise for investment research
  • +Multi-agent adversarial approach reduces bias
  • +Structured, repeatable investment memo generation
  • +Rapid community adoption (11.5K+ stars)

Cons

  • Requires deep investment domain knowledge to interpret effectively
  • Depends on Claude Code / Codex ecosystem
  • Results quality heavily depends on underlying model capability

Alternatives

Documentation

ai-berkshire

Overview

ai-berkshire is an open-source investment research framework built for Claude Code and Codex, implementing a multi-agent adversarial analysis system inspired by the investment philosophies of Warren Buffett, Charlie Munger, and Li Lu. It generates structured investment memos through collaborative and adversarial agent debates, covering moat analysis, management quality evaluation, financial health scoring, and margin-of-safety calculations. With 11,500+ GitHub stars, it represents the growing trend of domain-specific agent frameworks.

Features

  • Multi-agent adversarial analysis — agents take bull/bear/neutral positions and debate investment theses
  • Moat analysis framework — evaluates competitive advantages using Buffett-Munger criteria
  • Management quality scoring — capital allocation history, incentive alignment, track record
  • Financial health assessment — ROE/ROIC trends, debt structure, free cash flow durability
  • Margin of safety calculator — intrinsic value estimation with multiple methodologies
  • Structured investment memo output — PDF-ready reports with citations and data sources
  • Claude Code + Codex native — optimized for agentic coding environments
  • MIT license

Installation

git clone https://github.com/xbtlin/ai-berkshire
cd ai-berkshire

Quick Start

# Run a full investment analysis on a stock
claude code --input "Analyze Apple Inc. (AAPL) using ai-berkshire framework"

# Or run a specific analysis module
claude code --input "Run moat analysis on Berkshire Hathaway (BRK.B)"

Core Concepts

  • Adversarial Debate — Multiple agents take opposing positions on an investment thesis, ensuring balanced analysis
  • Moat Analysis — Systematic evaluation of competitive advantages, switching costs, network effects, and intangible assets
  • Margin of Safety — Conservative valuation with multiple methodologies to estimate intrinsic value range

Pros

  • ✅ Domain-specific expertise for investment research
  • ✅ Multi-agent adversarial approach reduces confirmation bias
  • ✅ Structured, repeatable investment memo generation
  • ✅ Rapid community adoption (11.5K+ stars)

Cons

  • ❌ Requires deep investment domain knowledge to interpret results
  • ❌ Depends on Claude Code / Codex ecosystem
  • ❌ Results quality heavily depends on underlying model capability
  • ❌ Output is research assistance, not financial advice

When to Use

ai-berkshire is ideal for value investors and financial analysts who want to leverage AI agents for structured, repeatable investment research. Use it when you need a second opinion on an investment thesis, want to systematically evaluate a company's competitive advantages, or need to generate comprehensive investment memos at scale.

Resources