Poke AI is an intelligent agent that automatically researches users by analyzing their Gmail data and web presence, then engages in natural conversations with personalized insights. Built with Composio
Poke AI acts as a knowledgeable conversation partner that:
- Automatically analyzes your Gmail account to understand your professional background, communication patterns, and work context
- Researches your web presence using your email domain and profile information to gather additional professional insights
- Engages in personalized conversations with context about your work, interests, and professional activities
- Maintains conversation history while referencing discovered information when relevant
- Provides intelligent responses that demonstrate understanding of your professional context and background
The system consists of three main components:
- Frontend (React + Vite) - Modern chat interface with WhatsApp/iOS Messages styling
- Backend (FastAPI + Python) - Agent processing engine with message queue system
- Composio Integration - Handles Gmail authentication and tool execution
- Gmail Profile Analysis - Extracts basic profile information and email domain
- Email Pattern Analysis - Analyzes signatures, communication patterns, and professional contacts
- Web Research - Uses email domain and profile data to search for additional professional information
- Context Building - Combines multiple data sources to build comprehensive user profile
- Conversation Mode - Transitions to normal chat while maintaining discovered context
- Frontend: React, TypeScript, Tailwind CSS, Vite
- Backend: FastAPI, Python, LangGraph, LangChain
- AI Model: OpenAI GPT-4
- Integration Platform: Composio
- Storage: In-memory (no database required)
- Authentication: Gmail OAuth via Composio
- Node.js 20.19+ or 22.12+
- Python 3.8+
- OpenAI API key
- Composio account and API key
- Clone the repository:
git clone <repository-url>
cd poke-ai- Set up the backend:
cd poke-backend
pip install -r requirements.txt- Set up the frontend:
cd poke-frontend
npm install- Configure environment variables:
Create .env file in the project root:
OPENAI_API_KEY=your_openai_api_key_here
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_AUTH_CONFIG_ID=your_gmail_auth_config_id- Start the backend:
cd poke-backend
uvicorn server.api:app --host 0.0.0.0 --port 8000 --reload- Start the frontend:
cd poke-frontend
npm run dev- Open http://localhost:5173 in your browser
This project leverages Composio for seamless Gmail integration. Composio provides:
- Secure OAuth authentication for Gmail access
- Pre-built Gmail tools for email analysis and search
- Web search capabilities for additional research
- Tool execution framework with proper error handling
GMAIL_GET_PROFILE- Retrieves user profile informationGMAIL_SEARCH_PEOPLE- Searches for professional profilesGMAIL_FETCH_EMAILS- Analyzes email patterns and signaturesCOMPOSIO_SEARCH- Performs web searches for additional context
For more information about Composio's capabilities, visit the Composio Documentation.
The agent's personality and research approach can be customized by modifying the system prompts in poke-backend/server/agent.py. The system supports two modes:
- Research Mode - Initial analysis and profile building
- Conversation Mode - Ongoing chat with discovered context
Extend the research capabilities by:
- Adding new Composio tools in
poke-backend/server/tools.py - Modifying the research strategy in the agent's system prompt
- Updating the tool selection logic in the agent
The frontend chat interface can be modified in:
poke-frontend/src/components/- Individual UI componentspoke-frontend/src/App.tsx- Main application logicpoke-frontend/src/index.css- Styling and animations
Customize how responses are processed and stored by modifying:
poke-backend/server/message_processor.py- Message queue handling and data storagepoke-backend/server/api.py- API endpoints and response formatting
POST /users- Create new userGET /users/{user_id}- Retrieve user informationGET /users/{user_id}/memory- Get user insights and memoryGET /users/{user_id}/conversations- Retrieve conversation history
POST /connections/initiate- Start Gmail OAuth flowGET /connections/{connection_id}/status- Check connection status
POST /messages- Send message to agentGET /health- Health check endpoint
Modify research depth and focus by adjusting:
- Tool selection in
tools.py - Research prompts in
agent.py - Conversation memory limits in
message_processor.py
Configure security measures:
- CORS origins in
api.py - API response sanitization in
api.py - Environment variable validation
Optimize performance by adjusting:
- Message processing intervals in
message_processor.py - In-memory storage size limits
- Frontend polling frequency
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License. See LICENSE file for details.
- Composio Platform
- Composio Documentation
- Composio GitHub
- FastAPI Documentation
- React Documentation
- LangChain Documentation
For questions about this implementation, please open an issue in the repository.
For Composio-specific questions, visit the Composio Documentation or Composio Community.