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.3.0

Author: Hitarth Trivedi and Harsh Bhatt

Language: Python 3.10+

Powered by: Google Gemini API (Select any supported model)


๐Ÿ“˜ 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
๐ŸŽ›๏ธ Model Selection Choose any Gemini model of your choice as input (e.g., gemma-3-27b-it, gemini-2.5-flash) to power the assistant.
๐Ÿค– 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-genai 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

# You can select any model of your choice as input along with the API key
config = lazycook.create_assistant("your-api-key", conversation_limit=9, document_limit=1, model_name="gemma-3-27b-it")

# 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.3.0.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.3.0-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lazycook-1.3.0.tar.gz
Algorithm Hash digest
SHA256 229fa3781615512cb0d375e94ca37fa6ff68e0a052155c4344ef3b0799b01844
MD5 d13a701286b596bb74cd9a1450b8614a
BLAKE2b-256 c507d4e6b8cf2e7decbdb30b73de15d6c5bf512bb55c0d142a4c45c7b034d6f2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lazycook-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74449c46041718423cdeb88725d383086e1359c4e496dc4b3259b95ee18cca84
MD5 6a6bec84429a4b4c21f238bc4082422e
BLAKE2b-256 803497e9a4682d1ef6b2cdb1f9d29ef6cc2026eab94db891a33faf067827d101

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