AI-Powered Bereavement Support Platform
Afterversed is an intelligent, compassionate platform that guides users through the complex process of handling post-death administrative tasks using multi-agent AI orchestration. Built with modern web technologies and powered by Google's Gemini AI, it automates legal, financial, and organizational tasks during one of life's most challenging times.
- LangGraph Orchestration: State-of-the-art agent-to-agent communication
- 4 Specialized Agents Working Together:
- ๐ SearchAgent: Finds banks, government offices, and service providers
- โ๏ธ DraftingAgent: Generates professional letters and legal documents
- ๐ค FormAgent: Automates form submission and tracks responses
- ๐งฎ ComputeAgent: Validates financial calculations and tax compliance
- Funeral Arrangement: AI-powered search for funeral homes with pricing comparison
- Financial & Legal Workflow: Automated estate valuation, probate assessment, and IHT calculations
- Document Generation: Professional UK business letters and government forms
- Task Status Tracking: Real-time progress monitoring with database persistence
- Modern, responsive React + TypeScript frontend
- Gradient designs with smooth animations
- Step-by-step guided procedures
- Real-time agent progress visualization
- Mobile-friendly interface
- Interactive checklist with AI automation indicators
- Task completion tracking with green status badges
- Financial summary with tax calculations
- Timeline of all agent activities
- Action items and key deadlines
- FastAPI: High-performance Python web framework
- SQLite + aiosqlite: Async database operations
- LangGraph: Multi-agent workflow orchestration
- Google Gemini AI: Natural language processing and generation
- Playwright: Browser automation for web scraping
- Strands Framework: AI agent tooling
- React 18: Modern component-based UI
- TypeScript: Type-safe development
- Vite: Lightning-fast build tool
- TanStack Query: Server state management
- shadcn/ui: Beautiful, accessible component library
- Tailwind CSS: Utility-first styling
- Radix UI: Unstyled, accessible primitives
- google-genai: Official Google Gemini SDK
- langchain-google-genai: LangChain integration
- langchain-core: Core LangChain functionality
- Python 3.14+
- Node.js 18+
- Google Gemini API key
- Git
git clone https://github.com/Stanleyhoo1/Afterversed.git
cd Afterversedcd app
# Install Python dependencies
pip install -r requirements.txt
# Create .env file
echo "GEMINI_API_KEY=your_api_key_here" > .env
# Initialize database
python -c "from database import init_db; import asyncio; asyncio.run(init_db())"cd ../frontend
# Install Node dependencies
npm install
# Create .env file
echo "VITE_API_URL=http://localhost:8000" > .envcd app
python -m uvicorn main:app --reload --port 8000cd frontend
npm run dev- Frontend:
http://localhost:8080 - Backend API:
http://localhost:8000 - API Docs:
http://localhost:8000/docs
- Navigate to the homepage
- Fill out the bereavement survey with details about the deceased
- Submit to create your session
- Go to "Financial Procedure" from the survey completion page
- Toggle "Multi-Agent Mode" ON to see all agents working
- Check "Use Example Data" for a demo
- Click "๐ค Run AI Calculations"
- Watch the agents work:
- SearchAgent finds institutions
- DraftingAgent creates documents
- FormAgent submits forms
- ComputeAgent validates finances
- Review comprehensive results with financial summary, tax calculations, and action items
- Navigate to the "Procedure" dashboard
- Follow tasks sequentially:
- Register the Death: Get certificates and notify authorities
- Arrange Funeral: Use AI to search funeral homes
- Legal & Financial: Access automated workflow
- Notify Organizations: Contact banks, utilities, etc.
- Use AI assistants for specific tasks (funeral search, legal workflow)
- Completed tasks show green background with โ badges
- View all task statuses in the procedure dashboard
- Access generated documents and reports
User Input
โ
๐ SearchAgent
โ โข Finds banks in user's location
โ โข Locates HMRC offices
โ โข Identifies probate registry
โ
โ๏ธ DraftingAgent
โ โข Generates death notification letters
โ โข Creates IHT400 form guidance
โ โข Drafts PA1P probate application
โ
๐ค FormAgent
โ โข Simulates form submission
โ โข Generates bank responses
โ โข Creates HMRC acknowledgments
โ
๐งฎ ComputeAgent
โ โข Calculates net estate value
โ โข Computes inheritance tax (IHT)
โ โข Validates against HMRC estimates
โ โข Checks probate requirements
โ
๐ Report Generator
โ โข Executive summary
โ โข Timeline of actions
โ โข Financial breakdown
โ โข Next action items
โ
Final Report โ User
- LangGraph maintains state between agents
- Each agent passes data to the next
- Full traceability of all decisions
- Error handling at each step
Afterversed/
โโโ app/ # Backend (Python/FastAPI)
โ โโโ main.py # FastAPI application & endpoints
โ โโโ database.py # SQLite operations & task status
โ โโโ agents.py # AI checklist generator
โ โโโ compute_agent.py # Financial calculations agent
โ โโโ search.py # SearchAgent with Playwright
โ โโโ langgraph_workflow.py # Multi-agent orchestration
โ โโโ draft_email.py # Email drafting utilities
โ โโโ schema.sql # Database schema
โ โโโ requirements.txt # Python dependencies
โ โโโ .env # Environment variables
โ
โโโ frontend/ # Frontend (React/TypeScript)
โ โโโ src/
โ โ โโโ pages/ # Page components
โ โ โ โโโ Index.tsx # Landing page
โ โ โ โโโ Survey.tsx # Bereavement survey
โ โ โ โโโ Procedure.tsx # Main dashboard
โ โ โ โโโ FinancialProcedure.tsx # Financial workflow
โ โ โ โโโ LegalFinancialWorkflow.tsx # LangGraph UI
โ โ โ โโโ FuneralArrangement.tsx # Funeral search
โ โ โโโ components/ # Reusable components
โ โ โ โโโ ui/ # shadcn/ui components
โ โ โโโ lib/
โ โ โ โโโ api.ts # API client functions
โ โ โ โโโ config.ts # Configuration
โ โ โ โโโ utils.ts # Utilities
โ โ โโโ hooks/ # Custom React hooks
โ โโโ package.json # Node dependencies
โ โโโ vite.config.ts # Vite configuration
โ
โโโ README.md # This file
POST /sessions- Create new sessionGET /sessions/{id}- Get session detailsPOST /sessions/{id}/survey- Submit survey data
POST /sessions/{id}/generate-checklist- Generate task checklistPOST /sessions/{id}/compute- Run financial calculations (ComputeAgent)POST /sessions/{id}/search-funeral- Search funeral homes (SearchAgent)POST /sessions/{id}/langgraph-workflow- Execute multi-agent workflow
GET /sessions/{id}/task-statuses- Get all task statusesPOST /sessions/{id}/financial-assessment- Assess estate requirements
- AI-generated checklist based on survey responses
- Tailored to UK regulations and procedures
- Automation level indicators (full/partial/none)
- Agent type recommendations (Search/Draft/Form/Compute)
- Estate Valuation: Property, bank accounts, investments
- Probate Assessment: ยฃ5,000 threshold check
- Inheritance Tax (IHT):
- Nil-rate band: ยฃ325,000
- IHT rate: 40% on taxable estate
- Validation against HMRC estimates
- Discrepancy Detection: Flags calculation mismatches
- Professional UK business letter formatting
- Death notification letters for banks
- IHT400 form completion guidance
- PA1P probate application instructions
- Customized with deceased details
- Location-based search
- Three service types: Cremation, Burial, Woodland
- Pricing comparison
- Ratings and reviews
- Direct links to provider websites
- Animated agent progress bars
- Step-by-step status updates
- Color-coded completion states
- Estimated completion times
- Session-based data: Each user gets isolated session
- No authentication required: Privacy-first approach
- Local storage: Task statuses cached client-side
- Secure API keys: Environment variable management
- No sensitive data logging: Compliance with data protection
cd app
python strandTest.py # Test Strands agent frameworkcd frontend
npm run build # Production build test# Set environment variables
GEMINI_API_KEY=your_key
PORT=8000
# Deploy
git push railway main# Set environment variable
VITE_API_URL=https://your-api.com
# Deploy
npm run build
vercel deployContributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI: Powers the intelligent agents
- LangChain/LangGraph: Multi-agent orchestration framework
- shadcn/ui: Beautiful component library
- FastAPI: High-performance Python framework
- UK Government Digital Service: Inspiration for clear, accessible design
Project Maintainer: Stanley Hoo
Repository: Afterversed
- Real form submission integration with UK government APIs
- Document storage with cloud integration
- Email automation for institution notifications
- Calendar integration for deadline tracking
- Mobile app (React Native)
- Multi-language support (Welsh, Scottish Gaelic)
- Voice assistant integration
- PDF generation for documents
- Analytics dashboard for estate administrators
- Community support forum
Dealing with administrative tasks after losing a loved one is overwhelming. Afterversed aims to:
โ
Reduce cognitive load during grief
โ
Automate repetitive tasks with AI
โ
Provide clear guidance through complex procedures
โ
Ensure nothing is missed with comprehensive checklists
โ
Save time with intelligent automation
โ
Offer peace of mind with validation and tracking
- 4 Specialized AI Agents
- 50+ Automated Tasks
- Real-time Progress Tracking
- UK Regulation Compliant
- Mobile-First Design
- Zero-Cost Entry (Free tier APIs)
Built with โค๏ธ to help during life's difficult moments