How sidetrip-ai/ici-core works
Project Type and Purpose
• Recognize that this is a full-stack modular AI assistant framework.
• The README explains that it supports context, style, personality, and security awareness.
• The core functionality centers on an ingestion pipeline that converts external data into vector representations and a query pipeline that retrieves and assembles contextual responses.
File Structure
• Top-Level Components:
• The “ici” directory contains the core modules. Inside, you have subdirectories like “adapters”, “core”, and “utils” which indicate a highly modular design.
• “adapters” are subdivided into components such as chat, controller, embedders, generators, ingestors, loggers, orchestrators, pipelines, preprocessors, prompt_builders, user_id, validators, and vector_stores. Each adapter is responsible for a single concern in the pipeline.
• Configuration and Setup:
• Files like config.yaml, .env.example, setup scripts (setup.sh, setup.bat), and the README indicate clear deployment and configuration guidelines.
• Continuous integration (with .github/workflows) and tests folders (unit and integration testing) are included to ensure quality and maintainability.
Key Components and Relationships
• Main Components:
• Ingestion Pipeline: Managed by adapters such as ingestors, preprocessors, and vector_stores. They are responsible for retrieving, cleaning, and storing data (using in-memory or persistent vector databases).
• Query Pipeline: Composed of components such as chat adapters, prompt builders, and generators that process input queries, retrieve context, and use AI models (OpenAI, Anthropic, Ollama) to generate responses.
• Core Interfaces and Utilities: Found in “ici/core/interfaces” (defining contracts for chat history, embedding, generation, etc.) and “ici/utils” (component loading, configuration, state management).
• Inter-component Interactions:
• The main entry point (main.py) ties these components together.
• Data flows from external sources into the ingestion pipeline and then is stored in a vector store. When a user query is received, the query pipeline retrieves the relevant context from the vector store, which then informs the generator (AI model) and returns a styled response.
• Adapters interact with one another using clearly defined interfaces provided by the “core/interfaces” modules.
Architectural Patterns and Design Principles
• Modularity: The codebase is divided into well-isolated components (adapters, core interfaces, utilities) that support easy extension.
• Separation of Concerns: Clear distinction between data ingestion and query response pipelines.
• Configurability: Centralized configuration via config.yaml and environment files (.env).
• Plug-and-Play: Framework supports multiple AI model providers and vector storage backends with an adapter-based approach.