Skip to main content

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: 1.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, .docx, .txt, .md, and .csv files with text extraction and metadata tracking.
๐Ÿ“Š Smart Visualization Automatically generates insightful graphs and plots for data-heavy queries.
๐ŸŽฏ 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 python-docx matplotlib pandas seaborn numpy

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
  • DOCX Handling: python-docx
  • Visualization: matplotlib, seaborn, pandas
  • 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

lazycook-1.1.0.tar.gz (52.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazycook-1.1.0-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

Details for the file lazycook-1.1.0.tar.gz.

File metadata

  • Download URL: lazycook-1.1.0.tar.gz
  • Upload date:
  • Size: 52.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lazycook-1.1.0.tar.gz
Algorithm Hash digest
SHA256 af7129b22c2e181e4b1a549174f6d74020c1563a387a5804045356fb945720d2
MD5 8c2e8d1f69e71cf806968cd376512e41
BLAKE2b-256 5464ce0ee7c5781a4333a12c7ec7e175a905a1381149597364394f036ca089fd

See more details on using hashes here.

File details

Details for the file lazycook-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: lazycook-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lazycook-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40c9081d0b37dc13417779e295cf811a983aceaea3865ae694f66e7e461dd490
MD5 d8a5c727e7730b01a99841fdc398175b
BLAKE2b-256 a8ded91c5497635408905bdcf160f57779fb9aaa849deb4728f73be395908d36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page