Forge uses a flexible agent system where each agent is a specialized AI entity with specific capabilities, tools, and instructions. Agents can work independently or collaborate to solve complex problems.
You can create custom agents for specialized tasks. For example, a database migration agent:
id: db-migratortitle: Database Migration Specialistdescription: Creates and manages database migrationsmodel: claude-3.7-sonnettools: - read - write - bashsystem_prompt: | You are a database migration expert. When creating migrations: 1. Always include rollback procedures 2. Use transactions where possible 3. Add descriptive comments 4. Test migrations with sample data 5. Follow the existing migration naming conventioncustom_rules: | - Never drop tables without explicit confirmation - Always backup data before destructive operations - Use parameterized queries to prevent SQL injectiontemperature: 0.2max_tokens: 3000
id: test-generatorsystem_prompt: | You are a test writing expert for {{language}} using {{test_framework}}. Generate comprehensive tests that cover: - Happy path scenarios - Edge cases - Error conditionsuser_prompt: | Generate tests for: {{code_snippet}}
Some models support extended reasoning capabilities:
reasoning: enabled: true effort: medium # low, medium, or high max_tokens: 2048 # Thinking budget exclude: false # Show reasoning process
Reasoning configuration is supported by providers like OpenRouter, Anthropic, and Forge Services. It enables deeper analysis at the cost of additional tokens.
compact: token_threshold: 100000 # Compact when exceeding this message_threshold: 100 # Or this many messages turn_threshold: 50 # Or this many turns retention_window: 10 # Keep last N messages eviction_window: 0.5 # Compact up to 50% of messages model: claude-3-haiku # Use cheaper model for compaction
Compaction summarizes old conversation parts to keep context manageable while preserving important information.
Your system prompt is the agent’s “programming”. Be explicit:
system_prompt: | You are a frontend performance expert. When analyzing code, always check: 1. Unnecessary re-renders in React components 2. Unoptimized images 3. Large bundle sizes 4. Blocking network requests Provide specific, actionable recommendations with code examples.