π A production-ready template for building AI agents with web access
Combine AI21's Maestro platform with Bright Data's web scraping capabilities to create powerful AI agents that can research and analyze real-time web data.
Getting Started β’ Demo β’ Documentation β’ Contributing
Configure and run AI agents with different personalities and budgets
Explore and test all endpoints with FastAPI's automatic documentation
| Feature | Description |
|---|---|
| π€ AI Agent Dashboard | Configure and run AI agents with different personalities and budgets |
| π Web Data Access | Integration with Bright Data's free and pro web scraping tools |
| π Real-time Results | Watch your agents work and see results as they happen |
| π Run History | Track all your agent runs with detailed logs and results |
| π¨ Beautiful UI | Modern, responsive interface built with HeroUI components |
| β‘ Fast API | High-performance FastAPI backend with async support |
| π Production Ready | Environment configuration, error handling, and security best practices |
| π Auto Documentation | Interactive API docs with FastAPI's automatic OpenAPI generation |
- π€ AI21 Maestro + Bright Data Template
Before you begin, ensure you have the following installed:
Python 3.8 or higher
Node.js 16 or higher
- π AI21 Labs API key - Sign up for free
- π Bright Data token - Get your web scraping access
-
Clone the repository
git clone https://github.com/brightdata/ai21labs-brightdata-template cd maestro-brightdata -
Create virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp .env.example .env # Edit .env and add your API keys -
Start the API server
python api_server.py
π API will be available at
http://localhost:8000
-
Navigate to UI directory
cd ui -
Install dependencies
npm install
-
Start development server
npm run dev
π Web interface will be available at
http://localhost:5173
Once the backend is running, visit http://localhost:8000/docs for interactive API documentation powered by FastAPI's automatic OpenAPI generation.
| Method | Endpoint | Description |
|---|---|---|
POST |
/run |
Execute an AI agent with web access |
GET |
/status/{run_id} |
Get the status of a specific run |
GET |
/runs |
List all runs with their status |
GET |
/tools |
Get information about available Bright Data tools |
POST |
/quick-run |
Simplified endpoint for basic queries |
- Search Engine - Scrape search results from Google, Bing, or Yandex
- Web Scraper - Extract clean markdown from any webpage
- E-commerce - Amazon, Walmart, eBay, Home Depot, Zara, Etsy, Best Buy
- Social Media - LinkedIn, Instagram, Twitter, TikTok, Facebook
- Business Intelligence - ZoomInfo, Crunchbase, job listings
- Browser Automation - Navigate, click, type, screenshot
| Personality | Description |
|---|---|
| Web Researcher | Helpful assistant focused on web data research |
| Data Analyst | Technical assistant for data analysis tasks |
| Content Creator | Creative assistant for content generation |
| Technical Expert | Detailed technical responses with sources |
| Level | Resources | Best For |
|---|---|---|
| Low | Basic computation | Simple queries |
| Medium | Standard computation | Most use cases |
| High | Maximum computation | Complex analysis |
# Required
AI21_LABS_KEY=your_ai21_labs_api_key_here
BRIGHTDATA_TOKEN=your_brightdata_token_here
# Optional
PORT=8000
HOST=0.0.0.0maestro-brightdata/
βββ π api_server.py # FastAPI server
βββ π requirements.txt # Python dependencies
βββ π§ .env.example # Environment variables template
βββ π« .gitignore # Git ignore rules
βββ π README.md # This file
βββ π¨ ui/ # Frontend React app
βββ π src/
β βββ π§© components/ # Reusable UI components
β βββ π pages/ # Page components
β βββ βοΈ config/ # Configuration files
β βββ π types/ # TypeScript type definitions
βββ π¦ package.json # Node.js dependencies
βββ β‘ vite.config.ts # Vite configuration
# Run with auto-reload
uvicorn api_server:app --reload --host 0.0.0.0 --port 8000
# Format code
black .
isort .cd ui
# Development server with hot reload
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Lint code
npm run lintWe love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
- π Reporting a bug
- π‘ Discussing the current state of the code
- π Submitting a fix
- π« Proposing new features
- π― Becoming a maintainer
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and linting
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License - feel free to use this template for your own projects!
Special thanks to the amazing teams and projects that make this template possible:
- π€ AI21 Labs - For the powerful Maestro platform
- π Bright Data - For comprehensive web data collection tools
- π¨ HeroUI - For the beautiful, accessible component library
- β‘ FastAPI - For the amazing, fast web framework
- βοΈ React Team - For the incredible frontend library
- π― Vite - For the lightning-fast build tool
- π AI21 Maestro Documentation
- π Bright Data Platform Documentation
- π¨ HeroUI Component Library
- β‘ FastAPI Documentation