Skip to content

Deadlybutsoft/parking-lot-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🅿️ Smart Parking Lot Management System v1

AI-Powered Multi-Agent Parking Management Solution using CrewAI

License: MIT Python 3.10+ CrewAI

🎯 Overview

The Smart Parking Lot Management System is an intelligent multi-agent AI system built with CrewAI that revolutionizes parking lot operations. The system autonomously manages parking spaces, optimizes pricing strategies, coordinates valet services, and ensures efficient traffic flow through coordinated AI agents working together.

📝 Smart Parking System - Agent Overview

🎯 Agent Roles & Responsibilities:

🎥 Camera Controller

Captures vehicle photos at the gate Extracts license plate numbers using OCR technology Processes images in various lighting conditions

🧠 Traffic Decision Manager

Makes critical entry/exit decisions based on database lookup Determines if vehicle is NEW (not in database) or EXITING (in database) Controls the entire workflow direction

📺 Display Controller

Shows parking bills and payment information on gate display Generates QR codes for payment Presents clear, driver-friendly billing interface

💳 Payment Processor

Verifies QR code payment completions Handles payment confirmations and transaction security Coordinates with database for payment status updates

🗃️ Database Manager

Manages all parking records (entry/exit times, payments) Controls gate opening for both entries and exits Maintains data integrity and transaction logs Uses Google Sheets for data storage

🔄 Agent Workflow: Camera Controller → Reads plates Traffic Decision Manager → Entry/Exit decision Display Controller → Shows bills (exits only) Payment Processor → Handles payments (exits only) Database Manager → Records data + opens gate Total: 5 specialized agents working together for seamless parking management

🏗️ System Architecture

Parking System Flow

flowchart TD
    A[Vehicle Approaches Gate] --> B[Camera Captures Image]
    B --> C[Extract License Plate]
    C --> D[Database Lookup]
    D --> E{Decision Point}
    
    E -->|NOT FOUND| F[NEW ENTRY]
    F --> G[Record Entry Time]
    G --> H1[GATE OPENS]
    
    E -->|FOUND| I[EXIT ATTEMPT]
    I --> J[Calculate Duration]
    J --> K[Display Bill & QR Code]
    K --> L{Payment Confirmed?}
    L -->|Yes| M[Update Database]
    M --> H2[GATE OPENS]
    
    style A fill:#lightblue
    style E fill:#lightyellow
    style L fill:#lightyellow
    style H1 fill:#lightgreen
    style H2 fill:#lightgreen
Loading

Agent Roles & Responsibilities

Agent Role Responsibilities
🏛️ Parking Director Coordinator Oversees all operations and ensures smooth workflow
📊 Senior Parking Analyst Analyst Data analysis, trend identification, and strategic insights
💰 Pricing Specialist Economist Dynamic pricing optimization and revenue management
👁️ Vacancy Monitor Monitor Real-time space tracking and availability reporting

🛠️ Installation

Prerequisites

  • Python 3.10 - 3.14
  • OpenAI API Key

Setup Instructions

  1. Clone the repository
git clone https://github.com/your-username/smart-parking-lot-management-system-v1.git
cd smart-parking-lot-management-system-v1
  1. Install dependencies
pip install uv
crewai install
  1. Environment Setup
# Copy environment template and add your API key
cp .env.example .env
# Edit .env file with your OPENAI_API_KEY

🚀 Usage

Running the System

Execute the parking management crew:

crewai run

Configuration

Customize the system by modifying:

  • config/agents.yaml - Define agent roles and capabilities
  • config/tasks.yaml - Configure task workflows and objectives
  • src/smart_parking_lot_management_system/crew.py - Main crew logic
  • src/smart_parking_lot_management_system/tools/ - Custom tools implementation

Sample Query

from src.smart_parking_lot_management_system.main import run

result = run()
print(result)  # Comprehensive parking management report

📁 Project Structure

smart-parking-lot-management-system-v1/
├── 📂 src/smart_parking_lot_management_system/
│   ├── 📜 __init__.py
│   ├── 📜 main.py              # Entry point
│   ├── 📜 crew.py              # CrewAI implementation
│   ├── 📂 config/
│   │   ├── 📜 agents.yaml      # Agent definitions
│   │   └── 📜 tasks.yaml       # Task definitions
│   └── 📂 tools/
│       ├── 📜 __init__.py
│       └── 📜 custom_tool.py   # Parking-specific tools
├── 📂 knowledge/
│   └── 📜 user_preference.txt  # Domain knowledge
├── 📜 pyproject.toml           # Project dependencies
├── 📜 .env                     # Environment variables
└── 📜 README.md               # This file

🎨 Custom Tools

The system includes specialized parking management tools:

  • Vacancy Detection: Real-time space monitoring
  • Pricing Calculator: Dynamic rate computation
  • Traffic Flow Analyzer: Congestion prediction
  • Valet Service Coordinator: Automated valet assignment

📊 Expected Output

The system generates comprehensive parking management reports including:

  • 📈 Occupancy Analytics
  • 💵 Revenue Optimization
  • 🚦 Traffic Flow Recommendations
  • 🎯 Space Utilization Insights
  • 📅 Demand Forecasting

🤝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📋 Requirements

Core dependencies are managed through pyproject.toml:

[project]
name = "smart-parking-lot-management-system"
python = ">=3.10,<3.14"
dependencies = [
    "crewai>=0.5.0,<1.0.0",
    "langchain-openai",
    "pydantic"
]

🐛 Troubleshooting

Common Issues

API Key Error: Ensure OPENAI_API_KEY is set in .env file

Python Version: Use Python 3.10-3.13 (not 3.14)

Dependency Issues: Try crewai install --force

Debug Mode

export CREWAI_DEBUG=1
crewai run

📈 Future Enhancements

  • IoT sensor integration for real-time data
  • Mobile app for parking reservations
  • AI-powered security monitoring
  • Integration with smart city infrastructure
  • Predictive maintenance scheduling

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🎉 Acknowledgments

  • Built with CrewAI
  • Powered by OpenAI GPT
  • Inspired by modern parking management challenges

Let's revolutionize parking management with AI! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages