Generate burn rate charts and financial analysis through AI chat. Creates interactive visualizations from conversation.
Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
Download → Next.js app
Use Download → Next.js app in the preview toolbar. You get a zip scaffold (Pro downloads rewrite preview `/view/.../api/*` paths to `/api/*` automatically).
Extract the zip and install dependencies
Unzip the archive, then run `pnpm install` (or npm / yarn) in the project folder.
Fill .env.local
The download includes .env.local placeholders when needed. Add real values for: OPENAI_API_KEY.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions in the generated project for your product.
Run the app and open the pattern route
Run `pnpm dev`, open the setup/checklist page if present, then navigate to the generated pattern route and verify responses.
OPENAI_API_KEYGet keyAI SDK APIs
streamTextconvertToModelMessagestoolProviders
External services
app/page.tsxapp/layout.tsxapp/api/artifact/route.tscomponents/burn-rate-chat.tsxcomponents/expandable-panel.tsxcomponents/burn-rate-analysis-panel.tsxcomponents/burn-rate-chart.tsxcomponents/burn-rate-loading.tsxcomponents/left-panel-chat.tsxcomponents/message-input.tsxcomponents/message-list.tsxcomponents/chat-message-card.tsxcomponents/intro-heading.tsxcomponents/right-panel-artifact.tsxcomponents/right-panel-header.tsxcomponents/status-indicator.tsxcomponents/types.tshooks/use-artifact-panel-state.tsxhooks/use-burn-rate-artifact.tslib/error-handler.tslib/ai/context.tslib/ai/tools/index.tslib/ai/tools/burn-rate.tslib/ai/artifacts/burn-rate.tsREADME.mdnpm packages
8
Registry components
artifact/route.tsAPI route for the burn rate chart artifact. Uses runWithContext for AsyncLocalStorage context, streamText with the analyzeBurnRate tool.
tools/burn-rate.tsImplements the analyzeBurnRateTool with a 4-stage progressive streaming pipeline: loading, processing, analyzing, and complete. Uses BurnRateArtifact.stream() for progressive UI updates.
artifacts/burn-rate.tsDefines BurnRateArtifact via artifact(). Zod schema captures: title, stage, currency, progress, chartData array, and optional summary with trends and alerts.
ai/context.tsAsyncLocalStorage-based context management for the chart artifact. Provides runWithContext, getContext, getWriter.
Generate burn rate charts and financial analysis through AI chat. Creates interactive visualizations from conversation.
Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
Download → Next.js app
Use Download → Next.js app in the preview toolbar. You get a zip scaffold (Pro downloads rewrite preview `/view/.../api/*` paths to `/api/*` automatically).
Extract the zip and install dependencies
Unzip the archive, then run `pnpm install` (or npm / yarn) in the project folder.
Fill .env.local
The download includes .env.local placeholders when needed. Add real values for: OPENAI_API_KEY.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions in the generated project for your product.
Run the app and open the pattern route
Run `pnpm dev`, open the setup/checklist page if present, then navigate to the generated pattern route and verify responses.
OPENAI_API_KEYGet keyAI SDK APIs
streamTextconvertToModelMessagestoolProviders
External services
app/page.tsxapp/layout.tsxapp/api/artifact/route.tscomponents/burn-rate-chat.tsxcomponents/expandable-panel.tsxcomponents/burn-rate-analysis-panel.tsxcomponents/burn-rate-chart.tsxcomponents/burn-rate-loading.tsxcomponents/left-panel-chat.tsxcomponents/message-input.tsxcomponents/message-list.tsxcomponents/chat-message-card.tsxcomponents/intro-heading.tsxcomponents/right-panel-artifact.tsxcomponents/right-panel-header.tsxcomponents/status-indicator.tsxcomponents/types.tshooks/use-artifact-panel-state.tsxhooks/use-burn-rate-artifact.tslib/error-handler.tslib/ai/context.tslib/ai/tools/index.tslib/ai/tools/burn-rate.tslib/ai/artifacts/burn-rate.tsREADME.mdnpm packages
8
Registry components
artifact/route.tsAPI route for the burn rate chart artifact. Uses runWithContext for AsyncLocalStorage context, streamText with the analyzeBurnRate tool.
tools/burn-rate.tsImplements the analyzeBurnRateTool with a 4-stage progressive streaming pipeline: loading, processing, analyzing, and complete. Uses BurnRateArtifact.stream() for progressive UI updates.
artifacts/burn-rate.tsDefines BurnRateArtifact via artifact(). Zod schema captures: title, stage, currency, progress, chartData array, and optional summary with trends and alerts.
ai/context.tsAsyncLocalStorage-based context management for the chart artifact. Provides runWithContext, getContext, getWriter.
Loading preview…
Early-bird pricing — limited time

Open on desktop for the interactive preview.
Generate burn rate charts and financial analysis through AI chat. Creates interactive visualizations from conversation.
Loading preview…
Early-bird pricing — limited time

Open on desktop for the interactive preview.
Generate burn rate charts and financial analysis through AI chat. Creates interactive visualizations from conversation.