A local system for categorizing, summarizing, embedding, and managing long conversations based on the CHOFF/PCHOFF framework. This system provides a modular multi-agent architecture for processing conversations with adaptive annotation and embedding strategies.
-
Database Models (
models/base.py)- Conversation storage
- Segment management
- Annotation tracking
- Embedding cache
-
Services (
services/)- Embedding generation and management
- CHOFF/PCHOFF classification
- Pattern recognition
- Database management
-
Agents (
agents/base.py)- Ingestion Agent: Handles initial conversation processing
- Classification Agent: Manages CHOFF/PCHOFF classifications
- Pattern Agent: Handles pattern recognition and resonance
- Agent Orchestrator: Coordinates the multi-agent system
-
API (
main.py)- FastAPI-based REST interface
- Conversation processing endpoints
- Annotation retrieval
- Health monitoring
- GPU: AMD Radeon 5300M (supported)
- RAM: 32GB
- Storage: 0.5TB SSD
- Processor: Intel i7
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Run the application:
uvicorn main:app --reloadThe API will be available at http://localhost:8000
POST /conversations/
Content-Type: application/json
{
"text": "Your conversation text here",
"title": "Optional title"
}GET /conversations/{conversation_id}/segmentsGET /conversations/{conversation_id}/annotationsGET /health- Content Type Markers (
[type:x]) - Insight Classification (
[insight:x]) - Pattern Recognition (
&pattern:x@) - Source Attribution (
{source:x}) - Resonance Tracking (
&resonance:x@)
-
Ingestion
- Text segmentation
- Initial embedding generation
- Conversation record creation
-
Classification
- CHOFF/PCHOFF marker assignment
- Insight type determination
- Implementation level assessment
-
Pattern Recognition
- Pattern identification
- Resonance tracking
- Cross-segment analysis
The system is optimized for local deployment with careful resource management:
- Embedding Cache: Prevents redundant embedding computations
- Batch Processing: Efficient handling of large conversations
- Local Storage: SQLite database for simplified deployment
- GPU Optimization: ONNX Runtime for optimized inference
pytest tests/The project follows PEP 8 guidelines. Format code using:
black .-
Enhanced NLP Processing
- Improved segmentation
- Advanced pattern recognition
- Semantic analysis
-
Resource Optimization
- Dynamic batch sizing
- Memory management
- GPU utilization optimization
-
UI Development
- Web interface for visualization
- Interactive annotation
- Pattern exploration tools
MIT License - See LICENSE file for details