Skip to main content

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.

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.4.tar.gz (73.4 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.4-py3-none-any.whl (111.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mindpy-0.1.4.tar.gz
  • Upload date:
  • Size: 73.4 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.4.tar.gz
Algorithm Hash digest
SHA256 3ee251a0ba7c85abf6e094df010ca4bbdc91f075706fe2a080ac353e6d9a5599
MD5 33de92cc04d732aa6a7cff5f93be3245
BLAKE2b-256 9ffddf76bfb09e59e0ae0e17db11e5d2bbf5bb50a4e712f4a6c6a69d10d467c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mindpy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 111.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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 66d4d7ee0736668749d23991fc08be6d183784e6bd672c8c627ee433a838d171
MD5 70cf4237b7cdcacad03ebbaac349c388
BLAKE2b-256 3095920301e5f24eb59bec37563b571d8a71caa18f16d1403340397806519bfc

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