Cover image
Try Now
2025-04-14

Ce projet démontre un système d'IA agentique qui utilise un serveur MCP propulsé par les Gemini pour interpréter les instructions en langage naturel et automatiser la peinture Microsoft à l'aide d'outils de simulation GUI sur Windows.

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

Paint Drawing Agent

A Python-based automation tool that uses Google's Gemini AI to control Microsoft Paint through natural language commands. This project enables users to draw shapes, write text, and manipulate colors in MS Paint using simple English instructions.

Features

  • Natural language control of MS Paint
  • Automated drawing of shapes (circles, rectangles, lines)
  • Text insertion with position control
  • Color selection and management
  • Window management and canvas positioning
  • Detailed logging and error handling
  • Position calibration system

Prerequisites

  • Windows 10 or later
  • Python 3.8+
  • Microsoft Paint (mspaint.exe)
  • Google Cloud API key for Gemini AI

Installation

  1. Clone the repository:
git clone [repository-url]
cd paint-drawing-agent
  1. Install required dependencies:
pip install -r requirements.txt
  1. Create a .env file in the project root and add your Google API key:
GOOGLE_API_KEY=your_api_key_here

Project Structure

paint-drawing-agent/
├── talk2mcp.py           # Main application file
├── tools/                # Core automation tools
│   ├── __init__.py
│   └── paint_commands.py # Paint automation commands
├── calibration_profiles/ # Stored calibration data
├── LLM_LOGS/            # AI interaction logs
├── logs/                # Application logs
└── requirements.txt     # Project dependencies

Usage

  1. Start the Paint Drawing Agent:
python talk2mcp.py
  1. Enter natural language commands, for example:
  • "Draw a red circle in the center"
  • "Write 'Hello World' in black at the top"
  • "Draw a blue rectangle on the right side"
  1. To exit the program, type 'quit'

Command Examples

> Draw a red circle in the center
> Write 'Hello World' in black at the top
> Draw a blue rectangle at coordinates 400,300
> Draw a green line from top to bottom

Calibration

The system uses a calibration system to accurately locate Paint interface elements. To recalibrate:

  1. Run the calibration script:
python enhanced_calibrate.py
  1. Follow the on-screen instructions to calibrate tool positions

Logging

The system maintains several types of logs:

  • Application logs: /logs/paint_agent_[timestamp].log
  • LLM interaction logs: /LLM_LOGS/session_log.json
  • Calibration logs: /calibration_profiles/

Error Handling

The system includes comprehensive error handling for:

  • Window management issues
  • Drawing operation failures
  • AI communication errors
  • Position calibration problems

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

Troubleshooting

Common issues and solutions:

  1. Paint Window Not Found

    • Ensure MS Paint is installed
    • Try running Paint manually first
  2. Drawing Position Issues

    • Run calibration again
    • Check screen resolution matches calibration
  3. AI Communication Errors

    • Verify API key in .env file
    • Check internet connection

License

[Your License Here]

Acknowledgments

  • Google Gemini AI for natural language processing
  • PyAutoGUI for GUI automation
  • Win32GUI for Windows interaction

相关推荐

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • 1Panel-dev
  • 🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

  • rulego
  • ⛓️RULEGO est un cadre de moteur de règle d'orchestration des composants de nouvelle génération légère, intégrée, intégrée et de nouvelle génération pour GO.

  • sigoden
  • Créez facilement des outils et des agents LLM à l'aide de fonctions Plain Bash / JavaScript / Python.

  • hkr04
  • SDK C ++ MCP (Protocole de contexte modèle léger)

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信 (企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Dify 、 Claude 、 GEMINI 、 XAI 、 PPIO 、 OLLAMA 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 ChatGlm 、 Sillytraven 、 MCP 等 LLM 的机器人 / Agent | Plateforme de bots de messagerie instantanée basés sur LLM, prend en charge Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • dmayboroda
  • Rag de conversation sur site avec des conteneurs configurables

  • modelscope
  • Commencez à construire des applications multi-agents LLM, plus facilement.

  • paulwing
  • Un référentiel de test créé à l'aide du service MCP

    Reviews

    2.7 (6)
    Avatar
    user_hcwRgBlv
    2025-04-24

    Paint-ai-agent by shivman is an impressive tool for anyone who needs to automate their painting tasks. Its intuitive design and advanced AI capabilities make it incredibly user-friendly and efficient. Highly recommend for professionals and hobbyists alike!

    Avatar
    user_fpMg8IBh
    2025-04-24

    Paint-AI-Agent by Shivman is a remarkable tool for automating and enhancing your painting projects. The intuitive design and powerful AI capabilities significantly reduce the time and effort required to achieve professional-quality results. Highly recommended for both beginners and experienced users looking to streamline their artistic process!

    Avatar
    user_cOih7Hi0
    2025-04-24

    Paint-ai-agent by Shivman is an incredible tool for anyone looking to enhance their design workflow. Its intuitive interface and powerful AI-driven features make it easy to create stunning visuals with minimal effort. The welcome information is clear and helpful, guiding users seamlessly from the start. Highly recommend for designers and artists!

    Avatar
    user_upyhTVoj
    2025-04-24

    Paint-AI-Agent by Shivman is an impressive tool for creative individuals and professionals. This product stands out with its intuitive interface and powerful AI capabilities, making the process of creating digital art both fun and efficient. Whether you're a beginner or an experienced artist, Paint-AI-Agent offers something for everyone. Highly recommended for anyone looking to enhance their digital art skills!

    Avatar
    user_sFrOZB55
    2025-04-24

    Paint-AI-Agent by Shivman is amazing! It offers a seamless experience for AI-driven painting enthusiasts. The user-friendly interface and advanced features have significantly improved my creative workflow. Highly recommend for anyone looking to elevate their digital art game!

    Avatar
    user_8YzCLu7y
    2025-04-24

    Paint-AI-Agent by Shivman is an impressive and powerful tool for anyone working with graphical applications or looking to enhance their creative projects. The user-friendly interface and detailed instructions make it accessible even for beginners, while the sophisticated AI algorithms provide advanced features for more experienced users. Paint-AI-Agent is a must-have for making your art projects more efficient and professional. Highly recommend!