A modular framework for creating a personal AI assistant that is context-aware, style-aware, personality-aware, and security-aware. The system processes data through an Ingestion Pipeline and responds to queries via a Query Pipeline, leveraging vector databases for efficient retrieval.
ICI Core is an extensible framework designed to create AI assistants that are:
- Context-aware: Uses vector databases to retrieve relevant information
- Style-aware: Adapts response style based on configuration
- Personality-aware: Customizable through prompt templates
- Security-aware: Validates all user input against configurable security rules
The system is architecturally divided into two primary pipelines:
- Ingestion Pipeline: Processes and stores data from various sources (Telegram, Twitter, YouTube, etc.)
- Query Pipeline: Handles user interactions, retrieves relevant context, and generates responses
Key features include:
- Modular components with well-defined interfaces
- Support for multiple data sources
- Flexible model selection (OpenAI, Anthropic, Ollama, etc.)
- Configurable vector storage backends
- Comprehensive logging and error handling
- Python 3.10 or higher
- pip package manager
- Git (if cloning the repository)
- NodeJS 18+
Note: If you face any issue while installing, check out troubleshoot file for known issues that might arise.
Choose ONE of the following installation methods based on your operating system and preference:
Note: For Windows users, use Option C. Other options are experimental for Windows Users.
Option A: Quick Setup (Recommended for Most Users)
# 1. Clone the repository
git clone https://github.com/sidetrip-ai/ici-core.git
cd ici-core
# 2. Run the setup script
chmod +x setup.sh
./setup.sh
# 3. Activate venv
source venv/bin/activate
# 4. Create and configure your environment file
cp .env.example .env
# Edit .env with your API keys and configuration# 1. Clone the repository
git clone https://github.com/sidetrip-ai/ici-core.git
cd ici-core
# 2. Run the setup script
setup.bat
# 3. Activate venv
venv\Scripts\activate
# 4. Create and configure your environment file
copy .env.example .env
# Edit .env with your API keys and configurationOption B: One-line Installation (Experimental)
# This will automatically clone the repo, set up dependencies, and prompt for configuration
curl -s https://raw.githubusercontent.com/sidetrip-ai/ici-core/main/install.sh | bash
# Activate venv
source venv/bin/activate
# After installation, edit your .env file
cp .env.example .env
# Edit .env with your API keys and configuration# Download and run the install script
Invoke-WebRequest https://raw.githubusercontent.com/sidetrip-ai/ici-core/main/install.bat -OutFile install.bat
.\install.bat
# Activate venv
venv\Scripts\activate
# After installation, edit your .env file
copy .env.example .env
# Edit .env with your API keys and configurationOption C: Manual Installation (For Advanced Users)
# 1. Clone the repository
git clone https://github.com/sidetrip-ai/ici-core.git
cd ici-core
# 2. Create virtual environment
python3 -m venv venv
# 3. Activate virtual environment
source venv/bin/activate
# 4. Install dependencies
python3 -m pip install -r requirements.txt
# 5. Create and configure your environment file
cp .env.example .env
# Edit .env with your API keys and configuration# 1. Clone the repository
git clone https://github.com/sidetrip-ai/ici-core.git
cd ici-core
# 2. Create virtual environment
python3 -m venv venv
# 3. Activate virtual environment
venv\Scripts\activate
# 4. Install dependencies
python3 -m pip install -r requirements.txt
# 5. Create and configure your environment file
copy .env.example .env
# Edit .env with your API keys and configurationTo enable WhatsApp functionality, you'll need to run the WhatsApp service separately. Follow these steps:
- Open a new terminal window
- Navigate to the WhatsApp service directory:
cd services/whatsapp-service - Install the required Node.js dependencies:
npm install
- Start the WhatsApp service:
npm run start
- Once the service is running:
- Open http://localhost:3006 in your web browser
- You'll see a QR code on the page
- Open WhatsApp on your phone
- Go to Settings > WhatsApp Web/Desktop
- Scan the QR code with your phone's camera
- Wait for authentication to complete
The WhatsApp service is now connected and ready to use with the main application.
After installation, you need to configure your environment variables in the .env file:
-
Telegram API Credentials (needed for Telegram ingestion):
TELEGRAM_API_ID: Your Telegram API IDTELEGRAM_API_HASH: Your Telegram API hashTELEGRAM_PHONE_NUMBER: Your phone number with country code
-
Generator API Key (needed for AI model access):
GENERATOR_API_KEY: Your OpenAI or Anthropic API key
For Telegram:
- Visit https://my.telegram.org/apps
- Log in with your phone number
- Create a new application
- Note your API ID and API hash
- The session string will be generated automatically on first run
For OpenAI:
- Visit https://platform.openai.com/
- Sign up or log in to your account
- Navigate to API keys section
- Create a new secret key
- Copy the key (it won't be shown again)
Once installed and configured, run the application:
# Ensure virtual environment is activated if not already
source venv/bin/activate
# Run the application
python3 main.py# Ensure virtual environment is activated if not already
venv\Scripts\activate
# Run the application
python3 main.pyThis will start the CLI interface where you can interact with your AI assistant.
The AI model is configured in the generator section of config.yaml:
generator:
api_key: $GENERATOR_API_KEY
model: gpt-4o
provider: openai
type: langchain
default_options:
temperature: 0.7
max_tokens: 1024
frequency_penalty: 0.0
presence_penalty: 0.0
top_p: 1.0You can change the model parameter to any of these OpenAI models:
gpt-4o(default)gpt-4-turbogpt-4gpt-3.5-turbo
To switch to Claude models:
generator:
api_key: $GENERATOR_API_KEY
model: claude-3-opus-20240229
provider: anthropic
type: langchain
default_options:
temperature: 0.7
max_tokens: 1024Available Claude models:
claude-3-opus-20240229claude-3-sonnet-20240229claude-3-haiku-20240307
To use locally hosted Ollama models:
- Install Ollama (https://ollama.com/)
- Pull your preferred model (e.g.,
ollama pull llama3) - Update your configuration:
generator:
model: llama3
provider: ollama
type: langchain
default_options:
temperature: 0.7
max_tokens: 1024Available Ollama models depend on what you've pulled, but common options include:
llama3mistralmixtralvicunagemma
Comprehensive documentation is available in the docs directory:
- Functional Requirements: Detailed requirements for the ICI framework
- Technical Specifications: In-depth technical details of components and architecture
- Project Structure: Overview of the codebase organization
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions to ICI Core! Please see CONTRIBUTING.md for detailed guidelines on how to contribute to the project.
For quick reference:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request