LazyCook is an autonomous multi-agent conversational assistant designed to intelligently process user queries, manage documents, store conversations, and maintain iterative AI reasoning loops. It uses Gemini 2.5 Flash model with a four-agent architecture for high-quality responses and continuous learning.
Project description
๐ง LazyCook โ Multi-Agent AI Assistant
Version: 0.1.0
Author: Hitarth Trivedi and Harsh Bhatt
Language: Python 3.10+
Powered by: Google Gemini 2.5 Flash
๐ Overview
LazyCook is an autonomous multi-agent conversational assistant that intelligently processes user queries, manages documents, tracks tasks, and maintains context across sessions.
It leverages Google Gemini API and a four-agent architecture โ Generator, Analyzer, Optimizer, and Validator โ to deliver accurate, coherent, and high-quality responses through iterative reasoning.
LazyCook is ideal for developers, researchers, and productivity users who want an intelligent assistant capable of local storage, contextual memory, and automated document analysis โ all inside a single Python app.
โ๏ธ Core Features
| Feature | Description |
|---|---|
| ๐ค Multi-Agent System | Four specialized AI agents collaborate to generate, analyze, optimize, and validate every response. |
| ๐ง Smart Context Management | Maintains conversation context from current and past sessions, plus uploaded documents (up to 70 total). |
| ๐ Document Processing | Supports .pdf, .txt, .md, and .csv files with text extraction and metadata tracking. |
| ๐ฏ Intelligent Query Routing | Adjusts API usage automatically based on query complexity (Simple / Medium / Complex). |
| ๐ Quality Metrics | Evaluates completeness, accuracy, and polish with weighted scoring. |
| ๐พ Persistent Storage | Stores all data โ chats, tasks, documents โ as JSON files for easy access. |
| ๐ฆ Export Options | Export past conversations in .txt, .md, or .json formats. |
| ๐ง Maintenance Tools | Clear old chats, documents, and caches for optimal performance. |
| ๐งฎ Real-Time Logging | Colorful terminal output and progress visualization using rich. |
๐งฉ System Architecture
User Query
โ
AutonomousMultiAgentAssistant
โโโ TextFileManager # File & context storage
โโโ MultiAgentSystem # Core orchestrator
โ โโโ Generator Agent # Draft creation
โ โโโ Analyzer Agent # Error detection
โ โโโ Optimizer Agent # Refinement
โ โโโ Validator Agent # Final verification
โโโ QueryComplexityAnalyzer # Routing logic
โโโ QualityMetrics # Evaluation engine
๐ Installation & Setup
1. Prerequisites
- Python 3.10+
- Google Gemini API key
- Internet connection
2. Install Dependencies
pip install google-generativeai rich PyPDF2
3. Run the Application
export GEMINI_API_KEY="your-api-key"
python lazycook.py
๐ฌ Example Usage
import lazycook
import asyncio
config = lazycook.create_assistant("your-api-key", conversation_limit=90)
# Run CLI
asyncio.run(config.run_cli())
๐ Directory Structure
project/
โโโ lazycook.py # Main application
โโโ multi_agent_data/ # Stored data
โ โโโ conversations.json
โ โโโ tasks.json
โ โโโ documents.json
โ โโโ new_convo.json
โโโ exported_chats/ # Exported chat files
โโโ multi_agent_assistant.log # Application logs
๐ง Multi-Agent Roles
| Agent | Role | Purpose |
|---|---|---|
| Generator | Creative | Drafts the initial solution using context and user query. |
| Analyzer | Critical | Detects logical or factual errors and missing details. |
| Optimizer | Refinement | Enhances clarity, formatting, and completeness. |
| Validator | Assurance | Final accuracy and factual verification. |
โก Quality Scoring System
| Metric | Weight | Description |
|---|---|---|
| Completeness | 40% | Ensures all query points are addressed. |
| Accuracy | 40% | Checks factual and logical correctness. |
| Length | 20% | Evaluates concise vs. detailed balance. |
| Structure & Polish | โ | Considers clarity, readability, and formatting. |
Tiers:
- ๐ฅ Excellent: โฅ 0.95
- โ Very Good: 0.90โ0.94
- ๐ Good: 0.85โ0.89
- โ ๏ธ Acceptable: 0.75โ0.84
๐ Maintenance Commands
| Command | Function |
|---|---|
maintenance |
Access cleanup and system reset tools |
docs |
Manage uploaded documents |
download |
Export chat history |
quality |
View session quality metrics |
stats |
View performance statistics |
context |
Preview current conversation context |
quit |
Exit application safely |
๐งพ Logging Example
2025-10-31 13:22:51 - INFO - Query classified as: complex
2025-10-31 13:22:52 - INFO - Iteration 1: Objective=0.913, Subjective=0.867, Combined=0.890
2025-10-31 13:22:52 - INFO - โ Quality threshold met: 0.890 >= 0.880
๐งฑ Future Enhancements
- VERSION THAT CAN BE DOWNLOADED AND USED WITHOUT API-KEY(using gemma2.0)
- Multi-model fusion (Gemini + LLaMA)
- Long-term vector memory
- Web-based dashboard and analytics
- Speech-to-text and voice integration
๐งฐ Troubleshooting
| Issue | Possible Fix |
|---|---|
| API Connection Failed | Verify GEMINI_API_KEY and internet access. |
| Context Not Loading | Check user ID consistency and clear cache. |
| Document Upload Error | Ensure file < 5MB and supported format. |
| Low Quality Scores | Add context or documents for deeper responses. |
| Slow Responses | Reduce context size or clean old conversations. |
๐ License
Copyright (c) 2025 Harsh Bhatt, Hitarth Trivedi. All Rights Reserved.
This software and associated documentation files (the "Software") may not be copied, modified, merged, published, distributed, sublicensed, and/or sold without explicit written permission from the copyright holder.
๐ก Credits
- AI Framework: Google Gemini API
- Terminal UI:
rich - PDF Handling:
PyPDF2 - Developer: Hitarth Trivedi, Harsh Bhatt
Let it cook ๐ฅ
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lazycook-1.0.2.tar.gz.
File metadata
- Download URL: lazycook-1.0.2.tar.gz
- Upload date:
- Size: 43.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6dd2accb604852e372ff06bc0a8f70742edf78b21db8aeb3913378e5b8ef822
|
|
| MD5 |
97496ba408acadab60061520a5e5bae1
|
|
| BLAKE2b-256 |
ad0111f6b973035ee199478aec65100c0b99bd4dd3b923505682e1d7c9990ec2
|
File details
Details for the file lazycook-1.0.2-py3-none-any.whl.
File metadata
- Download URL: lazycook-1.0.2-py3-none-any.whl
- Upload date:
- Size: 41.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb6cd7f3adca7f61259f09a2f63e37ce1d5ac92ae96eca27ae6acb9ab977af17
|
|
| MD5 |
e6b16b0c2d382ff5e14328c5753fbdbb
|
|
| BLAKE2b-256 |
a4b63e2af5f3746c90153a73dfafedb71cbb61ebee115f9dd1587392e3d43955
|