AI Berkshire Explained: Turning Claude Code and Codex into a Disciplined Investment Research Team
A practical breakdown of AI Berkshire: a multi-agent value investing framework with structured skills, bias guards, and financial rigor tooling.

TLDR
Quick Answer Box (Google Search Featured Snippet):
- What is AI Berkshire? An open-source multi-agent investment research framework that models the value investing philosophies of Warren Buffett, Charlie Munger, Duan Yongping, and Li Lu into reusable skills and CLI agents for Claude Code and Codex.
- How does it prevent AI investment hallucinations? It enforces strict process discipline: financial statement cross-checking, bias guards, red-team devils advocate debates, and explicit quantitative scoring instead of generic financial advice.
- Practical Value: Automates multi-perspective corporate 10-K filings analysis, competitive moat evaluation, and margin of safety calculations in minutes.
- Official Repository: ai-berkshire on GitHub.
AI Berkshire is an open-source investment research framework that packages value-investing workflows as reusable AI skills for Claude Code and Codex.
- What it solves: Generic AI analysis is often vague and inconsistent; AI Berkshire enforces structured outputs and explicit decisions.
- Why it matters: It introduces process discipline, cross-checking, and reproducibility for investment research.
- Core idea: Four-investor perspective system (Buffett, Munger, Duan Yongping, Li Lu) plus multi-agent execution.
- Best for: Users who want a repeatable workflow for company research, portfolio reviews, and thesis tracking.
Beginner Map
The 3-Minute Fast Path: Run Your First Value Investing Audit
To audit a company using the 4-investor agent committee:
- Install Skills: Add AI Berkshire value-investing skill packs into your Claude Code or Codex agent setup.
- Select Ticker: Specify a target company ticker (e.g.,
AAPL,MSFT) and load latest SEC 10-K/10-Q financial data via financial MCP tools. - Trigger Multi-Agent Committee: Run the 4-investor evaluation debate (Buffett on moat, Munger on risk inversion, Duan on business simplicity, Li Lu on valuation).
- Export Thesis: Review the generated investment thesis memo with explicit margin-of-safety scores and conviction ratings.
If you are a student or totally new to this topic, read this post in three passes:
- Start with the Mental Model section to understand the big idea first.
- Move to Investigation to see how the repository works in practice.
- End at Resolution and try one tiny setup step to make the learning stick.
The goal is simple: you should finish this article knowing what problem the repo solves, when to use it, and how to start without confusion.
Student First Assignment
Pick one tiny task from this repo and finish it in under 45 minutes. Example: run one command, observe output, write down 3 things you learned, and 1 thing you still do not understand.
This method helps you move from passive reading to active engineering practice quickly.
Part 1: Foundations - The Mental Model
Most AI investment prompts fail in one of two ways:
- They sound smart but end with “it depends.”
- They produce different structure and depth every time.
AI Berkshire treats this as a workflow problem, not a prompt-wording problem.
Instead of asking one model for one long answer, it defines a research operating system:
- A fixed set of specialized skills (deep research, earnings review, funnel screening, portfolio management).
- Explicit decision outputs (pass / fail / gray zone) with price ranges and assumptions.
- A built-in anti-bias checklist that prefers “unknown” over fake certainty.
If you think of normal AI chat as “one analyst brainstorming out loud,” AI Berkshire is closer to “a small investment committee following a playbook.”
Part 2: The Investigation - How the Framework Works
1. Skill layer: 20 scenario-specific commands
The repo organizes workflows into distinct skills such as:
/investment-research/investment-team/earnings-review/industry-funnel/quality-screen/portfolio-review/thesis-tracker
This removes ambiguity. You pick the workflow first, then run analysis.
2. Agent layer: solo and team modes
Single-agent skills run a strict analysis sequence. Team skills orchestrate multiple agents in parallel to compare viewpoints before synthesis.
That design reduces single-path reasoning errors and surfaces disagreement earlier.
3. Tool layer: financial rigor and verification
The project ships a tooling module (tools/financial_rigor.py) for:
- market-cap checks (
price x shares) - valuation sanity checks
- multi-source cross-validation
- scenario calculations with precise decimal arithmetic
This is important: numeric mistakes are among the easiest ways AI reports fail silently.
Part 3: The Diagnosis - What Makes It Different from “Just Ask AI”
Structured conclusions, not diplomatic essays
AI Berkshire forces judgment with constrained outputs and rationale. You can compare reports over time because format and criteria stay stable.
Multi-perspective tension by design
The framework intentionally creates conflict between lenses:
- value vs certainty
- moat vs disruption risk
- valuation cheapness vs long-term survivability
That tension is exactly what many one-shot prompts miss.
Reproducibility and process auditability
Because the workflow is explicit, teams can re-run the same analysis later and inspect what changed: assumptions, inputs, or market conditions.
Part 4: The Resolution - Getting Started Quickly
- Clone the repository:
git clone https://github.com/xbtlin/ai-berkshire.git
cd ai-berkshire
- Install your client path:
- Claude Code users install command files via project scripts.
- Codex users install generated skills (and optional slash prompts) via project scripts.
- Start with a lightweight workflow first:
/quality-screen <company>
/news-pulse <ticker>
- Escalate to deep research only when warranted:
/investment-research <company>
/investment-team <company>
This “funnel-first, deep-later” usage pattern is the practical way to control token cost while preserving analysis quality.
AI Berkshire Frequently Asked Questions (FAQ)
1. What is AI Berkshire and how does it work?
AI Berkshire is an open-source research automation framework (xbtlin/ai-berkshire) that packages value-investing workflows into reusable AI skills for Claude Code and Codex. Instead of asking an LLM for single-prompt opinions, it deploys a multi-perspective team of specialized agent roles (inspired by Warren Buffett, Charlie Munger, Duan Yongping, and Li Lu) to conduct structured financial analysis, moat evaluation, and risk checks.
2. How to install AI Berkshire in Claude Code and Codex?
Clone the repository (git clone https://github.com/xbtlin/ai-berkshire.git) and run the setup scripts to link commands into Claude Code (/investment-research, /quality-screen) or generate native skill directories for Codex.
3. How does it prevent AI hallucinations in financial valuation?
AI Berkshire enforces an explicit anti-bias checklist: it separates verifiable numerical facts from subjective forecasts, flags missing historical data as “unknown” rather than inventing numbers, and requires multi-agent cross-examination before reaching an investment thesis.
Related Autonomous AI Agent Architectures
To build and scale robust multi-agent workflows, explore these foundational deep dives:
- Pi Mono Explained: Autonomous AI Coding Agent Architecture: Discover how deterministic execution loops and working memory govern autonomous software agents.
- ADHD Coding Agent: Focus Automation & Multi-Step Memory: Enforce concise, zero-fluff cognitive discipline across Claude Code and Cursor.
- Omniroute: Dynamic LLM Routing & Traffic Management: Route agent queries dynamically across LLM providers to minimize latency and token expenses.
Final Mental Model
AI Berkshire is not a stock-picking bot. It is a discipline engine for AI-assisted investment research.
If your current process is “ask AI and hope,” this framework upgrades it to “run a repeatable method, verify numbers, and make explicit decisions with clear uncertainty boundaries.”
Disclaimer: This post summarizes an open-source framework and is not investment advice.
Related posts
What is OmniRoute? Free AI Gateway for 290+ Providers with Auto-Fallback
What is OmniRoute and is it safe? Explore the open-source AI gateway uniting 290+ providers, dynamic routing fallback, token compression, and MCP agent control.
Superpowers: The Workflow That Teaches AI Agents Discipline
Superpowers makes coding agents slow down, ask questions, write plans, and test first. The result is less flashy AI code, but much more trustworthy code.
Stop Context Rot: How Get Shit Done Powers the Ultimate 10x Agentic Engine
A deep dive into GSD (Get Shit Done), a powerful meta-prompting and context-engineering system that averts AI context rot for Claude, Gemini, and general AI agents.
Context Engineering: The Discipline That Separates Good AI Agents from Great Ones
Open-source toolkit for Context Engineering that teaches AI agents to pull only the context they need - cited in academic research.