A complete AI-powered research platform for Islamic text analysis, built on Claude Docker with autonomous academic workflows, Graphiti temporal knowledge graphs, and multiple parallel Claude instances for advanced research coordination.
π MCP Setup Guide: See infrastructure/claude-docker/MCP_SERVERS.md for customizing or adding more MCP servers
This project now includes complete Graphiti temporal knowledge graph capabilities with Claude Docker integration:
# Knowledge graph operations (available in all terminals)
gr "Store Islamic text insights" # Remember information
gs "search for concepts" # Search knowledge graph
gt "file.txt" # Analyze text files
# Project development tracking
pstart "session-name" # Start work session
pdecision "architectural choice" # Track decisions
pfeature "feature-name" "status" # Track features
psearch "query" # Search project history
poverview # Project overview
# Launch second Claude Docker instance
claude2 # Interactive second Claude instance- π§ Temporal Knowledge Graphs: Track Islamic scholarship evolution over time
- π Hybrid Search: Semantic + keyword + graph traversal search
- π€ Local Processing: Zero external API costs via Claude Docker
- π Project Intelligence: Persistent memory of development decisions
- π Islamic Text Specialization: Arabic NLP and Islamic entity extraction
- π Multiple Claude Instances: Parallel processing and specialized tasks
- CLAUDE.md - π― Main reference for all commands and workflows
- Project Tracking Guide - Development intelligence system
- Graphiti Workflow Commands - Complete command reference
- Interactive Claude Docker - Multiple instance usage
- Graphiti Integration Details - Local processing architecture
- Graphiti Core Framework - Framework development commands
- MCP Server Configuration - Protocol setup
- Coordination System - Multi-agent communication
This comprehensive integration was developed through detailed conversation and implementation. For the complete setup process, troubleshooting, and advanced usage patterns, refer to the implementation conversation that covers:
- β Complete Graphiti framework integration (120,854+ lines of code)
- β Claude Docker local processing setup (zero external API costs)
- β
Multiple Claude instance configuration (
claude2command) - β Project development tracking system (sessions, decisions, features)
- β Islamic text analysis specialization (Arabic NLP, temporal entities)
- β Knowledge graph command interface (gr, gs, gt shortcuts)
The conversation demonstrates practical usage, troubleshooting steps, and real-world implementation details for all features.
islamic-text-workflow/
βββ graphiti-main/ # π§ Complete Graphiti knowledge graph framework
β βββ graphiti_core/ # Core temporal knowledge graph library
β βββ claude_docker/ # Claude Docker integration for local processing
β βββ mcp_server/ # Model Context Protocol server
β βββ server/ # FastAPI REST service
β βββ tests/ # Comprehensive test suite
βββ research/ # Core research activities
β βββ analysis/ # Analysis results and reports
β βββ methodology/ # Research methodologies
β βββ templates/ # Analysis templates
β βββ output/ # Generated research outputs (includes knowledge exports)
βββ infrastructure/ # Technical infrastructure
β βββ claude-docker/ # Claude Docker setup and configuration
β βββ coordination/ # Multi-agent coordination system
β βββ configs/ # Environment and MCP configurations
βββ documentation/ # Project documentation
β βββ guides/ # User guides and tutorials (includes Graphiti docs)
β βββ api/ # API documentation
β βββ academic/ # Academic methodology documentation
βββ tools/ # Automation and utilities
β βββ scripts/ # Shell commands (gr, gs, pstart, claude2, etc.)
β βββ automation/ # Automated research workflows
β βββ utilities/ # Helper tools and scripts
βββ alias*.csv # Islamic text datasets (199 entries)
βββ archive/ # Historical and reference materials
βββ legacy/ # Legacy files and configurations
βββ demos/ # Demo projects and examples
βββ backups/ # Backup files and archives
This is a complete starter pack for autonomous AI development with optimized dev container support.
- Complete AI coding agent setup with Claude Code in an isolated Docker container
- Optimized Dev Container - Fast-startup minimal environment with on-demand package installation
- Pre-configured MCP servers for maximum coding productivity:
- Serena - Advanced coding agent toolkit with project indexing and symbol manipulation
- Context7 - Pulls up-to-date, version-specific documentation and code examples straight from the source into your prompt
- Twilio - SMS notifications when long-running tasks complete (perfect for >10min jobs)
- Persistent conversation history - Resumes from where you left off, even after crashes
- Remote work notifications - Get pinged via SMS when tasks finish, so you can step away from your monitor
- Simple one-command setup and usage - Zero friction set up for plug and play integration with existing cc workflows.
- Fully customizable - Modify the can modify the files at
~/.claude-dockerfor custom slash commands, settings and claude.md files.
# 1. Open in VS Code
code .
# 2. Reopen in Container (Command Palette: "Reopen in Container")
# Container starts fast with minimal dependencies
# 3. Install packages as needed
pkg dev-tools python-dev graphiti
# 4. Load project commands
source tools/scripts/graphiti-commands.sh
# 5. Begin development
gr "Starting Islamic text research session"# Start dev container
docker-compose -f .devcontainer/docker-compose.yml up -d
# Attach to container
docker exec -it islamic-text-workflow-app-1 bash
# Install what you need
pkg all# Method 1: Multiple VS Code Dev Containers
# 1. Open multiple VS Code windows
# 2. Each window: "Reopen in Container"
# 3. Each container: run `claude`
# 4. Result: Independent Claude instances with shared workspace
# Method 2: Docker Compose Scale
docker-compose -f .devcontainer/docker-compose.yml up -d --scale app=3
docker exec -it islamic-text-workflow-app-1 claude # Instance 1
docker exec -it islamic-text-workflow-app-2 claude # Instance 2
docker exec -it islamic-text-workflow-app-3 claude # Instance 3
# All instances share:
# - /workspace directory
# - Graphiti knowledge graph
# - Project files and configurations- β‘ Fast Startup: Minimal base image loads in seconds
- π¦ On-Demand Installation:
pkg claude,pkg dev-tools,pkg python-dev,pkg graphiti - πΎ Persistent Storage: Installed packages persist across rebuilds
- π Efficient Development: No waiting for unnecessary dependencies
- π€ Multi-Instance Claude: Easy deployment of multiple Claude instances
- π§ Shared Knowledge Graph: All instances share the same Graphiti knowledge base
- π Islamic Text Workflow: Full project functionality available
# 1. Configure environment
cp infrastructure/configs/.env.example infrastructure/configs/.env
nano infrastructure/configs/.env # Add your API keys (Twilio, etc.)
# 2. Install Claude Docker
./tools/scripts/install.sh
# 3. Start autonomous research session
claude-docker
# 4. Begin Islamic text analysis
"Read research/methodology/ and analyze new Islamic texts using our established methodology"# Monitor coordination between Claude instances
./infrastructure/coordination/monitor.sh
# Assign tasks to Docker instance
echo "Analyze academic methodology" > infrastructure/coordination/inbox/research-task.mdYou must authenticate Claude Code on your host system first:
# Install Claude Code globally
npm install -g @anthropic-ai/claude-code
# Run and complete authentication
claude
# Verify authentication files exist
ls ~/.claude.json ~/.claude/π Full Claude Code Setup Guide: https://docs.anthropic.com/en/docs/claude-code
- Docker Desktop: https://docs.docker.com/get-docker/
- Ensure Docker daemon is running before proceeding
Git configuration is automatically loaded from your host system during Docker build:
- Make sure you have configured git on your host system first:
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
- Important: Claude Docker will commit to your current branch - make sure you're on the correct branch before starting
Claude Docker uses dedicated SSH keys (separate from your main SSH keys for security):
Setup SSH keys:
# 1. Create directory for Claude Docker SSH keys
mkdir -p ~/.claude-docker/ssh
# 2. Generate SSH key for Claude Docker
ssh-keygen -t rsa -b 4096 -f ~/.claude-docker/ssh/id_rsa -N ''
# 3. Add public key to GitHub
cat ~/.claude-docker/ssh/id_rsa.pub
# Copy output and add to: GitHub β Settings β SSH and GPG keys β New SSH key
# 4. Test connection
ssh -T git@github.com -i ~/.claude-docker/ssh/id_rsaWhy separate SSH keys?
- β Security Isolation: Claude can't access or modify your personal SSH keys, config, or known_hosts
- β SSH State Persistence: The SSH directory is mounted at runtime.
- β
Easy Revocation: Delete
~/.claude-docker/ssh/to instantly revoke Claude's git access - β Clean Audit Trail: All Claude SSH activity is isolated and easily traceable
Technical Note: We mount the SSH directory rather than copying keys because SSH operations modify several files (known_hosts, connection state) that must persist between container sessions for a smooth user experience.
If you want SMS notifications when tasks complete:
- Create free trial account: https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account
- Get your Account SID and Auth Token from the Twilio Console
- Get a phone number for sending SMS
The Docker container needs your existing Claude authentication to function. This approach:
- β Uses your existing Claude subscription/API access
- β Maintains secure credential handling
- β Enables persistent authentication across container restarts
# SMS notifications (highly recommended for research workflows!)
# Perfect for long-running Islamic text analysis - step away and get notified when done
TWILIO_ACCOUNT_SID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_FROM_NUMBER=+1234567890
TWILIO_TO_NUMBER=+0987654321
# Optional - Custom conda paths (for academic environments)
CONDA_PREFIX=/path/to/your/conda
CONDA_EXTRA_DIRS="/path/to/envs /path/to/pkgs"
# Optional - System packages for NLP and text processing
SYSTEM_PACKAGES="libopenslide0 libgdal-dev python3-dev"- Automated Methodology: AI applies consistent academic analysis frameworks
- Multi-Agent Research: Parallel Claude instances coordinate on complex research tasks
- Quality Assurance: Academic standards compliance and citation management
- Scalable Processing: Batch analysis of multiple Islamic texts simultaneously
- File-Based Communication: Seamless task distribution between Claude instances
- Progress Tracking: Real-time monitoring of research activities
- Result Integration: Automated compilation of analysis results
- Documentation Generation: Publication-quality research documentation
- Modular Design: Add new analysis methods and research tools easily
- Template System: Standardized formats for consistent research output
- Integration Ready: Connect with external databases and research platforms
- Version Control: Track research evolution and methodology improvements
- Claude runs with
--dangerously-skip-permissionsfor complete access - Can read, write, execute, and modify any files in your project
- No permission prompts or restrictions
- Easy installation of any MCP server through
infrastructure/claude-docker/mcp-servers.txt - Automatic environment variable handling for MCP servers requiring API keys
- Pre-configured servers optimized for academic research:
- Serena: Advanced coding and text analysis toolkit
- Context7: Up-to-date Islamic studies documentation
- Twilio: SMS notifications for long-running research tasks
- See infrastructure/claude-docker/MCP_SERVERS.md for full setup guide
- Automatic SMS via Twilio when Claude completes tasks
- Configurable via MCP integration
- Optional - works without if Twilio not configured
- Has access to your conda envs so do not need to add build instructions to the Dockerfile
- Supports custom conda installation directories (ideal for academic/lab environments where home is quota'd)
- Login once, use forever - authentication tokens persist across sessions
- Automatic UID/GID mapping ensures perfect file permissions between host and container
- Loads history from previous chats in a given project.
- Prompt engineered to generate
task_log.mddocumenting agent's execution process - Stores assumptions, insights, and challenges encountered
- Acts as a simple summary to quickly understand what the agent accomplished
- Each session runs in fresh Docker container
- Only current working directory mounted (along with conda directories specified in
.env).
During build, the .env file from infrastructure/configs/ is baked into the image:
- Credentials are embedded at
/app/.envinside the container - No need to manage .env files in each project
- The image contains everything needed to run
- Important: After updating
infrastructure/configs/.env, you must rebuild the image withclaude-docker --rebuild
The setup creates ~/.claude-docker/ in your home directory with:
claude-home/- Persistent Claude authentication and settingsssh/- Directory where claude-dockers private ssh key and known hosts file is stored.
The infrastructure/coordination/ system enables communication between parallel Claude instances:
inbox/- Task assignments for Docker instanceoutbox/- Results and progress updatesstatus/- Real-time coordination statuslogs/- Communication history and debugging
During installation (install.sh), all contents from the project's .claude/ directory are copied to ~/.claude-docker/claude-home/ as template/base settings. This includes:
settings.json- Default Claude Code settings with MCP configurationCLAUDE.md- Default instructions and protocolscommands/- Slash commands (if any)- Any other configuration files
To modify these settings:
- Recommended: Directly edit files in
~/.claude-docker/claude-home/ - Alternative: Modify
.claude/in this repository and re-runinstall.sh
All changes to ~/.claude-docker/claude-home/ persist across container sessions.
Each project gets:
.claude/settings.json- Claude Code settings with MCP.claude/CLAUDE.md- Project-specific instructions (if you create one)
Claude Docker supports several command-line flags for different use cases:
claude-docker # Start Claude in current directory
claude-docker --continue # Resume previous conversation in this directory
claude-docker --rebuild # Force rebuild Docker image
claude-docker --rebuild --no-cache # Rebuild without using Docker cache| Flag | Description | Example |
|---|---|---|
--continue |
Resume the previous conversation in current directory | claude-docker --continue |
--rebuild |
Force rebuild of the Docker image | claude-docker --rebuild |
--no-cache |
When rebuilding, don't use Docker cache | claude-docker --rebuild --no-cache |
--memory |
Set container memory limit | claude-docker --memory 8g |
--gpus |
Enable GPU access (requires nvidia-docker) | claude-docker --gpus all |
You can also set defaults in your .env file:
DOCKER_MEMORY_LIMIT=8g # Default memory limit
DOCKER_GPU_ACCESS=all # Default GPU access# Resume work with 16GB memory limit
claude-docker --continue --memory 16g
# Rebuild after updating .env file
claude-docker --rebuild
# Use GPU for ML tasks
claude-docker --gpus allThe Docker image is built only once when you first run claude-docker. To force a rebuild:
# Force rebuild (uses cache)
claude-docker --rebuild
# Force rebuild without cache
claude-docker --rebuild --no-cacheRebuild when you:
- Update your .env file with new credentials
- Update the Claude Docker repository
- Change system packages in .env
For custom conda installations (common in academic/lab environments), add these to your .env file:
# Main conda installation
CONDA_PREFIX=/vol/lab/username/miniconda3
# Additional conda directories (space-separated)
CONDA_EXTRA_DIRS="/vol/lab/username/.conda/envs /vol/lab/username/conda_envs /vol/lab/username/.conda/pkgs /vol/lab/username/conda_pkgs"How it works:
CONDA_PREFIX: Mounts your conda installation to the same path in containerCONDA_EXTRA_DIRS: Mounts additional directories and automatically configures conda
Automatic Detection:
- Paths containing
*env*β Added toCONDA_ENVS_DIRS(conda environment search) - Paths containing
*pkg*β Added toCONDA_PKGS_DIRS(package cache search)
Result: All your conda environments and packages work exactly as they do on your host system.
For scientific computing packages that require system libraries, add them to your .env file:
# Install OpenSlide for medical imaging
SYSTEM_PACKAGES="libopenslide0"
# Install multiple packages (space-separated)
SYSTEM_PACKAGES="libopenslide0 libgdal-dev libproj-dev libopencv-dev"Note: Adding system packages requires rebuilding the Docker image (docker rmi claude-docker:latest).
We provide a different approach than Anthropic's official .devcontainer, optimized for autonomous task execution:
| Feature | claude-docker | Anthropic's DevContainer |
|---|---|---|
| IDE Support | Any editor/IDE | VSCode-specific |
| Authentication | Once per machine, persists forever | Per-devcontainer setup |
| Conda Environments | Direct access to all host envs | Manual setup in Dockerfile |
| Prompt Engineering | Optimized CLAUDE.md for tasks | Standard behavior |
| Network Access | Full access (firewall coming soon) | Configurable firewall |
| SMS Notifications | Built-in Twilio MCP | Not available |
| Permissions | Auto (--dangerously-skip-permissions) | Auto (--dangerously-skip-permissions) |
Note: Network firewall functionality similar to Anthropic's implementation is our next planned feature.
Phase 2 - Security Enhancements:
- Network firewall to whitelist specific domains (similar to Anthropic's DevContainer)
- Shell history persistence between sessions
- Additional security features
- Claude Code: Anthropic's official CLI - https://github.com/anthropics/claude-code
- Twilio MCP Server: SMS integration by @yiyang.1i - https://github.com/yiyang1i/sms-mcp-server
- Docker: Container runtime - https://www.docker.com/
- Anthropic's DevContainer implementation: https://github.com/anthropics/claude-code/tree/main/.devcontainer
- MCP (Model Context Protocol): https://modelcontextprotocol.io/
- Academic Research Platform: Built on claude-docker foundation
- Multi-Agent Coordination: Custom file-based communication system
- Research Templates: Islamic studies methodology integration
- Expandable Architecture: Modular design for research scalability
- Academic Analysis Report - Recent Islamic text analysis insights
- Analysis Patterns - Structured research findings
- Improvement Suggestions - Methodology enhancements
- Quick Start Demo - Demo tutorials and examples
- Coordination System - Multi-agent setup guide
- Claude Docker Setup - Container configuration
- Demo Projects - Example research workflows
This project is open source. See the LICENSE file for details.
Islamic Text Workflow - Advancing Islamic studies through AI-powered research platforms built on Claude Docker infrastructure.