Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 184 additions & 0 deletions .agents.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# Multi-Agent System Configuration
# This file configures the AI agents available for automated CI/CD tasks
#
# IMPORTANT: All agents run in AUTONOMOUS MODE for CI/CD automation
# - Agents must run without human interaction
# - All agents operate in sandboxed environments (containers/VMs)
# - Interactive prompts are disabled (e.g., --dangerously-skip-permissions)

# List of enabled agents
# NOTE: Some agents are only available in specific environments:
# - Host-only agents: claude (needs subscription auth), gemini (needs Docker access)
# - Container-only agents: opencode, crush (installed in openrouter-agents container)
enabled_agents:
- claude # Anthropic's Claude Code (host-only, primary agent)
- gemini # Google's Gemini CLI (host-only, for reviews)
# Containerized agents (automatically run in Docker when invoked)
- opencode # Open-source alternative (runs in container)
- crush # Charm Bracelet's multi-provider tool (runs in container)

# Agent priorities for different task types
agent_priorities:
# For creating PRs from issues
issue_creation:
- claude # Best for implementation

# For reviewing PRs
pr_reviews:
- gemini # Excellent for code review
- claude # Fallback option

# For implementing code fixes
code_fixes:
- claude # Most capable for fixes

# Security settings
security:
# Users authorized to trigger agent actions via [Approved][Agent] keywords
# CRITICAL: Only add trusted human users - these can execute code via agents
# Agent admins can also use [CONTINUE] in PR comments to extend iteration limits
agent_admins:
- AndrewAltimit # Repository owner

# Trusted sources for comment context (used in PR reviews)
# Comments from these accounts are marked as trusted when providing context to AI
# This does NOT grant them ability to trigger agent actions
trusted_sources:
- AndrewAltimit # Repository owner
- github-actions[bot] # GitHub Actions bot
- dependabot[bot] # Dependabot
- renovate[bot] # Renovate bot

# Autonomous mode is REQUIRED for CI/CD operation
# All agents run in sandboxed environments for security
autonomous_mode: true # Enables non-interactive flags like --dangerously-skip-permissions

# Confirm running in sandboxed environment
require_sandbox: true

# Maximum prompt length to prevent abuse
max_prompt_length: 10000

# Cleanup temporary files after use
temp_file_cleanup: true

# Maximum execution time per agent call
subprocess_timeout: 600 # 10 minutes

# Memory limit for subprocess execution
memory_limit_mb: 500

# Rate limiting (per agent)
rate_limits:
requests_per_minute: 10
requests_per_hour: 100

# Agent-specific overrides
claude:
requests_per_minute: 20 # Claude can handle more
gemini:
requests_per_minute: 5 # More conservative for Gemini

# Model configuration overrides
model_overrides:
# Gemini models
# Using explicit model specification with API key authentication
# Model names verified from gemini-config.json
gemini:
pro_model: gemini-3-pro-preview # Latest preview model (NOT 3.0!)
flash_model: gemini-3-flash-preview # Fast fallback model (Gemini 3 Flash)
default_model: gemini-3-flash-preview # Primary model for PR reviews (faster, lower rate limits)

# OpenRouter agents configuration
opencode:
model: qwen/qwen-2.5-coder-32b-instruct
temperature: 0.2

crush:
model: qwen/qwen-2.5-coder-32b-instruct
temperature: 0.1 # Lower temperature for Crush

# OpenRouter configuration (for future agents)
openrouter:
# API key must be provided as OPENROUTER_API_KEY environment variable

# Default model for OpenRouter-compatible agents
default_model: qwen/qwen-2.5-coder-32b-instruct

# Fallback models if primary is unavailable
fallback_models:
- deepseek/deepseek-coder-v2-instruct
- meta-llama/llama-3.1-70b-instruct

# PR Review configuration
pr_review:
# Default agent for reviews (from enabled_agents)
default_agent: gemini

# Review constraints
max_words: 500
condensation_threshold: 600

# Incremental review settings
incremental_enabled: true

# Trust bucketing (uses security.agent_admins and security.trusted_sources)
include_comment_context: true

# Hallucination detection
verify_claims: true

# Reaction images config
reaction_config_url: "https://raw.githubusercontent.com/AndrewAltimit/Media/refs/heads/main/reaction/config.yaml"

# Automation settings for inline agent feedback loop
automation:
# Enable inline agent feedback loop in PR validation
inline_feedback_loop: true

# Maximum iterations before stopping (prevents infinite loops)
max_auto_fix_iterations: 5

# Try autoformat (black, isort) before invoking AI
autoformat_first: true

# Categories of failures to auto-fix
# Options: formatting, linting, type_errors, unused_imports, test_failures
auto_fix_categories:
- formatting
- linting
- type_errors
- unused_imports

# Skip auto-fix for PRs with these labels
skip_labels:
- no-auto-fix
- needs-human-review

# Advanced settings
advanced:
# Enable debug logging
debug_mode: false

# Custom paths
# Set AGENT_TEMP_DIR environment variable to override
temp_directory: /tmp/agents

# Retry configuration
max_retries: 2
retry_delay_seconds: 5

# Subprocess environment isolation
isolate_environment: true

# Enable telemetry (metrics collection)
enable_telemetry: false

