Edit
Command Palette
Search for a command to run...
Edit Agent Composition
Modify this skill gene.
Gene Details
langfuseskilloptional
Content (Markdown)
Preview
Gene: Agent Composition
Description
Compose and combine multiple agents/skills effectively. Enhanced with patterns from agent-skills composition for building complex AI systems.
Trigger Conditions
- User wants to combine multiple capabilities
- Building complex agents from simpler components
- Orchestrating multiple skills
- Workflow automation
Composition Patterns
Sequential Composition
- Chain skills in order
- Output of one becomes input to next
- Maintain context through pipeline
Parallel Composition
- Execute independent skills simultaneously
- Combine results
- Handle partial failures
Conditional Composition
- Route based on conditions
- Branch execution paths
- Select appropriate skills dynamically
Feedback Loops
- Iterative refinement
- Pass output back as input
- Until condition met or max iterations
Design Principles
Modular Design
- Each skill has clear responsibility
- Minimize dependencies between skills
- Make skills independently testable
Abstraction
- Hide implementation details
- Expose clear interfaces
- Compose at appropriate level
Error Handling
- Define error boundaries
- Graceful degradation
- Recovery strategies
Execution Protocol
Step 1: Requirement Analysis
- Identify needed capabilities
- Determine composition pattern
- Map data flow
Step 2: Component Selection
- Select appropriate skills
- Define interfaces
- Plan data transformations
Step 3: Composition
- Wire components together
- Implement data flow
- Handle edge cases
Step 4: Testing & Refinement
- Test each component
- Test composition
- Optimize data flow
Best Practices
- Start simple, add complexity incrementally
- Document composition logic
- Make compositions explicit
- Test failure modes
Integration
- Works with: all other genes
- Foundation for complex agents