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.2.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 (default 70, configurable).
๐Ÿ“„ Document Processing Supports .pdf, .docx, .txt, .md, and .csv files (default 50 docs, configurable).
๐Ÿ“Š 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 -m lazycook

๐Ÿ’ฌ Example Usage

import lazycook
import asyncio

config = lazycook.create_assistant("your-api-key", conversation_limit=9, document_limit=1)

# 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, reset tools, and upload documents (via Manage Documents)
docs View current 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.2.1.tar.gz (55.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.2.1-py3-none-any.whl (52.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lazycook-1.2.1.tar.gz
Algorithm Hash digest
SHA256 f19d804d188c0af082525cd12f629a92e9dc9fe0f1282f7e9f1b092e111ee678
MD5 0f595389b4cce6db562ee037214ff5be
BLAKE2b-256 a9bba6befea7e73adc7466114764b83ec6807e3cae4490fc5289293159fbd79d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lazycook-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fbde6ae39e3c1c465c44a74f557df9aab4a97d1ded25491d182c8e271a2b340
MD5 30dd48992992c2a957e14c8b287268a3
BLAKE2b-256 b2e89190716e505a2529238d5bf6b56389389c65277b22877eb7790a4e3b98d0

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