Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mindpy-0.1.1.tar.gz (72.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mindpy-0.1.1-py3-none-any.whl (110.5 kB view details)

Uploaded Python 3

File details

Details for the file mindpy-0.1.1.tar.gz.

File metadata

  • Download URL: mindpy-0.1.1.tar.gz
  • Upload date:
  • Size: 72.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mindpy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2ad9dcd53d013f42e5653f778f62db886c471f5bfd74e90056ed5b5300ad7d41
MD5 66c5d77c1d01b637c9ad1745b0406136
BLAKE2b-256 386132cc55a0a907613116ae684b21b5f16e84f9b97139102e134e2b8a0335d6

See more details on using hashes here.

File details

Details for the file mindpy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mindpy-0.1.1-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

Hashes for mindpy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9293f8e156212621307cd7a1da93312474a2d2e826a8be009f738f22cfb13b52
MD5 b16becc4934a7d0334e5004faf202dd3
BLAKE2b-256 025abdc9c5801391fa62f944b991646e1cf199dc30408d25c14ec86ac3529d1d

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