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: 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

lazycook-1.0.2.tar.gz (43.4 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.0.2-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

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

Hashes for lazycook-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a6dd2accb604852e372ff06bc0a8f70742edf78b21db8aeb3913378e5b8ef822
MD5 97496ba408acadab60061520a5e5bae1
BLAKE2b-256 ad0111f6b973035ee199478aec65100c0b99bd4dd3b923505682e1d7c9990ec2

See more details on using hashes here.

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

Hashes for lazycook-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb6cd7f3adca7f61259f09a2f63e37ce1d5ac92ae96eca27ae6acb9ab977af17
MD5 e6b16b0c2d382ff5e14328c5753fbdbb
BLAKE2b-256 a4b63e2af5f3746c90153a73dfafedb71cbb61ebee115f9dd1587392e3d43955

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