# Non-interactive mode settings
non_interactive_flags:
claude: ["--print", "--dangerously-skip-permissions"]
# For gemini: Use -p for prompt and -m for model selection (both work reliably with API keys)
# Note: Only -p is passed by default; model selection uses .env configuration (GEMINI_PRIMARY_MODEL)
gemini: ["-p"]
opencode: ["--non-interactive"]
crush: ["--non-interactive", "--no-update"]
118 changes: 118 additions & 0 deletions .agents.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Multi-Agent System Configuration Example
# Copy this to .agents.yaml and customize for your needs

# List of enabled agents (claude is always enabled by default)
enabled_agents:
- claude # Anthropic's Claude Code (host-only)
- gemini # Google's Gemini CLI (host-only)
- opencode # SST's OpenCode (containerized)
- crush # Charm Bracelet's Crush AI (containerized)

# Agent priorities for different task types
# Agents are tried in order until one succeeds
agent_priorities:
# For creating PRs from issues
issue_creation:
- claude
- opencode

# For reviewing PRs
pr_reviews:
- gemini
- claude

# For implementing code fixes
code_fixes:
- claude
- crush
- opencode

# Model configuration overrides per agent
model_overrides:
# Example: Use a different model for OpenCode
# opencode:
# model: deepseek/deepseek-coder-v2-instruct
# temperature: 0.3

# Example: Configure Crush for faster responses
# crush:
# model: qwen/qwen-2.5-coder-7b-instruct
# temperature: 0.1

# OpenRouter configuration for agents that support it
openrouter:
# API key must be provided as OPENROUTER_API_KEY environment variable

# Default model for OpenRouter-compatible agents
default_model: qwen/qwen-2.5-coder-32b-instruct

# Fallback models if primary is unavailable
fallback_models:
- deepseek/deepseek-coder-v2-instruct
- meta-llama/llama-3.1-70b-instruct

# Per-agent model overrides
agent_overrides:
opencode:
model: qwen/qwen-2.5-coder-32b-instruct
temperature: 0.2
crush:
model: qwen/qwen-2.5-coder-32b-instruct
temperature: 0.1

# Security settings
security:
# Users authorized to trigger agent actions via [Approved][Agent] keywords
# CRITICAL: Only add trusted human users - these can execute code via agents
agent_admins:
- your-github-username # Replace with your GitHub username

# Trusted sources for comment context (used in PR reviews)
# Comments from these accounts are marked as trusted when providing context to AI
# This does NOT grant them ability to trigger agent actions
trusted_sources:
- your-github-username # Replace with your GitHub username
- github-actions[bot] # GitHub Actions bot
- dependabot[bot] # Dependabot
- renovate[bot] # Renovate bot

# Autonomous mode is REQUIRED for CI/CD operation
# All agents run in sandboxed environments for security
autonomous_mode: true # Enables non-interactive flags like --dangerously-skip-permissions

# Confirm running in sandboxed environment
require_sandbox: true

# Maximum prompt length to prevent abuse
max_prompt_length: 10000

# Cleanup temporary files after use
temp_file_cleanup: true

# Maximum execution time per agent call
subprocess_timeout: 600 # 10 minutes

# Memory limit for subprocess execution
memory_limit_mb: 500

# Rate limiting (per agent)
rate_limits:
requests_per_minute: 10
requests_per_hour: 100

# Agent-specific overrides
# claude:
# requests_per_minute: 20
# gemini:
# requests_per_minute: 5

# Advanced settings (optional)
advanced:
# Timeout for agent commands (seconds)
command_timeout: 300

# Maximum retries for failed agent calls
max_retries: 2

# Enable detailed logging
debug_mode: false
45 changes: 45 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Docker user permissions
USER_ID=1000
GROUP_ID=1000

# GitHub Configuration
OPENROUTER_API_KEY=your_api_key_here
GITHUB_REPOSITORY=AndrewAltimit/game-mods
GITHUB_PROJECTS_TOKEN=your_api_key_here
GITHUB_TOKEN=your_api_key_here

# Codex Configuration
# WARNING: Only set to true if running in a controlled sandboxed VM environment
# Defaults to false for security - only bypass sandbox if you understand the risks
CODEX_BYPASS_SANDBOX=false

# Optional: ElevenLabs Configuration
ELEVENLABS_API_KEY=your_api_key_here
ELEVENLABS_DEFAULT_MODEL=eleven_v3

# Virtual Character Storage Service
STORAGE_SECRET_KEY=your_api_key_here
STORAGE_BASE_URL=http://192.168.0.222:8021

# GPU device selection for multi-GPU systems (default: 0)
GPU_DEVICE=0

# Gemini API Key (Free Tier from Google AI Studio)
GOOGLE_API_KEY=your_api_key_here
GEMINI_API_KEY=your_api_key_here

# Gemini Model Configuration
GEMINI_PRIMARY_MODEL=gemini-3-pro-preview
GEMINI_FALLBACK_MODEL=gemini-3-flash-preview

# =============================================================================
# AgentCore Memory Configuration
# =============================================================================
MEMORY_PROVIDER=agentcore
AWS_REGION=us-east-1
AGENTCORE_MEMORY_ID=mem-xxxxxxxxxxxx
AGENTCORE_DATA_PLANE_ENDPOINT=
CHROMADB_HOST=chromadb
CHROMADB_PORT=8000
CHROMADB_COLLECTION=agent_memory
HUGGINGFACE_TOKEN=
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Repository stores everything with LF (Unix line endings)
# Git auto-converts line endings on checkout based on platform

# Batch files: MUST have CRLF line endings (Windows requirement)
*.bat text eol=crlf

# Everything else: stored as LF, stays LF on all platforms
*.sh text eol=lf
*.py text eol=lf
*.md text eol=lf
*.json text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
Loading