An AI agent built to do Ralph loops - plan mode for planning and ralph mode for implementing.
at new-directions 96 lines 3.3 kB view raw
1# Rustagent Configuration 2# Copy this file to rustagent.toml and fill in your API keys 3# 4# Configuration is loaded from (in order): 5# 1. ./rustagent.toml (current directory) 6# 2. ~/.config/rustagent/config.toml (XDG config) 7# 3. ~/.rustagent/config.toml (home directory) 8 9# ============================================================================= 10# LLM Configuration (Required) 11# ============================================================================= 12# Default LLM settings used by both planning and ralph modes unless overridden. 13 14[llm] 15provider = "anthropic" # Options: "anthropic", "openai", "ollama" 16model = "claude-sonnet-4-20250514" 17max_tokens = 8192 # Maximum tokens per response (default: 8192) 18 19# ============================================================================= 20# Provider Configuration 21# ============================================================================= 22# Configure credentials for your chosen provider(s). 23# Environment variables are expanded using ${VAR_NAME} syntax. 24 25[anthropic] 26api_key = "${ANTHROPIC_API_KEY}" 27 28[openai] 29api_key = "${OPENAI_API_KEY}" 30 31[ollama] 32base_url = "http://localhost:11434" 33 34# ============================================================================= 35# Mode-Specific LLM Overrides (Optional) 36# ============================================================================= 37# Override the default LLM for specific modes. Useful for using a more capable 38# model for planning while using a faster model for execution. 39 40# Planning mode: generates execution plans from specifications 41# [planning.llm] 42# provider = "anthropic" 43# model = "claude-opus-4-20250514" 44# max_tokens = 16384 45 46# Ralph mode: executes tasks using the Ralph Loop 47# [ralph.llm] 48# provider = "anthropic" 49# model = "claude-sonnet-4-20250514" 50# max_tokens = 4096 51 52# ============================================================================= 53# Agent Configuration (Required) 54# ============================================================================= 55 56[rustagent] 57spec_dir = "specs" # Directory for specification files 58max_iterations = 100 # Max Ralph Loop iterations (omit or set null for unlimited) 59 60# ============================================================================= 61# Security Configuration (Optional) 62# ============================================================================= 63# Controls what operations the agent can perform. All settings have safe defaults. 64 65[security] 66# Shell command policy: 67# - "allowlist": Only commands in allowed_commands can run (default, safest) 68# - "blocklist": All commands except those matching blocked_patterns can run 69# - "unrestricted": All commands can run (use with caution) 70shell_policy = "allowlist" 71 72# Commands allowed when shell_policy = "allowlist" 73allowed_commands = [ 74 "git", 75 "cargo", 76 "npm", 77 "ls", 78 "cat", 79 "grep", 80 "find", 81 "echo", 82 "pwd", 83 "mkdir", 84 "touch" 85] 86 87# Regex patterns to block when shell_policy = "blocklist" 88# Example: ["rm\\s+-rf", "sudo", "curl.*\\|.*sh"] 89blocked_patterns = [] 90 91# Maximum file size the agent can write (in MB) 92max_file_size_mb = 10 93 94# Paths the agent can access (relative to working directory or absolute) 95# Use "." for current directory and subdirectories 96allowed_paths = ["."]