Skip to content

fix(managed_agents): render outputs on docs site, retitle multiagent#600

Merged
markn-ant merged 1 commit into
mainfrom
mnowicki/managed-agents-render-fixes
May 6, 2026
Merged

fix(managed_agents): render outputs on docs site, retitle multiagent#600
markn-ant merged 1 commit into
mainfrom
mnowicki/managed-agents-render-fixes

Conversation

@markn-ant

Copy link
Copy Markdown
Contributor

Follow-up fixes to the multiagent and outcomes cookbooks (#599):

Rendering on the docs site. The docs site's notebook → MDX converter only renders stream outputs, not display_data with text/markdown. The review loop, final brief, and sales proposal cells all used display(Markdown(...)) and so showed empty output boxes on platform.claude.com. (This is a pre-existing pipeline gap — claude_agent_sdk/01_The_chief_of_staff_agent.ipynb has had the same break since Sept 2025.) Fix:

  • Review loop (outcomes §4) → print() with plain-text dividers; output converted to a single stream block
  • Brief and proposal extraction cells (outcomes §5, multiagent §5) → print the document structure (section headings, plus cited sources for the brief) rather than the full prose. Full prose was 8KB / 5KB of agent output sitting in a markdown cell next to the code, which blurred cookbook prose with model output. The structure shows the same thing more compactly: the rubric was followed (7 numbered sections + sources for the brief), and the specialists' work made it into the proposal (case studies under Proof, pricing under Investment).

Title normalization. # Building a Sales Proposal with a Heterogeneous Agent Team# Multiagent: coordinate a specialist team, and # Outcomes: Agents that verify their own work# Outcomes: agents that verify their own work, so both Feature: siblings use the same lowercase-after-colon convention. Same change in registry.yaml. URL slugs are path-derived so docs URLs are unchanged.

Public port of anthropics/claude-cookbooks-private#67.

- Retitle CMA_coordinate_specialist_team to "Multiagent: coordinate a
  specialist team" to match the Feature: pattern of sibling tutorials
- Lowercase the Outcomes title body ("Outcomes: agents that verify their
  own work") to keep both Feature: titles on the same convention
- Replace display(Markdown(...)) with print() in the review loop and
  brief/proposal extraction cells; the docs site does not render
  IPython rich-display output, so these cells appeared empty
- Show section structure / sources rather than full prose in the final
  cells to keep rendered output compact
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Notebook Changes

This PR modifies the following notebooks:

📓 managed_agents/CMA_coordinate_specialist_team.ipynb

View diff
nbdiff managed_agents/CMA_coordinate_specialist_team.ipynb (d28edf1735dc27f3f2d19d17d403b9200dd50934) managed_agents/CMA_coordinate_specialist_team.ipynb (250701efb635bf57543ba1d0756fe2ea373b0b35)
--- managed_agents/CMA_coordinate_specialist_team.ipynb (d28edf1735dc27f3f2d19d17d403b9200dd50934)  (no timestamp)
+++ managed_agents/CMA_coordinate_specialist_team.ipynb (250701efb635bf57543ba1d0756fe2ea373b0b35)  (no timestamp)
## modified /cells/0/source:
@@ -1,4 +1,4 @@
-# Building a Sales Proposal with a Heterogeneous Agent Team
+# Multiagent: coordinate a specialist team
 
 We'll use Claude Managed Agents and the multi-agent coordinator pattern to automate sales-proposal writing for a fictional company called Northstar, which sells a workflow-automation platform to mid-market operations teams.
 

## modified /cells/16/source:
@@ -1,3 +1,3 @@
 ## 5. Read the proposal
 
-Finally, let's render the assembled proposal. The coordinator wrote it to `proposal.md` with the `write` tool, so we'll find that event in the log and display it.
+Finally, let's pull the assembled proposal. The coordinator wrote it to `proposal.md` with the `write` tool, so we'll find that event in the log and look at the sections it produced. Print `proposal` itself if you want to read the full document.

## inserted before /cells/17/outputs/0:
+  output:
+    output_type: stream
+    name: stdout
+    text:
+      # Northstar Platform — Proposal for Meridian Health
+      ## Executive Summary
+      ## How We Help
+      ## Proof — Results from Healthcare Organizations Like Yours
+      ### St. Clair Health — Regional Hospital Network, 6,200 Employees
+      ### BlueRidge Health Plan — Regional Health Plan, 2,800 Employees
+      ## Investment — Three Options for 600 Seats, Heavy Usage
+      ## Next Steps

## deleted /cells/17/outputs/0:
-  output:
-    output_type: display_data
-    data:
-      text/markdown:
-        # Northstar Platform — Proposal for Meridian Health
-        
-        **Prepared for:** Meridian Health Leadership | **Date:** May 2026 | **Prepared by:** Northstar Sales Team
-        
-        ---
-        
-        ## Executive Summary
-        
-        Meridian Health is navigating the same pressures facing every regional health system today: tightening reimbursements, a workforce stretched thin by administrative burden, and a compliance landscape that just got harder with the 2026 HIPAA Security Rule overhaul. Meanwhile, hundreds of disconnected applications across your sites create manual hand-offs, slow down revenue cycle processes, and pull clinical and operations staff away from higher-value work.
-        
-        Northstar is a workflow automation platform built for exactly this moment. We help operations teams consolidate fragmented systems into streamlined, auditable workflows — reducing costs, accelerating cycle times, and giving staff hours back in their day. For a system of Meridian's size and complexity, the impact is measurable within weeks, not quarters.
-        
-        ---
-        
-        ## How We Help
-        
-        **Northstar Platform** is a workflow automation platform purpose-built for mid-market operations teams.
-        
-        | Capability | What It Means for Meridian |
-        |---|---|
-        | **Visual Process Builder** | Operations leads design and modify workflows without writing code — no IT bottleneck for every change. |
-        | **200+ SaaS Connectors** | Connect your EHR, billing, scheduling, credentialing, and communication tools into unified, automated flows. |
-        | **Role-Based Approvals** | Route decisions to the right person at the right level — critical for clinical and financial sign-offs. |
-        | **SOC 2 Type II Certified** | Enterprise-grade security posture aligned with HIPAA requirements and the incoming 2026 rule changes. |
-        
-        **Typical results across our customer base:** 40–60% reduction in manual ticket handling, with teams launching their first production workflow within 3 weeks of kickoff.
-        
-        ---
-        
-        ## Proof — Results from Healthcare Organizations Like Yours
-        
-        ### St. Clair Health — Regional Hospital Network, 6,200 Employees
-        
-        St. Clair Health used Northstar to consolidate credentialing and prior-authorization workflows from **11 fragmented systems into 3 automated end-to-end processes**.
-        
-        - **58% faster** prior-auth turnaround
-        - **$1.9M annual labor savings**
-        
-        St. Clair's profile — a regional hospital network managing complex, compliance-sensitive operations across multiple sites — closely mirrors Meridian's environment. Their results demonstrate what's possible when disconnected manual processes are replaced with governed, automated workflows.
-        
-        ### BlueRidge Health Plan — Regional Health Plan, 2,800 Employees
-        
-        BlueRidge deployed Northstar to automate claims-adjudication exception routing that had relied on email queues and heavy manual rework.
-        
-        - Manual rework rate dropped from **19% → 6%**
-        - Average claim resolution accelerated by **11 days**
-        
-        Faster claim resolution on the payer side translates directly to faster reimbursement for provider organizations like Meridian — and the admin-burden reduction story resonates across both sides of the healthcare ecosystem.
-        
-        ---
-        
-        ## Investment — Three Options for 600 Seats, Heavy Usage
-        
-        | | **Flexible (Monthly)** | **Standard (Annual)** | **Enterprise (Annual)** ★ |
-        |---|---|---|---|
-        | **Per seat/month** | $84.50 | $67.60 | $57.20 |
-        | **Platform fee** | — | — | $48,000/yr |
-        | **Year-one total** | **$608,400** | **$486,720** | **$459,840** |
-        | **Savings vs. monthly** | — | $121,680 (20%) | $148,560 (24%) |
-        | **Support** | Email/chat (business hrs) | Priority queue | Dedicated + named CSM |
-        | **Onboarding** | Standard | Standard | Enterprise workshops + workflow design |
-        | **Commitment** | None | 12-month | 12-month |
-        
-        > **★ Recommended:** The Enterprise tier is the best fit for a deployment of Meridian's scale. Despite the platform fee, the per-seat savings make it the lowest total cost — while adding a named Customer Success Manager to guide a complex, multi-site rollout across your 8,500-employee organization. For context, St. Clair Health runs on this tier.
-        
-        ---
-        
-        ## Next Steps
-        
-        1. **Discovery workshop (60 min)** — Map Meridian's top 2–3 workflow pain points with our solutions team.
-        2. **Pilot scope agreement** — Select one high-impact workflow (e.g., prior-auth, credentialing, or claims exception routing) for a 3-week proof-of-value.
-        3. **Business case review** — We'll model projected savings specific to Meridian's volume and current cost structure.
-        4. **Security & compliance review** — Our team will walk through SOC 2 documentation, BAA execution, and HIPAA alignment with your IT/security stakeholders.
-        
-        **Ready to start?** Let's schedule the discovery workshop. We'll come prepared with a draft workflow map based on what we've learned from St. Clair and other regional health systems.
-        
-        ---
-        
-        *Northstar Platform — Automate the work around the work.*
-      text/plain: <IPython.core.display.Markdown object>

## modified /cells/17/source:
@@ -1,10 +1,14 @@
-from IPython.display import Markdown, display
-
+proposal = ""
 for ev in client.beta.sessions.events.list(session.id, limit=1000, betas=BETAS):
     if (
         ev.type == "agent.tool_use"
         and ev.name == "write"
         and ev.input["file_path"].endswith("proposal.md")
     ):
-        display(Markdown(ev.input["content"]))
-        break
+        proposal = ev.input["content"]
+        break
+
+# Show the section structure rather than the full proposal.
+for line in proposal.splitlines():
+    if line.startswith("#"):
+        print(line)

📓 managed_agents/CMA_verify_with_outcome_grader.ipynb

View diff
nbdiff managed_agents/CMA_verify_with_outcome_grader.ipynb (d28edf1735dc27f3f2d19d17d403b9200dd50934) managed_agents/CMA_verify_with_outcome_grader.ipynb (250701efb635bf57543ba1d0756fe2ea373b0b35)
--- managed_agents/CMA_verify_with_outcome_grader.ipynb (d28edf1735dc27f3f2d19d17d403b9200dd50934)  (no timestamp)
+++ managed_agents/CMA_verify_with_outcome_grader.ipynb (250701efb635bf57543ba1d0756fe2ea373b0b35)  (no timestamp)
## modified /cells/0/source:
@@ -1,4 +1,4 @@
-# Outcomes: Agents that verify their own work
+# Outcomes: agents that verify their own work
 
 Agents are good at producing things that *look* done. Ask one for a cited research brief and you'll get a tidy document with footnotes. Look closer and there's usually room to improve: a topic gets thin coverage, a quote drifts from the source, a citation leans on a press release instead of the original filing. Catching those takes a manual review loop: you read the output, spot what's off, and prompt again. And most of what you say in those rounds is feedback you could have written down before the agent started.
 

## modified /cells/11/source:
@@ -1,10 +1,8 @@
-from IPython.display import Markdown, display
-
 HR = "━" * 46
 
 
 def banner(label, tag=""):
-    display(Markdown(f"**{HR}**  \n**{label}** &nbsp; {tag}"))
+    print(f"\n{HR}\n{label}  {tag}".rstrip())
 
 
 def render_feedback(fb: str):
@@ -17,4 +15,4 @@ def render_feedback(fb: str):
         flags=re.S,
     )
     s = re.sub(r"\n\nPlease revise your work.*$", "", s, flags=re.S)
-    display(Markdown(s))
+    print(s)

## inserted before /cells/12/outputs/0:
+  output:
+    output_type: stream
+    name: stdout
+    text:
+      
+      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+      writer · draft
+      searched/fetched 18× · wrote brief.md (7,607 chars)
+      
+      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+      grader · pass 0  ⟳ needs_revision
+      The brief covers 5 of 7 required topics adequately. Item 2 (Demand charges) fails the quantification bar: the brief describes demand charges qualitatively as the 'single largest operational wildcard' but never states a $/kW figure (McKinsey's footnote of $20/kW is never quoted in the text) or a % of operating cost. Item 5 (Named operator) fails the citation requirement: EVgo's Q1 2024 net loss of $28.2M is cited to evchargingstations.com [6], a third-party news article, not an SEC filing from sec.gov as the rubric explicitly requires. All 6 citations are LIVE, and all 6 quoted strings match the fetched pages and support the claims they are attached to — but [6] is the wrong source type for the Named Operator criterion.
+      
+      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+      writer · revision 1
+      searched/fetched 6× · wrote brief.md (7,989 chars)
+      
+      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+      grader · pass 1  ⟳ needs_revision
+      Six of seven coverage items are fully met: (1) capex range with hardware $45K–$100K and install $40K–$150K per charger; (2) demand charges quantified at $20/kW and $9,600/month for a 480kW station; (3) utilization breakeven at 20% vs. 7.5% national average; (4) NEVI Formula Program named with $5B allocation; (6) contrarian source—Great Plains Institute 'nearly all DCFC scenarios lose money' fully cited and live; (7) hardware vs. install cost split clearly broken out. All six citations fetch live, every quoted string matches exactly, and all citations support the claims they are attached to (6/6 verified). Item 5 (Named operator) fails the rubric's specific requirement: the rubric demands GAAP net income/loss from a 10-K or 10-Q, and the citation must be the SEC filing itself—not a press release. The brief cites EVgo's FY2024 GAAP net loss of $126.7M, but the citation [6] is an 8-K EX-99.1 (earnings press release exhibit), explicitly labelled '(8-K EX-99.1)' in the Sources section. The rubric specifically excludes press releases, and an 8-K EX-99.1 is precisely that—a press release filed with the SEC—not a 10-K or 10-Q annual/quarterly report.
+      
+      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+      writer · revision 2
+      searched/fetched 7× · wrote brief.md (7,989 chars)
+      
+      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+      grader · pass 2  ✓ satisfied
+      All 7 coverage items are fully met: (1) Capex range gives hardware $45K-$100K+ and installation $40K-$150K+ per charger, plus NEVI average $915,420/station. (2) Demand charges quantified at $20/kW (explicit $/kW figure) with $9,600/month example. (3) Utilization breakeven at 20% or $0.53/kWh threshold explicitly modeled. (4) NEVI and IRA Section 30C named as subsidy programs. (5) EVgo GAAP net loss of $126.7M for FY2024 cited from the SEC filing itself (sec.gov XBRL R4.htm), not a press release. (6) Great Plains Institute contrarian source cited with thesis that 'nearly all DCFC scenarios lose money.' (7) Hardware vs. install cost split explicitly broken out. All 6 citations are LIVE (URLs return readable pages), all quoted strings appear verbatim in the fetched pages, and all support the claims they are cited on.
+      
+      done: satisfied after 3 passes · 12m 56s

## deleted /cells/12/outputs/0-12:
-  output:
-    output_type: display_data
-    data:
-      text/markdown:
-        **━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**  
-        **writer · draft** &nbsp; 
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown: searched/fetched 18× · wrote `brief.md` (7,607 chars)
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown:
-        **━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**  
-        **grader · pass 0** &nbsp; ⟳ needs_revision
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown: The brief covers 5 of 7 required topics adequately. Item 2 (Demand charges) fails the quantification bar: the brief describes demand charges qualitatively as the 'single largest operational wildcard' but never states a $/kW figure (McKinsey's footnote of $20/kW is never quoted in the text) or a % of operating cost. Item 5 (Named operator) fails the citation requirement: EVgo's Q1 2024 net loss of $28.2M is cited to evchargingstations.com [6], a third-party news article, not an SEC filing from sec.gov as the rubric explicitly requires. All 6 citations are LIVE, and all 6 quoted strings match the fetched pages and support the claims they are attached to — but [6] is the wrong source type for the Named Operator criterion.
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown:
-        **━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**  
-        **writer · revision 1** &nbsp; 
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown: searched/fetched 6× · wrote `brief.md` (7,989 chars)
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown:
-        **━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**  
-        **grader · pass 1** &nbsp; ⟳ needs_revision
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown: Six of seven coverage items are fully met: (1) capex range with hardware $45K–$100K and install $40K–$150K per charger; (2) demand charges quantified at $20/kW and $9,600/month for a 480kW station; (3) utilization breakeven at 20% vs. 7.5% national average; (4) NEVI Formula Program named with $5B allocation; (6) contrarian source—Great Plains Institute 'nearly all DCFC scenarios lose money' fully cited and live; (7) hardware vs. install cost split clearly broken out. All six citations fetch live, every quoted string matches exactly, and all citations support the claims they are attached to (6/6 verified). Item 5 (Named operator) fails the rubric's specific requirement: the rubric demands GAAP net income/loss from a 10-K or 10-Q, and the citation must be the SEC filing itself—not a press release. The brief cites EVgo's FY2024 GAAP net loss of $126.7M, but the citation [6] is an 8-K EX-99.1 (earnings press release exhibit), explicitly labelled '(8-K EX-99.1)' in the Sources section. The rubric specifically excludes press releases, and an 8-K EX-99.1 is precisely that—a press release filed with the SEC—not a 10-K or 10-Q annual/quarterly report.
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown:
-        **━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**  
-        **writer · revision 2** &nbsp; 
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown: searched/fetched 7× · wrote `brief.md` (7,989 chars)
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown:
-        **━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━**  
-        **grader · pass 2** &nbsp; ✓ satisfied
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown: All 7 coverage items are fully met: (1) Capex range gives hardware $45K-$100K+ and installation $40K-$150K+ per charger, plus NEVI average $915,420/station. (2) Demand charges quantified at $20/kW (explicit $/kW figure) with $9,600/month example. (3) Utilization breakeven at 20% or $0.53/kWh threshold explicitly modeled. (4) NEVI and IRA Section 30C named as subsidy programs. (5) EVgo GAAP net loss of $126.7M for FY2024 cited from the SEC filing itself (sec.gov XBRL R4.htm), not a press release. (6) Great Plains Institute contrarian source cited with thesis that 'nearly all DCFC scenarios lose money.' (7) Hardware vs. install cost split explicitly broken out. All 6 citations are LIVE (URLs return readable pages), all quoted strings appear verbatim in the fetched pages, and all support the claims they are cited on.
-      text/plain: <IPython.core.display.Markdown object>
-  output:
-    output_type: display_data
-    data:
-      text/markdown: **done:** satisfied after 3 passes · 12m 56s
-      text/plain: <IPython.core.display.Markdown object>

## modified /cells/12/source:
@@ -11,9 +11,7 @@ with client.beta.sessions.events.stream(session.id, betas=BETAS) as stream:
                 last_len = len(ev.input["content"])
         elif ev.type == "span.outcome_evaluation_start":
             banner("writer · " + ("draft" if iters == 0 else f"revision {iters}"))
-            display(
-                Markdown(f"searched/fetched {n_search}× · wrote `brief.md` ({last_len:,} chars)")
-            )
+            print(f"searched/fetched {n_search}× · wrote brief.md ({last_len:,} chars)")
             n_search = 0
         elif ev.type == "span.outcome_evaluation_end":
             res = ev.result
@@ -27,4 +25,4 @@ with client.beta.sessions.events.stream(session.id, betas=BETAS) as stream:
                 break
 
 m, s = divmod(int(time.time() - t0), 60)
-display(Markdown(f"**done:** {res} after {iters} pass{'es' if iters != 1 else ''} · {m}m {s:02d}s"))
+print(f"\ndone: {res} after {iters} pass{'es' if iters != 1 else ''} · {m}m {s:02d}s")

## modified /cells/14/source:
@@ -1,3 +1,3 @@
 ## 5. Read the final brief
 
-Finally, let's pull the last version of `brief.md` the writer produced.
+Finally, let's pull the last version of `brief.md` the writer produced and look at what it covers and what it cited. Print `content` itself if you want to read the full prose.

## inserted before /cells/15/outputs/0:
+  output:
+    output_type: stream
+    name: stdout
+    text:
+      # Unit Economics of Public DC Fast Charging in the United States
+      ## 1. Capex Range
+      ## 2. Demand Charges
+      ## 3. Utilization Breakeven
+      ## 4. Subsidy Programs
+      ## 5. Named-Operator Economics
+      ## 6. Contrarian / Skeptical View
+      ## 7. Hardware vs. Installation Cost Split
+      ## Sources
+      [1] "A 150 to 350kW DCFC charging unit can cost anywhere from $45,000 to over $100,000, and installation costs can range from $40,000 to over $150,000." - Can public EV fast-charging stations be profitable in the United States? - https://www.mckinsey.com/features/mckinsey-center-for-future-mobility/our-insights/can-public-ev-fast-charging-stations-be-profitable-in-the-united-states
+      [2] "Waiving demand charges for fast chargers will shift costs to all ratepayers, including non-EV drivers." - Fast charging, high costs: Eliminating demand charges won't solve the problem - https://www.utilitydive.com/news/eliminating-demand-charges-wont-solve-EV-station-problems/689395/
+      [3] "the average total NEVI project cost is $915,420. The median total cost is $802,267" - NEVI DC Fast Charging Station Total Project Cost Averages $915,000 - https://www.paren.app/blog/nevi-dc-fast-charging-station-total-project-cost-averages-915-000
+      [4] "Today's economics and the average electric utility rates mean that nearly all DCFC scenarios lose money" - 'Nearly all' high voltage EV charging stations lose money: Report - https://www.utilitydive.com/news/nearly-all-high-voltage-ev-charging-stations-lose-money-report/561026/
+      [5] "apportions a total of $5 billion to States, D.C., and Puerto Rico over five years, from Fiscal Year 2022 through 2026" - Federal Funding Programs - https://www.transportation.gov/rural/ev/toolkit/ev-infrastructure-funding-and-financing/federal-funding-programs
+      [6] "Consolidated Statements of Operations - USD ($)$ in Thousands | 12 Months Ended Dec. 31, 2024 | Dec. 31, 2023" - EVgo Inc. Form 10-K, Consolidated Statements of Operations (XBRL), Period: 2024-12-31 - https://www.sec.gov/Archives/edgar/data/1821159/000155837025002400/R4.htm

## deleted /cells/15/outputs/0:
-  output:
-    output_type: display_data
-    data:
-      text/markdown:
-        # Unit Economics of Public DC Fast Charging in the United States
-        
-        *Research Brief — May 2026*
-        
-        ---
-        
-        ## 1. Capex Range
-        
-        Public DCFC is capital-intensive at every tier. A single 150–350 kW dispenser carries hardware costs of $45,000 to over $100,000, while installation alone—trenching, conduit, transformer work, concrete, permitting, and commissioning—adds $40,000 to over $150,000 per charger; grid-interconnection upgrades can push total project costs into the millions [1]. Real-world NEVI program data corroborate these figures: Paren's analysis of 330 winning state award applications shows an average total project cost of $915,420 per station, with a mean per-port figure of $192,614 [3]. Site variance is extreme—from a $132,480 Wisconsin highway stop to a $3.6 million Hawaii battery-storage installation [3].
-        
-        ## 2. Demand Charges
-        
-        Demand charges are the defining structural cost risk in DCFC economics. Utilities bill commercial customers on the peak 15-minute power draw in any billing cycle; a multi-vehicle simultaneous charge at a 150–350 kW station can produce a punishing spike that prices the entire month. NEVI corridor sites must deliver a minimum of 600 kW aggregate, compounding the exposure [2]. McKinsey modeled demand charges at $20 per kilowatt, with a four-charger station's 480 kW peak demand generating roughly $9,600 per month in demand costs alone—a figure that can dwarf energy charges at low utilization [1]. At some low-utilization sites, demand charges can account for over 90% of the total monthly electricity bill because the charge is levied on a single peak occurrence, not on aggregate energy consumed [4]. Some operators turn to battery storage or software-based peak-shaving; PG&E reported that load-management technologies reduced station power draw by more than 50%, saving $30,000–$200,000 per site in avoided infrastructure costs [2].
-        
-        ## 3. Utilization Breakeven
-        
-        McKinsey modeled a prototypical four-charger, 150 kW California station at 15% utilization (≈7 sessions/day): annual revenues of $265,000–$285,000 at $0.45/kWh, but operating costs of $220,000–$250,000 plus roughly $90,000 in annual capex depreciation, yielding an EBIT loss of $40,000–$50,000 [1]. The operator reaches breakeven only by raising utilization to 20% or lifting price to $0.53/kWh [1]. The 2022 national average utilization was approximately 7.5%—roughly half the modeled breakeven threshold [1]. Ancillary retail revenue narrows the gap: the same model finds that $12,000 in in-store spend could alone tip the station to breakeven [1].
-        
-        ## 4. Subsidy Programs
-        
-        Three federal mechanisms dominate:
-        
-        - **NEVI Formula Program**: $5 billion allocated to states, D.C., and Puerto Rico from FY 2022 through 2026, covering up to 80% of eligible project costs for corridor DCFC every 50 miles [5]. An additional $2.5 billion Charging and Fueling Infrastructure discretionary grant program targets communities and corridors [5]. Note: NEVI disbursements were paused by executive order in January 2025 and remain subject to active litigation.
-        - **IRA Section 30C Tax Credit**: 30% of project cost, capped at $100,000 per unit, for equipment installed in census tracts with a poverty rate ≥20% or median family income <80% of state median, through December 2032 [5].
-        - **Utility Make-Ready Programs**: Several large utilities (PG&E, SDG&E, Xcel) have introduced subscription-style tariffs or demand-limiter provisions that reduce or restructure demand charges for DCFC operators [2].
-        
-        McKinsey estimates that subsidy receipt converts a $40,000–$50,000 annual EBIT loss into a $25,000–$30,000 profit at the same 15% utilization, driven largely by reduced capex depreciation [1].
-        
-        ## 5. Named-Operator Economics
-        
-        Electrify America, EVgo, and Tesla collectively hold approximately 80% of the public DCFC market [1]. EVgo, which publishes the most granular public financials, reported full-year 2024 revenue of $256.8 million—a 60% increase year-over-year—but still posted a net loss of $126.7 million on a GAAP basis [6]. The company ended 2024 with approximately 4,080 stalls in operation, and in December 2024 closed a DOE loan guarantee of up to $1.25 billion to fund approximately 7,500 additional stalls over the next five years [6]. Management guided for Adjusted EBITDA breakeven in 2025 [6]. EVgo's prefabrication deployment model is separately projected to cut station construction costs by 15% and installation timelines by 50% [3].
-        
-        ## 6. Contrarian / Skeptical View
-        
-        The Great Plains Institute's foundational research is blunt: "Today's economics and the average electric utility rates mean that nearly all DCFC scenarios lose money" [4]. The authors frame it as a chicken-and-egg problem—stations lose money until EV adoption creates more customers, but adoption lags without stations. A counter-skeptical note from FreeWire's Chip Silverman warns that the proposed remedy of eliminating demand charges simply shifts the problem: "Waiving demand charges for fast chargers will shift costs to all ratepayers, including non-EV drivers," with Massachusetts projecting $84–$131 million in forgone utility revenue [2]. This critique suggests that policy shortcuts may create rate-equity problems while masking the industry's fundamental utilization deficit.
-        
-        ## 7. Hardware vs. Installation Cost Split
-        
-        McKinsey's range—$45,000–$100,000+ hardware versus $40,000–$150,000+ installation—implies that at complex sites, civil and electrical work equals or exceeds the cost of the charger itself [1]. Paren's NEVI data dramatize the spread: the cheapest real-world deployment ran $30,942 per port (Tesla, Wisconsin, simple site) while the costliest reached $895,132 per port (Hawaii, battery storage, remote grid) [3]—a 29× range driven almost entirely by infrastructure conditions. The practical heuristic: a $25,000–$75,000 dispenser routinely becomes a $150,000–$250,000 project once transformer upgrades, trenching, bollards, permitting, and network commissioning are included. Hardware costs are falling as competition among manufacturers grows; installation costs, tied to local labor markets and utility interconnection queues, are proving far stickier.
-        
-        ---
-        
-        ## Sources
-        
-        [1] "A 150 to 350kW DCFC charging unit can cost anywhere from $45,000 to over $100,000, and installation costs can range from $40,000 to over $150,000." - Can public EV fast-charging stations be profitable in the United States? - https://www.mckinsey.com/features/mckinsey-center-for-future-mobility/our-insights/can-public-ev-fast-charging-stations-be-profitable-in-the-united-states
-        
-        [2] "Waiving demand charges for fast chargers will shift costs to all ratepayers, including non-EV drivers." - Fast charging, high costs: Eliminating demand charges won't solve the problem - https://www.utilitydive.com/news/eliminating-demand-charges-wont-solve-EV-station-problems/689395/
-        
-        [3] "the average total NEVI project cost is $915,420. The median total cost is $802,267" - NEVI DC Fast Charging Station Total Project Cost Averages $915,000 - https://www.paren.app/blog/nevi-dc-fast-charging-station-total-project-cost-averages-915-000
-        
-        [4] "Today's economics and the average electric utility rates mean that nearly all DCFC scenarios lose money" - 'Nearly all' high voltage EV charging stations lose money: Report - https://www.utilitydive.com/news/nearly-all-high-voltage-ev-charging-stations-lose-money-report/561026/
-        
-        [5] "apportions a total of $5 billion to States, D.C., and Puerto Rico over five years, from Fiscal Year 2022 through 2026" - Federal Funding Programs - https://www.transportation.gov/rural/ev/toolkit/ev-infrastructure-funding-and-financing/federal-funding-programs
-        
-        [6] "Consolidated Statements of Operations - USD ($)$ in Thousands | 12 Months Ended Dec. 31, 2024 | Dec. 31, 2023" - EVgo Inc. Form 10-K, Consolidated Statements of Operations (XBRL), Period: 2024-12-31 - https://www.sec.gov/Archives/edgar/data/1821159/000155837025002400/R4.htm
-      text/plain: <IPython.core.display.Markdown object>

## modified /cells/15/source:
@@ -9,4 +9,7 @@ for ev in client.beta.sessions.events.list(session.id, limit=1000, betas=BETAS):
     elif ev.name == "edit":
         content = content.replace(ev.input["old_string"], ev.input["new_string"], 1)
 
-display(Markdown(content))
+# Show the structure and sources rather than the full prose.
+for line in content.splitlines():
+    if line.startswith(("#", "[")):
+        print(line)

Generated by nbdime

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review

Recommendation: APPROVE

Summary

Follow-up fixes that swap display(Markdown(...)) for print() so the review-loop and brief/proposal extraction cells render correctly on the docs site, plus title-casing normalization across both notebooks and registry.yaml.

Actionable Feedback (0 items)

No blocking or optional items. Diff is tight and self-consistent.

Detailed Review

Code Quality

  • Section-extraction logic is correct. line.startswith(\"#\") matches all H1/H2/H3 headers in the proposal (including the ### St. Clair Health / ### BlueRidge Health Plan rows shown in the recorded output). For the brief, line.startswith((\"#\", \"[\")) correctly captures both section headings and the [N] \"...\" source entries — the diff shows all 6 sources came through cleanly.
  • No leftover IPython imports. Both from IPython.display import Markdown, display lines were removed; nothing else in either notebook still references IPython or display(Markdown.
  • Outputs match the new code. The new stdout blocks line up with what the rewritten loops would produce.

registry.yaml

  • 'Multiagent: coordinate a specialist team' matches the H1 at the top of CMA_coordinate_specialist_team.ipynb.
  • 'Outcomes: agents that verify their own work' matches the H1 at the top of CMA_verify_with_outcome_grader.ipynb.
  • Lowercase-after-colon convention now applied consistently across both Feature: siblings.

Narrative consistency

  • §5 prose in both notebooks was updated symmetrically: "look at the sections / cited sources... Print proposal (or content) itself if you want to read the full document." Nice parallel construction, and the escape hatch preserves the original capability for readers who want the full prose.
  • §4 intros ("render each phase as it happens", "draws a labeled divider") still describe the rewritten helpers accurately — the banner still draws a labeled divider, just via print now.

Information trade-off

Well-judged. For §5, the full prose was already in scope in proposal / content, so pointing readers at those variables preserves access while keeping the rendered docs page scannable. Section headers + cited sources are the right summary view for a research brief — they answer "did the rubric coverage land?" at a glance. The §4 loop loses bold emphasis and the / glyphs lose visual weight, but unicode dividers carry enough structure in monospace that the loop stays readable.

Positive Notes

  • Tight, focused diff: pure rendering/title fix, no scope creep.
  • The PR description clearly identifies the upstream pipeline gap (notebook → MDX converter only handling stream outputs) and notes the same break exists in claude_agent_sdk/01_The_chief_of_staff_agent.ipynb, which is useful context for follow-up work.
  • Symmetry across the two notebooks (matching extraction patterns and matching prose hint) makes the change easy to maintain.

@markn-ant markn-ant requested a review from PedramNavid May 6, 2026 18:18
@markn-ant markn-ant merged commit 93a262f into main May 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants