Adaptive AI-powered web crawler with behavioral mutation engine
npm install @0x2e8/phantom-ai-crawlerAdaptive AI-powered web crawler with behavioral mutation engine.
Powered by Claude Sonnet 4.5+ - the crawler evolves its behavior to match what targets expect.
- š§ AI-Driven: Uses Claude Sonnet 4.5 for behavioral analysis
- š Self-Mutating: DNA evolves based on target responses
- š¦ Green Light System: Trust-based progression from RED ā GREEN
- š Real-time Dashboard: Web UI for monitoring and control
- šÆ Multi-target: Crawl multiple sites simultaneously
- š Stealth: Adapts to avoid detection
``bashVia npx (no install)
npx phantom-ai-crawler
$3
`bash
1. Setup (configure API key)
phantom-ai setup2. Start server
phantom-ai start3. Open dashboard
http://localhost:8081
`š ļø Commands
`bash
phantom-ai # Start server (default)
phantom-ai start # Start backend + dashboard
phantom-ai setup # Run configuration wizard
phantom-ai status # Check configuration
`$3
`bash
phantom-ai start -p 3000 # Backend on port 3000
phantom-ai start -u 8080 # Dashboard on port 8080
phantom-ai start --setup # Force reconfiguration
`š§ Configuration
The setup wizard will ask for:
1. Anthropic API Key - Get from https://console.anthropic.com
2. Claude Model - Recommended:
claude-4-5-sonnet-20250929
3. Backend Port - Default: 4000
4. Dashboard Port - Default: 8081Config is saved to
.env in your working directory.š Project Structure
`
phantom-ai/
āāā .env # Your configuration
āāā phantom.db # SQLite database
āāā src/
ā āāā cli.ts # CLI entry point
ā āāā server/ # Backend API
āāā dashboard/ # Web UI
āāā prisma/ # Database schema
`š API Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
|
/health | GET | Server status |
| /api/targets | GET | List targets |
| /api/targets | POST | Create target |
| /api/targets/:id | GET | Target details |
| /api/dna/:id/current | GET | Current DNA |
| /api/mcp/analyze/:id | POST | Run MCP analysis |𧬠How It Works
1. Discovery (š“ RED): Initial reconnaissance phase
2. Learning (š” YELLOW): Testing behavioral patterns
3. Established (š¢ GREEN): Trusted access achieved
4. Maintenance: Continuous adaptation
The MCP (Model Context Protocol) analyzes each interaction and suggests DNA mutations to improve trust scores.
š Requirements
- Node.js 18+
- Anthropic API key
- Claude Sonnet 4.5+ access
š Troubleshooting
Port already in use:
`bash
phantom-ai start -p 3000 -u 8080 # Use different ports
`Database issues:
`bash
rm phantom.db # Reset database
phantom-ai setup
`API key not working:
`bash
phantom-ai status # Check configuration
phantom-ai setup # Reconfigure
`šļø Development
`bash
git clone https://github.com/0x2e8-gc/phantom-ai-crawler.git
cd phantom-ai
npm install
npm run dev # Development mode
npm run build # Build for production
`š¦ Publishing to NPM
`bash
1. Update version
npm version patch2. Build
npm run build3. Publish
npm publishOr dry run first
npm publish --dry-run
``MIT
---
Built with š by 0x2e8