Extract brand design systems from any website using Firecrawl, then use AI tools to export tokens, generate color palettes, check accessibility, and analyze brand personality.
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, FIRECRAWL_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.
AI SDK APIs
useChatgatewayToolLoopAgenttoolhasToolCallstepCountIscreateAgentUIStreamResponseInferAgentUIMessageDefaultChatTransportUIMessageProviders
External services
app/page.tsxapp/layout.tsxapp/api/branding-agent/route.tslib/actions.tslib/branding-types.tslib/rate-limit.tslib/ai/branding-agent.tslib/ai/tools/export-tokens.tslib/ai/tools/generate-palette.tslib/ai/tools/analyze-accessibility.tslib/ai/tools/generate-components.tslib/ai/tools/suggest-personality.tsREADME.mdnpm packages
8
Registry components
branding-agent/route.tsAPI route using createAgentUIStreamResponse with brandContext passed via callOptions.
ai/branding-agent.tsToolLoopAgent with callOptionsSchema + prepareCall that injects brand context into instructions and experimental_context. Uses stopWhen with hasToolCall for each tool.
tools/generate-palette.tsColor palette generation tool with HSL color theory algorithms (shades, complementary, analogous, accessible). Most complex branding tool.
tools/analyze-accessibility.tsWCAG contrast ratio analysis tool computing ratios between color pairs and evaluating AA/AAA compliance.
tools/export-tokens.tsDesign token export tool generating CSS variables, Tailwind config, or JSON design tokens.
tools/generate-components.tsComponent style generation tool creating styled examples from brand tokens.
tools/suggest-personality.tsBrand personality suggestion tool analyzing colors and typography for tone and audience alignment.
lib/actions.tsServer action for initial brand data extraction from a URL. Provides the brandContext that feeds into the agent.
Extract brand design systems from any website using Firecrawl, then use AI tools to export tokens, generate color palettes, check accessibility, and analyze brand personality.
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, FIRECRAWL_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.
AI SDK APIs
useChatgatewayToolLoopAgenttoolhasToolCallstepCountIscreateAgentUIStreamResponseInferAgentUIMessageDefaultChatTransportUIMessageProviders
External services
app/page.tsxapp/layout.tsxapp/api/branding-agent/route.tslib/actions.tslib/branding-types.tslib/rate-limit.tslib/ai/branding-agent.tslib/ai/tools/export-tokens.tslib/ai/tools/generate-palette.tslib/ai/tools/analyze-accessibility.tslib/ai/tools/generate-components.tslib/ai/tools/suggest-personality.tsREADME.mdnpm packages
8
Registry components
branding-agent/route.tsAPI route using createAgentUIStreamResponse with brandContext passed via callOptions.
ai/branding-agent.tsToolLoopAgent with callOptionsSchema + prepareCall that injects brand context into instructions and experimental_context. Uses stopWhen with hasToolCall for each tool.
tools/generate-palette.tsColor palette generation tool with HSL color theory algorithms (shades, complementary, analogous, accessible). Most complex branding tool.
tools/analyze-accessibility.tsWCAG contrast ratio analysis tool computing ratios between color pairs and evaluating AA/AAA compliance.
tools/export-tokens.tsDesign token export tool generating CSS variables, Tailwind config, or JSON design tokens.
tools/generate-components.tsComponent style generation tool creating styled examples from brand tokens.
tools/suggest-personality.tsBrand personality suggestion tool analyzing colors and typography for tone and audience alignment.
lib/actions.tsServer action for initial brand data extraction from a URL. Provides the brandContext that feeds into the agent.

Unlock the live preview and source
Locked on free (high token spend). Pro runs the live demo and includes the source.
Early-bird pricing — limited time

Open on desktop for the interactive preview.
Extract brand design systems from any website using Firecrawl, then use AI tools to export tokens, generate color palettes, check accessibility, and analyze brand personality.
Unlock the live preview and source
Locked on free (high token spend). Pro runs the live demo and includes the source.

Unlock the live preview and source
Locked on free (high token spend). Pro runs the live demo and includes the source.
Early-bird pricing — limited time

Open on desktop for the interactive preview.
Extract brand design systems from any website using Firecrawl, then use AI tools to export tokens, generate color palettes, check accessibility, and analyze brand personality.
Unlock the live preview and source
Locked on free (high token spend). Pro runs the live demo and includes the source.