A Python AI framework for controlling Minecraft bots
Project description
MindPy
A Python AI framework for controlling Minecraft bots using PyCraft.
Vision
MindPy is the definitive Python AI framework for Minecraft, built entirely around PyCraft. It provides a clean, modular, plugin-based, event-driven, and highly extensible architecture for building intelligent Minecraft bots.
Features
- Bot Management: Login, reconnect, disconnect, multi-bot support
- Navigation: Walking, jumping, swimming, parkour, pathfinding, waypoints
- Mining: Ore detection, tool selection, safety checks, inventory management
- Crafting: Recipe lookup, craft planning, execution with multiple machines
- Inventory: Equipment, storage, chest interaction, sorting
- Farming: Harvesting, planting, animal breeding, fishing
- Combat: PvE, PvP, bows, shields, critical attacks
- World: Block lookup, biome lookup, chunk management, entities
- Communication: Chat, private messages, command parsing
- AI System: Perception, memory, planning, decision making, execution
- Memory System: Working, short-term, long-term, conversation, world, player, task, knowledge base
- Goal System: Hierarchical goal decomposition
- Task System: Interruptible, suspendable, serializable, cancelable, restartable
- Skills: Reusable high-level behaviors
- Plugin System: Automatic discovery, dependencies, metadata, versioning
- Event Bus: All communication through events
- LLM Integration: OpenAI, Anthropic, Google Gemini, Ollama, LM Studio, OpenRouter
- Tool Calling: AI can invoke tools with descriptions and parameters
- Reflection: Self-improvement through task evaluation
- Configuration: YAML, JSON, TOML, environment variables
- Logging: Structured logging with rich console and file logs
- CLI: Comprehensive command-line interface
- API: REST API and optional WebSocket API
Installation
pip install mindpy
For development:
git clone https://github.com/AnujaGajaweera/MindPy.git
cd mindpy
pip install -e ".[dev,llm,docs]"
Quick Start
import asyncio
from mindpy import Bot
async def main():
bot = Bot(
host="localhost",
port=25565,
username="MyBot"
)
await bot.connect()
# Your bot logic here
await bot.disconnect()
asyncio.run(main())
Architecture
MindPy follows clean architecture principles:
- SOLID principles
- Dependency Injection
- Composition over inheritance
- Event Bus architecture
- Service-oriented design
- Plugin architecture
- Domain Driven Design
No global state. Everything is injectable.
Documentation
Comprehensive documentation is available at https://mindpy.readthedocs.io
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE for details.
Acknowledgments
MindPy is inspired by Mineflayer but is a complete reimplementation in Python with modern architecture and extensibility in mind.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mindpy-0.1.2.tar.gz.
File metadata
- Download URL: mindpy-0.1.2.tar.gz
- Upload date:
- Size: 72.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4951e1f2f159e390abc19da62377ca8374ab7a41b0221247a540da9518e3bad2
|
|
| MD5 |
840a9d3dd7da39964e759e2dfbcfd296
|
|
| BLAKE2b-256 |
ea389d2414e135b66111b9033c2fa753c60c0e7de148ac503b6741823b22a0c5
|
File details
Details for the file mindpy-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mindpy-0.1.2-py3-none-any.whl
- Upload date:
- Size: 110.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
680482635adc08ec23645c3d7ebd76bdc2e401fb72fa6b8fa1a40b5a15773f66
|
|
| MD5 |
508fb4a5cfa12ac1e31cd8024e671f23
|
|
| BLAKE2b-256 |
f3a635ea651637893f2dd9d69ccc6a69426ba5dc267eb22e39d1fc054471f875
|