An intelligent AI agent designed to support the complete consulting process, from initial research to final report generation for clients.
This project implements an AI-powered consultant assistant that leverages Chainlit for the frontend interface and FastAPI with Google ADK (Agent Development Kit) for the backend processing. The system is designed to streamline consulting workflows by providing intelligent assistance throughout the entire consulting lifecycle.
The system follows a modern client-server architecture with clear separation of concerns:
graph TD
subgraph "User's Computer"
A[User]
B[Browser running Chainlit UI]
A --> B
end
subgraph "Server / Cloud Environment"
C[FastAPI Backend Server]
D[Google ADK Agent]
E[PostgreSQL Database]
C --> D
D --> E
end
B --> C
D --> C
C --> B
style A fill:#D6EAF8,stroke:#333,stroke-width:2px
style B fill:#D1F2EB,stroke:#333,stroke-width:2px
style C fill:#FDEDEC,stroke:#333,stroke-width:2px
style D fill:#FEF9E7,stroke:#333,stroke-width:2px
style E fill:#E8F5E8,stroke:#333,stroke-width:2px
Flow Steps:
- User interacts with Browser running Chainlit UI
- Browser sends HTTP POST request to FastAPI Backend Server
- FastAPI calls the Google ADK Agent function
- ADK Agent queries and stores data in PostgreSQL Database
- ADK Agent returns results to FastAPI
- FastAPI sends HTTP response back to Browser
- Technology: Chainlit framework
- Purpose: Provides an intuitive chat interface for users
- Features: Real-time messaging, file uploads, interactive elements
- Communication: HTTP POST requests to FastAPI backend
- API Server: FastAPI for RESTful API endpoints
- AI Agent: Google ADK (Agent Development Kit) for intelligent processing
- Database: PostgreSQL for data persistence and retrieval
- Responsibilities:
- Request validation and routing
- Agent orchestration
- Data persistence and retrieval
- Response formatting and delivery
- Research Phase: Automated data gathering and analysis
- Analysis Phase: Intelligent insights and recommendations
- Report Generation: Automated report creation and formatting
- Client Communication: Professional response drafting
- Natural language processing for client queries
- Automated research and data synthesis
- Intelligent report generation
- Context-aware consulting recommendations
- Chainlit: Modern chat interface framework
- Python: Core programming language
- HTTP/HTTPS: Communication protocol
- FastAPI: High-performance web framework
- Google ADK: Agent Development Kit for AI capabilities
- Python: Backend programming language
- Pydantic: Data validation and serialization
- PostgreSQL: Relational database for data persistence
- Python 3.8+
- pip package manager
- Google ADK access (if required)
-
Clone the repository
git clone <repository-url> cd ai-consultant-assistant
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env # Edit .env with your configuration -
Start the backend server
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8001
-
Start the Chainlit frontend
chainlit run frontend/app.py --port 8000
- Open your browser and navigate to
http://localhost:8000 - Start a conversation with the AI consultant
- Upload documents or provide context for your consulting needs
- Receive intelligent responses and recommendations
- URL:
POST /chat - Purpose: Process user messages and return AI responses
- Request Body:
{ "message": "string", "context": "optional_context" } - Response:
{ "reply": "AI response content", "metadata": "additional information" }
ai-consultant-assistant/
├── frontend/ # Chainlit UI components
├── backend/ # FastAPI server and ADK agent
├── docs/ # Documentation
├── tests/ # Test files
├── requirements.txt # Python dependencies
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
[Add your license information here]
For questions and support, please open an issue in the repository or contact the development team.