DEV.co
AI Frameworks · xbtlin

ai-berkshire

AI Berkshire is a Python-based investment research framework that combines Claude/Codex with value investing methodologies from four masters (Buffett, Munger, Duan Yongping, Li Lu). It provides 19 structured skills for deep company analysis, financial review, industry screening, and portfolio management, outputting actionable investment decisions rather than balanced commentary.

Source: GitHub — github.com/xbtlin/ai-berkshire
11.7k
GitHub stars
1.5k
Forks
Python
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryxbtlin/ai-berkshire
Ownerxbtlin
Primary languagePython
LicenseMIT — OSI-approved
Stars11.7k
Forks1.5k
Open issues12
Latest releasev1.0.0 (2026-04-07)
Last updated2026-07-07
Sourcehttps://github.com/xbtlin/ai-berkshire

What ai-berkshire is

Multi-agent system with Team Lead orchestration of parallel analyst agents, built on Claude Code/Codex for API calls and web search. Uses decimal-precise financial calculations, cross-validates data across independent sources, and implements structured output templates with consistency guarantees across multiple equity analyses.

Quickstart

Get the ai-berkshire source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/xbtlin/ai-berkshire.gitcd ai-berkshire# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Deep equity research for high-stakes investment decisions

The framework enforces decision conclusions (buy/pass/gray area) with price targets and tiered strategies, forcing analytical clarity beyond typical LLM hedging. Four independent master perspectives surface real analytical tensions.

Systematic portfolio management and thesis tracking

Skills like `/thesis-tracker` and `/thesis-drift` enable disciplined monitoring post-acquisition, detecting thesis invalidation or market-driven changes. `/portfolio-review` handles allocation and rebalancing at scale.

Industry and supply-chain opportunity hunting

Multi-skill workflow (`/industry-funnel` → `/quality-screen` → `/bottleneck-hunter`) identifies structural bottlenecks and undervalued segments within sectors, moving beyond single-company analysis.

Implementation considerations

  • Install requires Python environment and git cloning; choose between Claude Code or Codex client integration via provided shell/batch scripts.
  • Each deep research skill (`/investment-research`, `/investment-team`) incurs high token consumption; author recommends using strongest available model and filtering upstream with `/quality-screen` to avoid wasteful analysis.
  • Manual data entry and cross-verification required; framework validates but does not auto-fetch live financial data. Precision uses Python `decimal.Decimal` to avoid float errors.
  • Output consistency requires strict adherence to structured templates and scoring rubrics; deviations from established prompts risk losing the systematic advantage.
  • Real-world performance claims (2024: +69.29%, 2025: +66.38%) are from single account. Cannot be generalized; framework quality depends heavily on practitioner judgment and market conditions.

When to avoid it — and what to weigh

  • You need real-time market data or broker integration — Framework relies on web search and manual data input. No direct feed from exchanges, real-time pricing APIs, or order execution. Requires manual lifting of ticker symbols, market cap, and current prices.
  • Your investment thesis depends on proprietary financial models or backtesting — Designed for qualitative value judgments and structured research, not quantitative factor modeling or historical performance simulation. No built-in backtesting engine.
  • You operate in highly illiquid or OTC markets — Framework assumes publicly available information and company disclosures. Less effective for private equity, derivatives, or micro-cap securities with minimal coverage.
  • You cannot tolerate high token costs during research — Multi-agent parallel analysis and cross-validation incur significant API spend. Framework prioritizes analytical depth over token efficiency. Use lighter skills (`/quality-screen`, `/news-pulse`) for cost control.

License & commercial use

MIT License. Permits commercial use, modification, and distribution with minimal restrictions. Requires attribution and license inclusion in derivative work.

MIT is a permissive OSI license and explicitly allows commercial use. However, framework outputs are research opinions/analyses, not legal or financial advice. User assumes all liability for investment decisions made using framework outputs. No warranty is provided. Recommend consulting licensed financial advisors before deploying in client-facing advisory services.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Framework sends company names, financial data, and analysis prompts to Claude/Codex APIs. No local-only mode. Users should treat sensitive portfolio data accordingly. Uses `decimal.Decimal` for calculations (mitigates float precision attacks but not injection risks). No audit trail or data retention guarantees from third-party LLM providers. CLI permission model in Claude Code can be bypassed with `--dangerously-skip-permissions` flag—use only in trusted environments.

Alternatives to consider

Manual research + spreadsheet modeling

Full control over data sources, no API costs, no LLM risk. But requires deep domain expertise, consumes weeks per company, and produces inconsistent output across analyses.

Roboadviser platforms (e.g., Wealthfront, Betterment) + factor-based ETFs

Fully automated, low cost, tax-optimized rebalancing. But passive indexing and minimal active thesis development; not suitable for concentrated value portfolios or deep fundamental research.

Institutional research platforms (e.g., FactSet, Refinitiv, Bloomberg Terminal)

Integrated real-time data, professional analyst models, regulatory compliance. But $500K–$1M+ annual cost; overkill for individual investors or small teams.

Software development agency

Build on ai-berkshire with DEV.co software developers

Install AI Berkshire and explore 19 investment skills: deep company analysis, financial review, portfolio management, and industry screening. MIT licensed, active community, real-world track record.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

ai-berkshire FAQ

Can I use this framework to analyze private companies or pre-IPO startups?
Yes, skill `/private-company-research` is designed for information-sparse targets (Ant Financial, SpaceX). However, outputs will be lower confidence due to limited public disclosures. Framework relies on web search; very early stage startups may lack sufficient coverage.
Does the framework support non-Chinese stocks?
Yes. Framework is language/market agnostic and includes examples across Hong Kong, US (S&P 500, Nasdaq), and mainland China stocks. Topics mention China stocks, but architecture works for any publicly traded company with web-accessible information.
What happens if the LLM makes a calculation error in my analysis?
Framework enforces decimal-based arithmetic and requires 2-source data validation for key metrics (market cap, P/E). Cross-verification checks flag discrepancies >1%. However, you should always independently verify critical numbers before committing capital.
Can I integrate this with my brokerage account for live portfolio tracking?
Not out-of-the-box. Framework outputs are standalone reports. Integration requires custom code to parse skill outputs and push to broker APIs. Author has not published examples or templates for this integration.

Work with a software development agency

From first prototype to production, DEV.co delivers software development services around tools like ai-berkshire. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across ai frameworks and beyond.

Start Your AI-Powered Investment Research

Install AI Berkshire and explore 19 investment skills: deep company analysis, financial review, portfolio management, and industry screening. MIT licensed, active community, real-world track record.