Nano Banana Pro
Agent skill for nano-banana-pro
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a sophisticated multi-agent AI content aggregation system built with modern enterprise-grade architecture patterns. The system automatically crawls, processes, and generates AI-related articles using a combination of LangGraph orchestration, dependency injection, and microservices design principles.
# Start modern backend with cutting-edge tools cd backend python start_modern.py # Start modern API server (port 8000) # Test modern system integration python test_unified_modern.py # Comprehensive test suite # Traditional startup (still available) ./start.sh -d # Start both backend and frontend
cd backend uv run python main.py # Start unified modern API (port 8000) uv add <package> # Add new dependencies uv sync # Sync dependencies # Health check with tool status curl http://localhost:8000/health # Modern API Documentation curl http://localhost:8000/docs
cd frontend npm run dev # Start development server with Turbopack (port 3000) npm run build # Build for production npm run start # Start production server npm run lint # Run ESLint npm run type-check # TypeScript type checking
┌─────────────────────────────────────────────────────────────┐ │ Presentation Layer │ │ Next.js 15 + React 19 + TypeScript + Tailwind CSS v4 │ └─────────────────────────────────────────────────────────────┘ │ HTTP/REST API ┌─────────────────────────────────────────────────────────────┐ │ API Gateway Layer │ │ FastAPI + CORS + Request/Response Validation │ └─────────────────────────────────────────────────────────────┘ │ Dependency Injection ┌─────────────────────────────────────────────────────────────┐ │ Business Logic Layer │ │ LangGraph Multi-Agent Orchestration │ └─────────────────────────────────────────────────────────────┘ │ Interface Abstraction ┌─────────────────────────────────────────────────────────────┐ │ Service Layer │ │ AI • Storage • Crawler • Content Processing Services │ └─────────────────────────────────────────────────────────────┘ │ Repository Pattern ┌─────────────────────────────────────────────────────────────┐ │ Data Access Layer │ │ Repository Pattern + Enhanced Storage Service │ └─────────────────────────────────────────────────────────────┘ │ Storage Abstraction ┌─────────────────────────────────────────────────────────────┐ │ Persistence Layer │ │ File System + JSON + YAML Configuration Storage │ └─────────────────────────────────────────────────────────────┘
The project uses a sophisticated dependency injection container (
backend/core/container.py) that manages:
backend/core/interfaces.py)┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ Crawler │───▶│ Processor │───▶│ Research │───▶│ Writer │ │ Agent │ │ Agent │ │ Agent │ │ Agent │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
CrawlerAgent (
backend/agents/crawler_agent.py)
ProcessorAgent (
backend/agents/processor_agent.py)
ResearchAgent (
backend/agents/research_agent.py)
WriterAgent (
backend/agents/writer_agent.py)
/data/ ├── articles/ # Generated articles by workflow ├── content/ # Processed content storage ├── sources/ # Source configuration files ├── workflows/ # Workflow state persistence └── logs/ # System logs and debugging
All services use async/await patterns and communicate through well-defined interfaces.
POST /workflow/start - Start content generation workflowGET /workflow/status/{id} - Real-time workflow progressPOST /workflow/cancel/{id} - Cancel running workflowGET /articles - Get generated articles with filteringGET /articles/{workflow_id} - Get workflow-specific articlesGET /articles/categories - Get article categoriesGET /articles/statistics - Get article statisticsGET /articles/latest - Get most recent articlesGET /sources - List configured sourcesPOST /sources/add - Add new source configurationPUT /sources/{id} - Update source configurationDELETE /sources/{id} - Remove sourceGET /sources/statistics - Get source statisticsGET /health - System health checkPOST /articles/cache/clear - Clear article cachePOST /articles/deduplicate - Manual deduplicationfrontend/src/ ├── app/ # Next.js App Router │ ├── page.tsx # Main dashboard │ └── layout.tsx # Root layout ├── components/ # React components │ ├── SourceManager.tsx # Source configuration interface │ ├── CrawlingProgress.tsx # Real-time workflow progress │ ├── ControlPanel.tsx # Workflow controls │ └── ArticleList.tsx # Generated article display ├── lib/ # Utilities and API client │ └── api.ts # Centralized API client └── types/ # TypeScript definitions └── index.ts # Shared type definitions
backend/conf.yml)# Application Configuration app: name: "AI Content Aggregator" version: "1.0.0" # AI Model Configuration models: ark: api_key: "${ARK_API_KEY}" base_url: "https://ark.cn-beijing.volces.com/api/v3" model: "ep-20250617155129-hfzl9" # Agent Configuration agents: crawler: max_sources: 50 timeout: 30 processor: relevance_threshold: 0.6 writer: min_word_count: 800 max_word_count: 1200 # Service Configuration services: storage: base_path: "./data" analyzer: model_config: "ark" # CORS Configuration cors: allow_origins: ["http://localhost:3000"] allow_methods: ["GET", "POST", "PUT", "DELETE"]
ARK_API_KEY - Required for AI processing and article generation/ ├── backend/ # Python FastAPI backend │ ├── agents/ # LangGraph multi-agent system │ │ ├── crawler_agent.py # Content crawling agent │ │ ├── processor_agent.py # Content processing agent │ │ ├── research_agent.py # Research and verification agent │ │ └── writer_agent.py # Article writing agent │ ├── api/ # FastAPI application and endpoints │ │ └── main.py # Main API application with all endpoints │ ├── core/ # Core architecture components │ │ ├── container.py # Dependency injection container │ │ ├── interfaces.py # Service interface definitions │ │ └── exceptions.py # Custom exception classes │ ├── services/ # Business logic services │ │ ├── model_service.py # AI model integration │ │ ├── enhanced_storage_service.py # Advanced storage │ │ ├── crawler_service.py # Web crawling service │ │ ├── content_processor.py # Content processing │ │ └── workflow_orchestrator.py # LangGraph orchestration │ ├── repositories/ # Data access layer │ │ └── source_repository.py # Source configuration repository │ ├── models/ # Data models and schemas │ │ └── source_config.py # Source configuration models │ ├── config/ # Configuration management │ │ └── settings.py # Configuration loader │ ├── utils/ # Utility functions │ │ └── file_storage.py # File system utilities │ ├── conf.yml # Main configuration file │ └── main.py # Application entry point ├── frontend/ # Next.js React frontend │ ├── src/app/ # Next.js App Router │ ├── src/components/ # React components │ ├── src/lib/ # API client and utilities │ ├── src/types/ # TypeScript definitions │ └── package.json # Frontend dependencies ├── start.sh # Enhanced startup script with live logs └── CLAUDE.md # This documentation file
The
start.sh script provides:
/docsThis architecture represents a modern, enterprise-grade approach to AI content aggregation, combining cutting-edge technologies with proven architectural patterns to deliver a robust, scalable, and maintainable system.
Do what has been asked; nothing more, nothing less. NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one. NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.