AI-powered client onboarding automation using Portia's controllable agent framework - AgentHack 2024 submission
Aegis Onboarding is a comprehensive AI-powered solution that automates the entire client onboarding process for freelancers and agencies. Built with Portia's controllable agent framework, it handles everything from contract generation to project setup automatically, while maintaining human oversight for critical decisions.
- π€ Full Automation: Complete onboarding workflow from start to finish
- π₯ Human-in-the-Loop: Strategic approval checkpoints for quality control
- β‘ Real-time Updates: Live progress tracking via WebSocket connections
- π¨ Beautiful UI: Modern, responsive interface with smooth animations
- π Secure: Enterprise-grade security with comprehensive error handling
- π Multi-step Workflow: 8 automated onboarding steps including:
- Google Drive folder creation
- Contract generation and approval
- Communication channel setup (Slack/Discord)
- GitHub repository creation
- Notion project board setup
- Welcome email with calendar invite
- Stripe billing and invoicing
- FastAPI: High-performance Python web framework
- Portia Integration: AI agent orchestration (simulated)
- WebSocket: Real-time client-server communication
- Pydantic: Data validation and serialization
- Professional Error Handling: Comprehensive error management
- Next.js 14: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first styling
- Framer Motion: Smooth animations and transitions
- React Hook Form + Zod: Form handling and validation
- Socket Integration: Real-time updates
aegis-onboarding/
βββ backend/ # Python FastAPI backend
β βββ main.py # Application entry point
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment variables template
β βββ agents/ # Portia agent logic
β β βββ __init__.py
β β βββ onboarding_agent.py
β βββ models/ # Data models
β β βββ __init__.py
β β βββ client.py # Client data models
β β βββ responses.py # API response models
β βββ routes/ # API endpoints
β β βββ __init__.py
β β βββ onboarding.py # Onboarding routes
β βββ utils/ # Utilities
β βββ __init__.py
β βββ websocket.py # WebSocket management
βββ frontend/ # Next.js frontend
β βββ package.json
β βββ next.config.js
β βββ tailwind.config.js
β βββ tsconfig.json
β βββ src/
β βββ app/ # App Router pages
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Main page
β β βββ globals.css # Global styles
β βββ components/ # React components
β β βββ ui/ # Reusable UI components
β β βββ ClientForm.tsx
β β βββ StatusDashboard.tsx
β β βββ ProgressStep.tsx
β β βββ ApprovalModal.tsx
β βββ hooks/ # Custom hooks
β β βββ useWebSocket.ts
β βββ types/ # TypeScript types
β β βββ index.ts
β βββ utils/ # Utility functions
β βββ api.ts # API client
βββ docker-compose.yml # Development environment
βββ .gitignore # Git ignore rules
βββ README.md # This file
- Node.js 18+ and npm/yarn
- Python 3.8+ and pip
- Git for version control
git clone https://github.com/ravixalgorithm/aegis-onboarding.git
cd aegis-onboarding
cd backend
# Install dependencies
pip install -r requirements.txt
# Copy environment template
cp .env.example .env
# Edit .env with your API keys (optional for demo)
# nano .env
# Start the backend server
python main.py
The backend will be available at http://localhost:8000
cd ../frontend
# Install dependencies
npm install
# Start the development server
npm run dev
The frontend will be available at http://localhost:3000
# Start all services
docker-compose up --build
# Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000
# API Docs: http://localhost:8000/docs
-
Fill out the client form with:
- Personal information (name, email, company, phone)
- Project details (type, scope, budget, timeline)
- Additional notes
-
Submit the form to start the automated workflow
-
Monitor progress in real-time on the status dashboard
-
Approve critical steps when prompted (e.g., contract review)
-
Celebrate completion when all steps are finished!
- π Create Google Drive Folder - Dedicated project workspace
- π Draft Contract - Auto-generated service agreement
- β Human Approval - Contract review and approval
- π¬ Setup Communication - Slack/Discord channel creation
- π¨βπ» Create GitHub Repository - Code repository with permissions
- π Setup Project Board - Notion workspace configuration
- π§ Send Welcome Email - Welcome message with calendar invite
- π³ Setup Billing - Stripe customer and invoice creation
Create a .env
file in the backend
directory:
# Portia Configuration
PORTIA_API_KEY=your_portia_api_key_here
# Google APIs
GOOGLE_DRIVE_API_KEY=your_google_drive_api_key
GOOGLE_DOCS_API_KEY=your_google_docs_api_key
# Communication Platforms
SLACK_BOT_TOKEN=your_slack_bot_token
DISCORD_BOT_TOKEN=your_discord_bot_token
# Development Tools
GITHUB_TOKEN=your_github_token
NOTION_API_KEY=your_notion_api_key
# Email Service
SENDGRID_API_KEY=your_sendgrid_api_key
# Billing
STRIPE_API_KEY=your_stripe_api_key
# Application Settings
APP_ENV=development
FRONTEND_URL=http://localhost:3000
Note: The application works in simulation mode without actual API keys for demonstration purposes.
- POST
/api/v1/onboarding/start
- Start onboarding process - GET
/api/v1/onboarding/status/{client_id}
- Get onboarding status - POST
/api/v1/onboarding/approve/{client_id}/{step_id}
- Approve/reject step - GET
/api/v1/onboarding/clients
- List all clients - WebSocket
/ws/{client_id}
- Real-time updates
Full API documentation is available at http://localhost:8000/docs
when running the backend.
cd backend
# Install development dependencies
pip install -r requirements.txt
# Run with auto-reload
python main.py
# Run tests (if available)
pytest
# Format code
black .
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Run type checking
npm run type-check
# Lint code
npm run lint
- Primary: #6366f1 (Indigo) - Main brand color
- Secondary: #10b981 (Emerald) - Success states
- Background: Clean white/gray gradient
- Typography: Inter font family
- Framer Motion for smooth page transitions
- Progress indicators with real-time updates
- Celebration effects on completion
- Loading states with spinners and pulses
- Mobile-first approach
- Tailwind CSS utility classes
- Flexible grid layouts
- Touch-friendly interactions
# Backend
cd backend
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8000
# Frontend
cd frontend
npm run build
npm start
# Build production images
docker-compose -f docker-compose.prod.yml up --build
- Set production environment variables
- Configure SSL certificates
- Setup reverse proxy (nginx)
- Configure monitoring and logging
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - 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 TypeScript/Python best practices
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure responsive design
This project is licensed under the MIT License - see the LICENSE file for details.
This project was built for AgentHack 2024, showcasing the power of AI agents in automating complex business processes while maintaining human oversight and control.
- Human-AI Collaboration: Perfect balance between automation and human judgment
- Real-time Orchestration: Live updates and status tracking
- Production-Ready: Enterprise-grade error handling and security
- Beautiful UX: Focus on user experience and visual design
- Scalable Architecture: Modular design for easy extension
- Portia Team for the amazing AI agent framework
- AgentHack 2024 organizers for the opportunity
- Open Source Community for the incredible tools and libraries
For questions, issues, or feature requests:
- GitHub Issues: Create an issue
- Email: support@aegis-onboarding.com
- Documentation: Available in the
/docs
folder
Built with β€οΈ by the Aegis team for AgentHack 2024