An intelligent conversational AI agent that serves as a digital representative for Hariprasad Bantwal, a senior IT professional with 20+ years of experience in cloud infrastructure, enterprise architecture, and financial services platforms.
Try the AI Agent Live: Chat with Hariprasad Bantwal
The application is deployed on Hugging Face Spaces and ready for interaction!
syntropAI-Insight is a sophisticated AI-powered personal assistant that creates an interactive chat experience for website visitors. Built with OpenAI's GPT-4o-mini and Gradio, it provides intelligent responses about professional experience, skills, and background while capturing leads and tracking unanswered questions for continuous improvement.
- π€ Intelligent Conversation: Natural language processing powered by OpenAI GPT-4o-mini
- π Knowledge Integration: Automatically extracts and processes information from LinkedIn PDF profiles
- π§ Tool-Based Architecture: Function calling for structured data collection and lead capture
- π± Real-time Notifications: Pushover integration for instant interaction alerts
- π― Lead Management: Automatic recording of interested visitors and their contact information
- π Analytics: Tracks and records unanswered questions for knowledge base expansion
- Gradio Chat Interface: Modern, user-friendly web-based chat UI
- PDF Document Processing: Automatically extracts text from LinkedIn PDF profiles
- Tool-based Functionality: Uses OpenAI function calling for structured data collection
- Push Notifications: Real-time alerts via Pushover for new interactions
- Environment-based Configuration: Secure API key and token management
The agent is built around a Me class that encapsulates the personality and capabilities of Hariprasad Bantwal:
class Me:
def __init__(self):
# Initialize OpenAI client
# Load LinkedIn profile from PDF
# Load personal summarygraph TB
subgraph "Client Layer"
UI[Gradio Web Interface]
User[Website Visitors]
end
subgraph "Application Layer"
Me[Me Class - AI Agent]
SystemPrompt[System Prompt Manager]
ToolHandler[Tool Call Handler]
end
subgraph "External Services"
OpenAI[OpenAI GPT-4o-mini API]
Pushover[Pushover Notification API]
end
subgraph "Data Sources"
LinkedIn[LinkedIn PDF Profile]
Summary[Personal Summary]
Env[Environment Variables]
end
subgraph "Function Tools"
RecordUser[record_user_details]
RecordQuestion[record_unknown_question]
end
User --> UI
UI --> Me
Me --> SystemPrompt
Me --> OpenAI
Me --> ToolHandler
SystemPrompt --> LinkedIn
SystemPrompt --> Summary
SystemPrompt --> Env
ToolHandler --> RecordUser
ToolHandler --> RecordQuestion
RecordUser --> Pushover
RecordQuestion --> Pushover
OpenAI --> Me
Me --> UI
UI --> User
sequenceDiagram
participant User
participant Gradio as Gradio Interface
participant Agent as Me Class
participant OpenAI as OpenAI API
participant Tools as Function Tools
participant Pushover as Pushover API
User->>Gradio: Send message
Gradio->>Agent: chat(message, history)
Agent->>Agent: Load system prompt with knowledge base
Agent->>OpenAI: Send conversation with tools
alt Tool call required
OpenAI->>Agent: Response with tool_calls
Agent->>Tools: Execute tool (record_user_details or record_unknown_question)
Tools->>Pushover: Send notification
Pushover->>Tools: Confirmation
Tools->>Agent: Tool result
Agent->>OpenAI: Continue conversation with tool results
end
OpenAI->>Agent: Final response
Agent->>Gradio: Return message
Gradio->>User: Display response
The system follows a clean layered architecture pattern:
- Presentation Layer: Gradio web interface for user interactions
- Application Layer: Core AI agent logic and conversation management
- Service Layer: External API integrations (OpenAI, Pushover)
- Data Layer: Knowledge base and configuration management
| Component | Technology | Purpose |
|---|---|---|
| Runtime | Python 3.12+ | Core application logic |
| AI/LLM | OpenAI GPT-4o-mini | Natural language processing and conversation |
| Web Framework | Gradio 5.36.2 | Interactive web interface |
| PDF Processing | PyPDF2 3.0.1 | LinkedIn profile text extraction |
| Notifications | Pushover API | Real-time interaction alerts |
| Configuration | python-dotenv | Environment variable management |
| Deployment | Hugging Face Spaces | Cloud hosting platform |
syntropAI-Insight/
βββ src/
β βββ main.py # Main application entry point
β βββ me/
β β βββ linkedin.pdf # LinkedIn profile source
β β βββ summary.txt # Personal summary and background
β βββ requirements.txt # Package dependencies
βββ test/ # Test files (if any)
βββ pyproject.toml # Project configuration and dependencies
βββ requirements.txt # Generated dependency lock file
βββ compose-dev.yaml # Docker development environment
βββ LICENSE # Project license
βββ README.md # This file
The agent's knowledge comes from two primary sources:
- LinkedIn Profile PDF: Automatically extracted text from
./me/linkedin.pdf - Personal Summary: Curated background information from
./me/summary.txt
The agent uses a carefully crafted system prompt that:
- Establishes the AI's role as Hariprasad Bantwal
- Provides context about the website interaction purpose
- Includes the knowledge base content
- Sets professional and engaging communication guidelines
The agent has access to two specialized tools:
- Purpose: Capture interested visitors' contact information
- Parameters: email, name, notes
- Trigger: When users show interest in getting in touch
- Purpose: Track questions the agent cannot answer
- Parameters: question
- Trigger: When the agent encounters questions outside its knowledge scope
- Initialization: Agent loads profile data and establishes system context
- Message Processing: Each user message is processed through the OpenAI API
- Tool Execution: If function calls are needed, tools are executed and results returned
- Response Generation: Final response is generated and displayed to the user
- Notification: Relevant interactions trigger push notifications
- Unknown Questions: Automatically recorded for human review
- Tool Failures: Graceful degradation with fallback responses
- API Issues: Robust error handling for OpenAI API calls
- Python 3.12 or higher
- OpenAI API key
- Pushover account (for notifications)
-
Clone the repository:
git clone https://github.com/yourusername/syntropAI-Insight.git cd syntropAI-Insight -
Install dependencies using uv (recommended):
uv pip install -r requirements.txt
Or using pip:
pip install -r requirements.txt
-
Configure environment variables: Create a
.envfile in the project root:OPENAI_API_KEY=your_openai_api_key_here PUSHOVER_TOKEN=your_pushover_app_token PUSHOVER_USER=your_pushover_user_key
-
Prepare knowledge base:
- Place your LinkedIn profile PDF at
src/me/linkedin.pdf - Create or update
src/me/summary.txtwith your personal summary
- Place your LinkedIn profile PDF at
-
Run the application:
python src/main.py
The Gradio interface will launch and be available at http://localhost:7860
For development with Docker:
docker-compose -f compose-dev.yaml upThe application launches a Gradio web interface where visitors can:
- Ask questions about professional background and experience
- Learn about skills, certifications, and expertise areas
- Get in touch by providing their contact information
- Receive intelligent, contextual responses in real-time
- Experience natural conversation flow with follow-up questions
Visitor: "What's your experience with cloud architecture?" AI Agent: Provides detailed response based on LinkedIn profile and summary
Visitor: "I'd like to discuss a potential collaboration" AI Agent: Engages and asks for contact details using the record_user_details tool
To customize this agent for yourself:
-
Update Knowledge Base:
- Replace
src/me/linkedin.pdfwith your LinkedIn profile export - Modify
src/me/summary.txtwith your professional background - Update the name in
src/main.pyline 83:self.name = "Your Name"
- Replace
-
Customize System Prompt:
- Modify the
system_prompt()method in theMeclass (src/main.py:105-116) - Adjust the tone, focus areas, and conversation style
- Modify the
-
Extend Functionality:
- Add new tools by creating functions and JSON schemas
- Integrate additional data sources (databases, APIs, etc.)
- Enhance notification systems or add analytics
The agent behavior can be modified through:
- Environment variables for API keys and settings
- System prompt customization for personality and expertise focus
- Tool definitions for additional capabilities
- Knowledge base updates for domain-specific information
The main agent class that handles conversation logic.
Methods:
__init__(): Initializes OpenAI client and loads knowledge basesystem_prompt(): Generates dynamic system prompt with knowledge basechat(message, history): Main conversation handlerhandle_tool_call(tool_calls): Executes function tools
Records visitor contact information and sends notification.
Parameters:
email(required): User's email addressname(optional): User's namenotes(optional): Additional context about the interaction
Logs questions that couldn't be answered for knowledge base expansion.
Parameters:
question(required): The unanswered question
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Python PEP 8 style guidelines
- Add docstrings for new functions and classes
- Test with various conversation scenarios
- Ensure proper error handling for API calls
- Update documentation for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for the GPT-4o-mini API
- Gradio team for the excellent web interface framework
- Pushover for reliable notification services
- Hugging Face for seamless deployment platform
Built with β€οΈ by Hariprasad Bantwal - Senior IT Professional & Cloud Architect