An intelligent system that automates the entire process of selling items online. Simply upload a photo, and the AI agent handles image analysis, pricing validation, content creation, and marketplace publishing.
Transform this workflow:
- Take photo β AI analyzes item details (brand, model, condition)
- Get pricing β Validates prices against Norwegian market data (FINN.no)
- Create listing β Generates optimized Norwegian descriptions for platforms
- Publish β Prepares for automated posting to FINN.no & Facebook Marketplace
Before: Hours of manual listing creation
After: Professional listings in minutes with market-validated pricing
- Universal Item Support: Works with electronics, furniture, fashion, vehicles, sports equipment, and more
- Enhanced Brand Detection: Identifies specific models (e.g., "iPhone 14 Pro" not just "phone")
- Norwegian Market Integration: Real price validation using FINN.no data
- Platform Optimization: Tailored content for FINN.no vs Facebook Marketplace
- Professional Previews: See exactly how your listing will appear to buyers
- Node.js 18+
- pnpm package manager
- OpenAI API key
# Clone the repository
git clone https://github.com/Codehagen/autosell.git
cd autosell
# Install dependencies
pnpm install
# Copy environment variables
cp .env.example .env.local
# Edit .env.local and add your OpenAI API key
# Start development server
pnpm dev
- Take a clear photo with good lighting
- Include any visible brand logos, model numbers, or labels
- Multiple angles help but one good photo is sufficient
- Pricing Strategy: Quick sale, market price, or maximize profit
- Target Platforms: FINN.no, Facebook Marketplace, or both
- Additional Info: Add any details the AI might miss
- Check the generated listing preview
- Verify extracted brand/model information
- Confirm pricing recommendations
- Publish to your chosen platforms
- Smartphones & Tablets: iPhone, Samsung, iPad
- Computers: MacBook, ThinkPad, gaming laptops
- Audio: AirPods, headphones, speakers
- Cameras: DSLR, mirrorless, action cameras
- Gaming: PlayStation, Xbox, Nintendo Switch
- Clothing: Designer brands, vintage items, sportswear
- Shoes: Sneakers, boots, heels
- Watches: Apple Watch, luxury brands, vintage
- Sunglasses: Ray-Ban, Oakley, designer frames
- Bags: Handbags, backpacks, luggage
- Bikes: Mountain bikes, road bikes, e-bikes
- Fitness: Gym equipment, yoga gear
- Winter Sports: Skis, snowboards, boots
- Water Sports: Surfboards, kayaks, gear
- Furniture: Chairs, tables, sofas, storage
- Appliances: Kitchen gadgets, vacuum cleaners
- Decor: Art, lamps, plants, mirrors
- Tools: Power tools, hand tools, workshop equipment
- Cars: All makes and models
- Motorcycles: Street bikes, scooters, vintage
- Boats: Sailboats, motorboats, kayaks
- Clear brand/model visibility: "MacBook Pro 14-inch M2"
- Good lighting and focus: Professional-quality extractions
- Popular items: Better market data and pricing accuracy
- Norwegian brands: Strong local market knowledge
- Partial brand visibility: "Samsung phone" (may need model hints)
- Vintage/unique items: Creative descriptions with conservative pricing
- Less common brands: Accurate analysis with limited market data
- No visible branding: Generic descriptions based on visual features
- Handmade/custom items: Descriptive analysis without brand specifics
- Poor photo quality: May require retaking photos
The AI agent provides sophisticated pricing analysis:
- FINN.no Integration: Real-time price comparison
- Market Position: Above, below, or within market range
- Confidence Scoring: How reliable the price estimate is
- Quick Sale: 15% below market for fast turnover
- Market Price: Balanced approach using average market data
- Maximize Profit: Premium pricing with negotiation room
- Local Currency: All prices in NOK
- Regional Preferences: Norwegian marketplace conventions
- Seasonal Adjustments: Market timing considerations
- FINN.no Style: Professional, detailed, condition-focused
- Facebook Marketplace: Casual, friendly, quick pickup emphasis
- Universal Content: Works across both platforms
- Native Descriptions: Proper Norwegian grammar and terminology
- Local Terminology: Uses Norwegian product naming conventions
- Cultural Adaptation: Appeals to Norwegian buyers
- Vision Model: OpenAI GPT-4o for image analysis
- Language Model: GPT-4o for content generation
- Framework: Vercel AI SDK v5 with tool calling
- Orchestrator Pattern: Multi-step workflow management
- Image Analysis (
analyzeImage
) - Extract item details with enhanced brand/model detection - Price Validation (
validatePriceOnFinn
) - Search FINN.no for market comparisons - Price Optimization (
suggestPriceRange
) - Combine AI and market data - Content Creation (
createOptimizedListing
) - Generate platform-specific descriptions - Publishing Queue (
queueMarketplacePublishing
) - Prepare for marketplace posting
βββ app/
β βββ agent/page.tsx # Main AI agent interface
β βββ api/
β β βββ agent/ # AI agent endpoints
β β β βββ analyze-image/ # Image analysis endpoint
β β β βββ create-listing/ # Main workflow orchestrator
β β β βββ publish-listing/ # Publishing endpoint
β β βββ marketplace/ # Marketplace integrations
β βββ chat/page.tsx # Chat interface
β βββ layout.tsx # Root layout
βββ components/
β βββ agent/ # Agent UI components
β β βββ AgentUploadStep.tsx # Image upload interface
β β βββ AgentAnalysisStep.tsx # Analysis results display
β β βββ shared/ # Shared agent components
β βββ ui/ # shadcn/ui components
βββ lib/
β βββ agent-core/ # Core agent logic
β β βββ workflow-orchestrator.ts # Main orchestration engine
β βββ agent-tools/ # AI tool implementations
β β βββ image-analyzer.ts # Vision model integration
β β βββ price-validator.ts # FINN.no price validation
β β βββ content-optimizer.ts # Listing content generation
β β βββ amazon-analyzer.ts # Amazon integration
β βββ agent-utils/ # Agent utilities
β βββ marketplace-agent.ts # 7-step orchestrator
β βββ finn-api.ts # FINN.no API integration
β βββ amazon-api.ts # Amazon SP-API integration
β βββ image-utils.ts # Client-side compression
βββ hooks/ # Custom React hooks
βββ prisma/
β βββ schema.prisma # Database schema
βββ .env.example # Environment variables template
βββ CLAUDE.md # Technical documentation
βββ package.json # Dependencies and scripts
The system provides transparency into its analysis:
- Brand Detection: How certain the AI is about brand identification
- Model Recognition: Confidence in specific model/series
- Price Validation: Market data reliability score
- Category Classification: Item type certainty
- Extraction Quality: See what the AI identified in structured preview
- Market Analysis: Understand pricing recommendations with color coding
- Content Preview: Review Norwegian listing before publishing
- Natural lighting works better than artificial
- Include labels/stickers with model information
- Multiple angles for complex items
- Clean backgrounds help AI focus on the item
- Add hints for items with hidden model numbers
- Specify condition accurately (new, like new, used good, etc.)
- Include accessories in the photo (cases, cables, manuals)
- FINN.no: Better for higher-value items, cars, electronics
- Facebook Marketplace: Great for furniture, quick local sales
- Both Platforms: Maximize exposure for valuable items
AI can't identify brand/model
Solution: Add hints with known information
Check: Are brand logos visible in photo?
Try: Different photo angles or better lighting
Price seems incorrect
Check: Market position indicator and confidence scores
Consider: Seasonal/regional factors in Norwegian market
Review: FINN.no search results manually for comparison
Description needs adjustment
Use: Preview as a starting point for manual editing
Remember: AI excels at structure, you add personal touches
Best: Combine AI efficiency with human insight
Schema validation errors
Check: Zod schema limits in marketplace-agent.ts
Common: selling_points array exceeding max limit
Fix: Adjust schema constraints or prompt guidance
- No Data Storage: Images processed temporarily, not stored
- API Security: Encrypted connections to AI services
- Local Processing: Image compression happens client-side
- User Control: You control all publishing decisions
This is an active development project focused on Norwegian marketplace automation:
- β Universal item analysis with high accuracy
- β Enhanced brand/model extraction for better pricing
- β FINN.no price validation with market positioning
- β Professional Norwegian listing generation
- β Visual listing previews with confidence indicators
- π§ Publishing automation (in development)
- π§ Buyer communication handling (planned)
# Development
pnpm dev # Start with Turbopack (fast bundler)
pnpm build # Production build
pnpm start # Start production server
pnpm lint # Code quality checks
# Key endpoints
GET /agent # Main interface
POST /api/agent/create-listing # 5-step workflow
POST /api/agent/analyze-image # Image-only analysis
For technical issues:
- Check confidence scores for extraction quality
- Review CLAUDE.md for architecture details
- Monitor console logs for debugging information
- Consider photo quality and lighting improvements
Built with: Next.js 15, OpenAI GPT-4o, Vercel AI SDK v5, TypeScript, Tailwind CSS, shadcn/ui