Inspiration

Every loan comes down to one question: will they pay us back?

Before a fund like Diameter lends to a company, analysts comb through years of SEC filings and a 150-page credit agreement to answer it. When does the debt come due? What rules does the borrower have to follow? What breaks if business turns? Getting there takes days, and the answer often hinges on a single clause buried on page 87.

So we asked: what if a committee of AI agents did the first pass? They'd pull the numbers, read the contract, argue both sides, and cite every source, so a human could check the call in minutes instead of days.

What it does

Enter a ticker, and AI Credit Committee runs it like a fund's credit committee:

  • Financial Analyst pulls cash, cash flow, debt, and the debt schedule from SEC EDGAR
  • Contract Analyst reads the credit agreement and pulls out the loan rules (covenants), quoting the clause
  • Bull argues to lend, and Bear argues not to
  • Committee Chair delivers the verdict: lend, don't lend, or lend with conditions

The dashboard shows the maturity wall (debt due each year vs. cash available) and each loan rule with pass/fail:

$$\text{Leverage} = \frac{\text{Total debt}}{\text{EBITDA}} \qquad \text{Interest coverage} = \frac{\text{EBITDA}}{\text{Interest expense}}$$

Two sliders stress-test the company: earnings decline and refinancing rate. Drag earnings down and rates up, and a covenant breaks. Re-run the committee and the verdict flips from "lend" to "don't lend." Click any rule to see the exact contract sentence it came from.

How we built it

  • Frontend: Next.js, TypeScript, Tailwind, shadcn/ui, Recharts
  • Backend: Python, FastAPI, Pydantic
  • Agents: LangGraph runs the two analysts in parallel, then Bull and Bear in parallel, then the Chair
  • LLM: Gemini with structured JSON output. The full credit agreement fits in context, so we skipped RAG.
  • Data: SEC EDGAR XBRL API for financials, and BeautifulSoup to parse the credit agreement
  • Live updates: Server-Sent Events, so you watch each agent finish in real time
  • Math in Python, not the LLM: sliders update instantly, and agents get the calculator's numbers and explain them, so the debate always matches the chart
  • Built with Claude Code: we tag-teamed across two accounts, using a shared CLAUDE.md and HANDOFF.md so each session picked up where the last left off

Challenges we ran into

  • Learning credit fast. Neither of us had worked in credit, so we built a fictional "Pizza Co." to learn leverage, coverage, and refinancing before touching real data.
  • SEC data is messy. Companies tag the same number differently, and some don't tag their debt schedule at all.
  • Finding the loan contract. Credit agreements are buried as exhibits in older filings.
  • LLMs are bad at arithmetic. We kept every calculation in Python and only let the agents reason about the results.
  • "EBITDA" isn't one number. Loan contracts define it with custom add-backs, so ours is an approximation.

Accomplishments that we're proud of

  • The verdict genuinely flips under stress, driven by real covenant thresholds
  • Every agent claim links back to a source
  • Five agents with distinct jobs, running in parallel and streaming live to the UI
  • We went from zero credit knowledge to explaining maturity walls and covenants in a weekend

What we learned

  • Credit investors care less about "is this company profitable?" and more about "can it refinance when its debt comes due?"
  • Agents work better with distinct inputs and jobs than as one giant prompt
  • Use deterministic code for math and LLMs for reading and arguing

What's next for AI Credit Committee

  • Auto-locate credit agreements for any ticker
  • Flag lender-protection loopholes (J.Crew, Serta, and Chewy blockers), a hot topic in distressed credit
  • Multi-year projections showing covenant headroom over time
  • A portfolio view that ranks which loans in a fund's book are closest to breaking a covenant

Built With

Share this project:

Updates

Submission history