A comprehensive enterprise-grade web application for experimenting with, testing, and productionizing AI prompts. Built with FastAPI and React, Grimoire provides seamless integration with Llama Stack servers, advanced backend testing capabilities, automated evaluation systems, and complete GitOps workflows for professional prompt management.
- ๐ฆ Llama Stack Integration: Direct connection to Llama Stack servers with configurable provider IDs and model parameters
- ๐๏ธ Advanced Model Controls: Fine-tune temperature, max_len, top_p, and top_k parameters with real-time preview
- ๐ก Streaming Responses: Real-time Server-Sent Events (SSE) streaming from Llama Stack inference with delta updates
- ๐ง Template Variables: Dynamic prompt templates using
{{variable}}syntax with validation and substitution - ๐งช Backend Testing Framework: Comprehensive testing against external API endpoints with performance analytics
- ๐ Evaluation System: Automated prompt evaluation with LlamaStack scoring functions and dataset integration
- ๐ Interactive History: Rich prompt and test history with ratings, detailed notes, and search capabilities
- ๐ฌ Multi-Message Conversations: Support for System/User/Assistant role-based conversations with context management
- ๐ง Thought Process Extraction: Automatic extraction and display of model reasoning from
<think>tags - ๐ฏ Prompt Management Interface: Visual prompt browser with production promotion workflow and status tracking
- ๐ Multi-Git Platform Support: Full integration with GitHub, GitLab, and Gitea (including self-hosted instances)
- ๐ Automated Pull Requests: Automatic PR creation for production deployments with branch management
- ๐ญ Production API: External REST endpoints for retrieving production-ready prompt configurations
- ๐ Secure Authentication: Fernet-encrypted Git credential storage with platform-specific token support
- ๐ Git History Integration: Unified commit tracking and production prompt versioning
- โก Real-time Sync: Live PR status updates and repository synchronization
- ๐ฏ Test โ Production Workflow: Visual promotion pipeline with approval gates and production tracking
- ๐ Pending PR Dashboard: Real-time monitoring of deployment status with merge tracking
- โ๏ธ Git-based Settings: Version-controlled test configurations and environment management
- ๐ณ Container-First Design: OpenShift-compatible containers with non-root users and health checks
- โธ๏ธ Kubernetes Native: Complete Helm charts with ingress, persistent storage, and service mesh support
- ๐ ๏ธ Development Tools: Docker Compose setup, development workbenches, and debugging containers
- ๐ฆ Multi-Architecture: Support for x86_64 and ARM64 container builds
- ๐จ Modern UI: PatternFly React components with responsive design and enterprise branding
- ๐งญ Intuitive Navigation: Sidebar navigation with project-specific menus and organized feature sections
- Python 3.9+, Node.js 18+, npm
- Llama Stack server running with available model providers (e.g.,
llama-3.1-8b-instruct)
# Backend
cd backend
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python main.py
# Frontend (new terminal)
cd frontend
npm install
npm run devAccess at http://localhost:5173 (frontend) and http://localhost:3001 (backend API)
Docker Compose:
docker-compose up -dContainer Build:
# Backend container
cd backend && podman build -t grimoire-backend:latest -f Containerfile .
# Frontend container
cd frontend && podman build -t grimoire-frontend:latest -f Containerfile .Kubernetes:
helm install grimoire ./helm --set ingress.enabled=true- GET
/api/projects-models- Discover available projects and model configurations - GET
/prompt/{project_name}/{provider_id}- Retrieve latest prompt configuration with variables - GET
/prompt/{project_name}/{provider_id}/prod- Get production-ready prompts from Git repository - POST
/api/projects/{id}/test-backend- Test prompts against external backend APIs with streaming - POST
/api/projects/{id}/eval- Run automated prompt evaluations with LLM-as-judge scoring - GET
/api/projects/{id}/test-settings- Retrieve Git-stored test configurations and variables - GET
/api/git/quick-status- Quick Git authentication status check - GET
/api/projects/{id}/git-changes- Check Git repository status and pending changes
- ๐ Swagger UI: http://localhost:3001/docs - Interactive API testing with live examples
- ๐ ReDoc: http://localhost:3001/redoc - Clean, comprehensive API documentation
- ๐ง OpenAPI Spec: http://localhost:3001/openapi.json - Machine-readable API specification
- ๐ฅ Health Check: http://localhost:3001/api - OpenShift-compatible health endpoint
- ๐งช Backend Testing:
POST /api/projects/{id}/test-backend- Stream external API tests with metrics - ๐ Generation:
POST /api/projects/{id}/generate- Stream LlamaStack responses with SSE - ๐ Evaluation:
POST /api/projects/{id}/eval- Run automated evaluations with scoring - ๐ Production Workflow:
POST /api/projects/{id}/history/{historyId}/tag-prod- Create production PRs - ๐ Git Authentication:
POST /api/git/auth- Multi-platform Git integration (GitHub/GitLab/Gitea) - ๐ History Management: Full CRUD operations for prompt and test history with Git integration
- โ๏ธ Settings Management:
GET/POST /api/projects/{id}/test-settings- Git-based configuration storage - ๐ PR Tracking:
GET /api/projects/{id}/pending-prs- Real-time pull request status monitoring - ๐ฌ Backend Test History:
GET /api/projects/{id}/backend-history- Comprehensive test result tracking - ๐ฏ Test Promotion:
POST /api/projects/{id}/backend-history/{historyId}/tag-prod- Promote backend tests to production
- ๐ Streaming Support: Server-Sent Events for real-time responses with token-by-token updates
- ๐ง Template Engine: Dynamic
{{variable}}substitution with validation and live preview - ๐ Git Operations: Automated repository management, PR creation, and status tracking
- โ๏ธ Settings Management: Git-based configuration storage with version control
- ๐ฌ Conversation Management: Multi-turn dialogues with System/User/Assistant role support
- ๐ง Thought Extraction: Automatic detection and display of model reasoning process
- ๐ฏ Visual Promotion Pipeline: Interactive Test โ Production workflow with approval gates
- ๐ Performance Analytics: Response time tracking, error monitoring, and success metrics
- ๐ Dataset Integration: HuggingFace dataset support for evaluation and batch processing
MIT License