AIGNE WebSmith is a powerful, AI-driven website generation tool built on the AIGNE Framework. It automates the creation of professional, SEO-optimized websites with complete content and templates, and enables direct publishing to Pages Kit.
- Intelligent Structure Planning: Automatically analyzes requirements to generate an optimal website architecture.
- Batch Content Generation: Generates detailed content for all pages with a single command.
- Professional SEO Optimization: Includes built-in SEO best practices and provides optimization recommendations.
- Multi-language Support: Supports both Chinese and English content generation and localization.
- Pages Kit Integration: Directly generates Pages Kit-compatible YAML templates.
- Component-based Design: Supports modern components like Hero, CTA, FAQ, and Content Cards.
- Built-in Component Library: Includes an integrated component library with validation and management.
- Responsive Layout: Automatically adapts for mobile and desktop displays.
- Visual Editing: Generated templates support visual editing.
- Structure Evaluation System: Automatically assesses website architecture and user experience.
- Content Quality Checks: Ensures the accuracy and consistency of content.
- Complete Test Coverage: Includes over 32 test cases covering core functionality.
- Code Quality Assurance: Code is checked and formatted using Biome.
- Direct Publishing: Enables one-click publishing to Pages Kit.
- Batch Upload: Supports batch publishing of multi-page websites.
- Status Monitoring: Provides detailed publishing status and error reporting.
- Access Links: Get public links to your website immediately after successful publishing.
WebSmith is built on the AIGNE framework using an Agent-based architecture:
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Structure β β Content β β Template β
β Planning βββββΆβ Generation βββββΆβ Generation β
β Agent β β Agent β β Agent β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Evaluation β β Batch β β Upload β
β Agent β β Processing β β Agent β
β β β Agent β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- π§ Structure Planning: Intelligently analyzes requirements to generate the website architecture.
- π Content Generation: Generates high-quality page content in batches.
- π¨ Template Generation: Creates Pages Kit-compatible templates.
- π§© Component Library: Manages and validates the built-in component library.
- π Quality Evaluation: Evaluates website quality and user experience.
- β‘ Batch Processing: Provides an efficient system for batch processing.
- π Pages Kit Upload: Enables one-click publishing to Pages Kit.
# Install AIGNE CLI
npm install -g @aigne/cli
# Install Aigne CLI Beta
npm install -g @aigne/cli@beta
aigne web upgrade --beta
# Or install locally
npm install @aigne/cli
npm install @aigne/cli@beta# Generate pages
aigne web generate# Publish generated pages
aigne web publish# Translate existing pages into different languages
aigne web translate
# Update existing website content
aigne web update
# Pull components
aigne web component --url "https://your-pages-kit/api/projects/your-project-id/components/pull?secret=your-secret&hash=your-hash"
aigne-web-smith/
βββ agents/ # Core AI agents
β βββ chat/ # Interactive chat interface
β βββ generate/ # Website generation workflows
β β βββ component-library/ # Component library management
β β βββ page-detail/ # Page content generation
β β βββ page-data/ # Page data composition
β βββ plan/ # Website structure planning
β βββ publish/ # Pages Kit publishing
β βββ translate/ # Multi-language support
β βββ update/ # Content update workflows
β βββ utils/ # Utility functions and helpers
βββ prompts/ # AI prompts and templates
β βββ chat/, generate/, plan/, translate/
βββ utils/ # Core utility functions
β βββ constants.mjs # Component definitions and constants
β βββ generate-helper.mjs # Website generation utilities
β βββ auth-utils.mjs # Authentication handling
β βββ pages-finder-utils.mjs # Page discovery and management
β βββ upload-files.mjs # File upload utilities
βββ pages-mcp/ # MCP server implementation
β βββ get-pages-structure.mjs
β βββ get-page-detail.mjs
βββ aigne.yaml # Main CLI configuration
WebSmith includes comprehensive test coverage:
# Run all tests
bun test
# Run with coverage
bun test --coverage --coverage-reporter=lcov --coverage-reporter=text
# Run with verbose output
bun test --verboseTest coverage includes:
- β Utility function tests
- β Pages Kit integration tests
- β Website structure tests
- β File system and error handling tests
- β Component library validation tests
# Install dependencies
pnpm install
# Run code quality checks
npm run lint
# Auto-fix formatting issues
npm run lint:fix
# Watch mode for tests
bun test --watch- Create Agent: Add a new
.yamlagent to the appropriate subdirectory withinagents/. - Add Prompt: Create a corresponding prompt in the
prompts/directory. - Update Config: Add the new agent to
aigne.yaml. - Write Tests: Add tests using the Bun test framework.
- Update Docs: Document the new functionality.
- Linting: Uses Biome for code quality and formatting.
- Testing: Bun test runner with comprehensive coverage.
- Type Safety: JSDoc annotations are used to improve type safety and the development experience.
- Git Hooks: Pre-commit hooks ensure code quality.
Interactive chat interface for website generation and management.
Features:
- Interactive page generation assistant
- Memory-enabled conversations
- Access to all other agents (generate, update, publish, translate)
Generates a complete website from user requirements.
Parameters:
config(required): Configuration file path (automatically provided via--input @file.yaml).glossary(optional): A glossary of terms for consistent terminology. Use@<file>to read from a file.forceRegenerate(optional): Force regeneration of all pages (boolean).
Publishes the generated website to Pages Kit.
Parameters:
appUrl(optional): The target website URL where pages will be published.with-navigations(optional): Publish the website with navigations. Options:flatormenu(defaults tomenu).with-locales(optional): Publish the website with locales (boolean).
Translates existing website content into different languages.
Parameters:
glossary(optional): A glossary of terms for consistent terminology. Use@<file>to read from a file.pages(optional): An array of page paths to translate.langs(optional): An array of language codes to translate to. Available languages: en, zh, zh-TW, ja, fr, de, es, it, ru, ko, pt, ar.feedback(optional): Feedback for improving translations.
Updates existing website content based on new requirements.
Parameters:
glossary(optional): A glossary of terms for consistent terminology. Use@<file>to read from a file.pages(optional): An array of page paths to update.feedback(optional): Feedback for content improvement.
Manages website visual themes.
Subcommands:
generate(alias: gen): Generates a theme based on the website design.name(optional): A name for your theme.config(optional): The configuration file location.
apply: Applies a theme to the website.
Manages the component library.
Subcommands:
pull: Pulls components from a URL.url(required): The URL to pull components from.
Manages user preferences learned from feedback.
Parameters:
--list: Lists all preferences.--remove: Removes preferences.--toggle: Toggles the active status of preferences.--id: An array of preference IDs to manage.
Views the update history.
Subcommands:
view(aliases: log, list): Views the update history in a compact format.
Clears the workspace, generated pages, or configuration.
Parameters:
targets(optional): An array of items to clear without prompting.pagesDir(optional): Overrides the pages directory root.tmpDir(optional): Overrides the workspace directory.outputDir(optional): Overrides the generated pages directory.configPath(optional): Overrides the configuration file path.
WebSmith provides MCP server endpoints for integration:
get-pages-structure: Retrieves the current website structure.get-page-detail: Gets the detailed content for a specific page.pages-search: Searches within the website content.analyze-content-relevance: Analyzes content relevance.analyze-pages-relevance: Analyzes the relevance of pages.read-page-content: Reads page content.
Start MCP server:
aigne web serve-mcpWebSmith is optimized for production use:
- Fast Generation: Parallel agent processing.
- Efficient Templates: Optimized Pages Kit integration.
- Memory Management: Streaming content processing.
- Error Recovery: Robust error handling and recovery.
Typical performance metrics:
- 5-page website: ~2-3 minutes
- 15-page website: ~5-8 minutes
- Template generation: ~10-20 seconds per page
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository.
- Create a feature branch.
- Implement your changes and include tests.
- Run quality checks:
npm run lint. - Submit a pull request.
This project is licensed under the Elastic License 2.0 - see the LICENSE file for details.
- π¨ WebSmith Logo
- π WebSmith Official Website
- π AIGNE Framework
- π― Pages Kit
- π» GitHub Repo
- π Report Issues
Built with β€οΈ using the AIGNE Framework