Python .cursorrules Cursor AI with Ollama & Langchain .cursorrules prompt file
About .cursorrules prompt file
What you can build
Ollama Dungeon Master App: A desktop application that runs locally and allows users to create and manage D&D campaigns with the help of an AI-powered dungeon master. The app should provide an intuitive interface for players to interact with the AI, input their actions, and receive responses in markdown.
Offline RPG Assistant: A tool designed for offline use, enabling D&D players to have a virtual dungeon master present during their tabletop sessions, where it can manage NPCs, calculate bonuses, handle player inputs, and provide narrative feedback without requiring an internet connection.
Markdown DM Chatbot: A chatbot service that utilizes markdown to communicate, allowing players to textually engage with an AI dungeon master that can craft scenarios, resolve encounters, and maintain game consistency within a local environment.
Modular D&D Toolkit: A Python library providing modular components for building customized dungeon master functionality, such as NPC handling, item management, and player interaction, with the Ollama-powered agent at its core.
AI-Powered Campaign Manager: An application that assists DMs in building, organizing, and executing their campaigns by using an AI-driven toolkit capable of running detailed, multi-scenario adventures, adjudicating player actions, and dynamically generating new content.
Local RPG Emulator: A standalone emulator software that allows users to simulate D&D campaigns with AI-driven simulations that respond to player decisions and control the narrative and game mechanics in a detailed markdown format.
Custom Scenario Generator: A desktop app that helps DMs generate complex and engaging scenarios powered by an AI logic system capable of processing player inputs and evolving scenarios in real-time, without internet reliance.
Interactive Story Builder: An application aimed at helping players and DMs collaboratively build and play through dynamic D&D stories, facilitated by an AI that crafts narratives and reacts to player decisions, all orchestrated within a local setup.
DM Companion: Offline Edition: A Python-based utility providing a comprehensive suite of DM tools like rule automation, NPC creation, and game progression management, usable offline for enhanced private campaign sessions.
Local Adventure Resource Library: A digital library application stocked with resources for D&D campaigns such as maps, NPCs, and quest lines, all embellished and defined by AI, making it especially helpful for home-based or weekend sessions without any online connectivity.
Benefits
- Designed for offline functionality, utilizing modular Python components to build a local D&D dungeon master agent without internet dependence.
- Incorporates Ollama and llama-index or langchain for enhanced, responsive NPC interactions and rule management in markdown format.
- Emphasizes maintainability and clarity with structured code documentation and type hints for all functions and classes.
Synopsis
Dungeon masters and game developers can create a Python-based offline, modular library to power a D&D game agent using Ollama and llama-index for interactive gameplay.
Overview of .cursorrules prompt
The .cursorrules file outlines the development of a library that employs Ollama to create a dungeon master agent capable of managing complex scenarios in a Dungeons & Dragons setting. The key requirements are that the library should be clean, modular, able to function in a local environment without internet access, and capable of interacting with players and handling all game mechanics. It should be written in Python, reside in the autodm directory, and leverage Ollama, llama-index, or langchain for powering the agent. The agent's communication should be in markdown format, and the code must include well-documented functions and classes with type hints.