Unify your scattered business knowledge into a single, intelligent interface
GenAlima is an enterprise-grade AI search platform that enables businesses to create intelligent AI agents capable of searching and answering questions from all their business data sources. Built with cutting-edge AI technologies and a modern tech stack, GenAlima transforms how organizations access and utilize their knowledge.
- Vector Search: Semantic search across all your documents using pgvector
- RAG (Retrieval Augmented Generation): Combines search results with LLM responses for accurate answers
- Multi-format Support: Process PDFs, Word documents, text files, and more
- Real-time Streaming: Get AI responses as they're generated
- Google Workspace: Gmail integration with OAuth2
- Azure DevOps: Project management and collaboration
- Notion: Workspace and documentation (coming soon)
- Custom APIs: Flexible connector architecture for any data source
- Multiple LLM Support: OpenAI, Google Gemini, Anthropic Claude
- LangGraph Agent: Sophisticated multi-step reasoning and tool chaining
- Context-Aware Responses: Maintains conversation history and context
- Dynamic Tool Selection: Automatically chooses the right tools for each query
- JWT Authentication: Secure token-based authentication
- Role-Based Access Control: Manage user permissions
- Encrypted Credentials: Secure storage of API keys and tokens
- Read-Only Data Access: Ensures data integrity
- Template-Based Chats: Pre-configured templates for common use cases
- Persistent History: Save and retrieve conversation history
- Markdown Support: Rich text formatting in messages
- Session Management: Maintain state across conversations
- Python 3.11+
- Node.js 18+
- PostgreSQL 14+ with pgvector extension
- OpenAI API key (or other LLM provider keys)
-
Clone the repository
git clone https://github.com/yourusername/GenAlima.git cd GenAlima -
Set up the backend
# Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Set up environment variables cp .example.env .env # Edit .env with your configuration
-
Set up the database
# Create PostgreSQL database with pgvector createdb alima psql -d alima -c "CREATE EXTENSION vector;" # Run migrations alembic upgrade head
-
Set up the frontend
cd frontend npm install -
Configure environment variables
Edit
.envfile with your settings:# Database POSTGRES_SERVER=localhost POSTGRES_PORT=5432 POSTGRES_DB=alima POSTGRES_USER=postgres POSTGRES_PASSWORD=your_password # OpenAI (or other LLM provider) OPENAI_API_KEY=your_openai_api_key # Frontend FRONTEND_HOST=http://localhost:5173 BACKEND_CORS_ORIGINS=http://localhost:5173 # Google OAuth (for Gmail integration) GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret
-
Start the backend server
# From project root python main.py # Server runs on http://localhost:8000
-
Start the frontend development server
# From frontend directory npm run dev # Frontend runs on http://localhost:5173
-
Access the application Open your browser and navigate to
http://localhost:5173
GenAlima/
βββ app/ # Backend FastAPI application
β βββ api/ # API routes and endpoints
β β βββ routes/ # Route definitions
β β βββ deps.py # Dependencies
β βββ core/ # Core configuration
β β βββ config.py # Settings management
β β βββ security.py # Authentication
β βββ models.py # Database models
β βββ schemas.py # Pydantic schemas
β βββ alembic/ # Database migrations
βββ frontend/ # React TypeScript frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ routes/ # Page components
β β βββ hooks/ # Custom React hooks
β β βββ client/ # API client
β βββ package.json # Frontend dependencies
βββ graphs/ # LangGraph AI agent
β βββ tools/ # AI tool implementations
β βββ prompts/ # System prompts
β βββ main.py # Agent orchestration
βββ connectors/ # External service integrations
βββ gen_model/ # LLM utilities
βββ requirements.txt # Python dependencies
GenAlima uses PostgreSQL with the pgvector extension for vector similarity search:
-- Enable pgvector extension
CREATE EXTENSION IF NOT EXISTS vector;
-- The application will create necessary tables via Alembic migrationsConfigure your preferred LLM provider in .env:
# OpenAI
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4-turbo-preview
# Google Gemini
GOOGLE_API_KEY=...
GOOGLE_MODEL=gemini-pro
# Anthropic Claude
ANTHROPIC_API_KEY=...
ANTHROPIC_MODEL=claude-3-opusBuild and run with Docker:
# Build the image
docker build -t genalima .
# Run the container
docker run -p 8080:8080 \
-e POSTGRES_SERVER=host.docker.internal \
-e OPENAI_API_KEY=your_key \
genalimaOnce the backend is running, access the interactive API documentation:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
POST /api/v1/login/access-token- User authenticationGET /api/v1/users/me- Get current userPOST /api/v1/chats/- Create new chatPOST /api/v1/messages/- Send messagePOST /api/v1/knowledge/upload- Upload documentsGET /api/v1/knowledge/search- Search knowledge base
# Format code
black .
isort .
# Lint code
pylint app/
ruff check .
# Type checking
mypy app/# Run backend tests
pytest
# Run frontend tests
cd frontend && npm test# Create new migration
alembic revision --autogenerate -m "Description"
# Apply migrations
alembic upgrade head
# Rollback
alembic downgrade -1We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create your 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
- File upload and vector search
- Gmail integration
- Notion integration
- GitHub integration
- LangGraph agent implementation
- Template-based chats with pre-defined templates and workflows
- Draft letter to send to court
- Create task list from meeting notes in given format
- Database connector (Text-to-SQL)
- API data source configuration
- MCP (Model Context Protocol) integration
- n8n workflow integration
- Advanced analytics dashboard
- Team collaboration features
- Desktop application for meeting notes and real-time help from Internal Knowledge Base and Internet
- Multi-tenant architecture
- Advanced permission system
- Real-time collaboration
- Mobile applications
- Self-hosted enterprise edition
- All credentials are encrypted at rest
- CORS protection enabled
- SQL injection prevention via SQLModel ORM
- Rate limiting on API endpoints
- Regular security audits
This project is licensed under the MIT License - see the LICENSE file for details.
- FastAPI - Modern web framework
- LangChain - LLM application framework
- React - UI library
- PostgreSQL - Database
- pgvector - Vector similarity search
- Documentation: docs.genalima.com
- Issues: GitHub Issues
- Discord: Join our community
- Email: support@genalima.com
Built with β€οΈ by the GenAlima Team
β Star us on GitHub!