An intelligent LLM-powered assistant for RPG character creation and rule validation
Features β’ Architecture β’ Installation β’ Usage β’ Roadmap β’ Contributing
- π Complete Rule Validation: Every character choice validated against official rules
- π Source Citations: Every validation includes book and page references
- β‘ Build Optimization: MinMax strategies and synergy suggestions
- π€ Intelligent PDF Processing: Automatically extract rules from uploaded rulebooks
- π― Multi-System Support: D&D 5e, Pathfinder, and more
- π VTT Integration: Export to Roll20, FoundryVTT, and other platforms
- Python 3.13+
- PostgreSQL 14+ (optional, for production)
- Redis 6+ (optional, for caching)
- Qdrant (for vector storage)
- Clone the repository:
git clone https://github.com/your-org/astarion.git
cd astarion- Install dependencies:
pip install -e ".[dev]"- Install PyKnow (rule engine):
pip install git+https://github.com/buguroo/pyknow.git- Set up environment variables:
cp .env.example .env
# Edit .env with your API keys- Initialize the database:
alembic upgrade head# Validate a character file
astarion validate character.json --system dnd5e
# Create a character interactively
astarion create-character --interactive
# Add a rulebook to the system
astarion add-rulebook "Players_Handbook.pdf" --system dnd5efrom astarion import CharacterValidator, RulebookProcessor
# Validate a character
validator = CharacterValidator(system="dnd5e")
result = await validator.validate_character(character_data)
# Process a rulebook
processor = RulebookProcessor()
await processor.process_pdf("Players_Handbook.pdf", system="dnd5e")Astarion uses a multi-agent orchestrated architecture:
graph TB
subgraph "User Interface"
UI[Web/CLI Interface]
end
subgraph "Astarion Core"
O[LangGraph Orchestrator]
MCP[MCP Integration Layer]
end
subgraph "Specialized Agents"
SA[Stats Agent]
EA[Equipment Agent]
LA[Lore Agent]
VA[Validation Agent]
OA[Optimization Agent]
end
subgraph "Knowledge Systems"
RAG[RAG Pipeline]
PK[PyKnow Rule Engine]
VDB[(Vector Database)]
RE[Rule Repository]
end
UI --> O
O --> MCP
MCP --> SA & EA & LA & VA & OA
SA & EA & LA & VA & OA --> RAG
SA & EA & LA & VA & OA --> PK
RAG --> VDB
PK --> RE
- LangGraph Orchestrator: Manages workflow and agent coordination
- Specialized Agents: Stats, Equipment, Lore, Validation, and Optimization agents
- MCP Servers: Standardized rule access via Model Context Protocol
- RAG Pipeline: Intelligent PDF processing and semantic search
- PyKnow Engine: Deterministic rule execution with explanations
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test file
pytest tests/unit/test_validator.py# Format code
black src tests
# Lint code
ruff check src tests
# Type checking
mypy src# Start the API server
uvicorn src.api.main:app --reload
# Start the CLI in development mode
python -m src.cli.mainastarion/
βββ src/
β βββ agents/ # LangGraph agents
β βββ core/ # Core models and orchestration
β βββ mcp/ # Model Context Protocol servers
β βββ rag/ # RAG pipeline and PDF processing
β βββ cli/ # CLI interface
β βββ validation/ # Validation engine
β βββ utils/ # Utilities and helpers
βββ tests/ # Test suite
βββ docs/ # Documentation
βββ config/ # Configuration files
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- All PDF uploads are scanned and validated
- API rate limiting prevents abuse
- No character data stored without explicit consent
- Respect for publisher copyrights
This project is licensed under the MIT License - see the LICENSE file for details.
- The tabletop RPG community for inspiration and feedback
- LangChain and LangGraph teams for excellent frameworks
- All contributors who help make Astarion better
Astarion is currently in Phase 1: Foundation development. Core functionality is being implemented with a focus on D&D 5e support.
- β Basic character validation
- β CLI interface
- π§ PDF rulebook processing
- π§ LangGraph orchestration
- π Web interface (coming in Phase 3)
- Discord: Join our server
- Issues: GitHub Issues
- Discussions: GitHub Discussions
