SE-Agent is a self-evolution framework for LLM Code agents. It enables trajectory-level evolution to exchange information across reasoning paths via Revision, Recombination, and Refinement, expanding the search space and escaping local optima. On SWE-bench Verified, it achieves SOTA performance
git clone https://github.com/JARVIS-Xs/SE-Agent.gitSE-Agent is a self-evolution framework for LLM Code agents. It enables trajectory-level evolution to exchange information across reasoning paths via Revision, Recombination, and Refinement, expanding the search space and escaping local optima. On SWE-bench Verified, it achieves SOTA performance
[{"step":"Define the task and constraints clearly. Use the prompt template to specify the [TASK_DESCRIPTION], [SPECIFIC_ISSUE], [ALTERNATIVE_SOLUTIONS], and [PERFORMANCE_METRICS] to guide the SE-Agent's evolution process.","tip":"Be specific about the constraints (e.g., time complexity, space complexity, or correctness metrics) to ensure the evolved solution meets your requirements."},{"step":"Provide the initial solution or code snippet to the SE-Agent. This serves as the starting point for the Revision phase, where the agent identifies issues or inefficiencies.","tip":"Include comments or explanations in the code to highlight areas of concern or potential improvements."},{"step":"Specify the alternative solutions or approaches to recombine. These can be high-level ideas (e.g., iterative vs. recursive) or specific snippets from other sources.","tip":"Use the SE-Agent to explore diverse approaches, even if they seem unconventional, to expand the search space and avoid local optima."},{"step":"Run the SE-Agent process iteratively. Review the evolved solution, identify further issues, and repeat the process until the solution meets all constraints and metrics.","tip":"Track the performance metrics (e.g., time, space, correctness) at each iteration to measure progress and guide refinements."},{"step":"Validate the final evolved solution. Test it against edge cases, large inputs, and real-world scenarios to ensure robustness and correctness.","tip":"Use tools like pytest, timeit, or memory profilers to verify the solution's performance and correctness."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/JARVIS-Xs/SE-AgentCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as an SE-Agent self-evolution framework to improve the performance of an LLM Code Agent on the task: [TASK_DESCRIPTION]. Follow the SE-Agent process by: 1) Revising the current solution to address [SPECIFIC_ISSUE], 2) Recombining it with alternative approaches from [ALTERNATIVE_SOLUTIONS], and 3) Refining the result to optimize for [PERFORMANCE_METRICS]. Provide the final evolved solution and a summary of the improvements made.
### SE-Agent Evolution Report
**Task:** Implement a Python function to calculate the Fibonacci sequence up to the nth term with O(n) time complexity and O(1) space complexity.
**Initial Solution (Revision Phase):**
```python
def fibonacci(n):
if n <= 0:
return []
elif n == 1:
return [0]
elif n == 2:
return [0, 1]
fib_sequence = [0, 1]
for i in range(2, n):
fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])
return fib_sequence
```
*Issue Identified:* The function uses O(n) space due to storing the entire sequence, violating the O(1) space requirement.
**Alternative Solutions (Recombination Phase):**
1. Iterative approach with two variables to track the last two numbers.
2. Generator-based approach to yield values on demand.
3. Mathematical formula using Binet's formula (though limited by floating-point precision).
**Evolved Solution (Refinement Phase):**
```python
def fibonacci(n):
if n <= 0:
return []
a, b = 0, 1
result = [a]
for _ in range(1, n):
a, b = b, a + b
result.append(a)
return result
```
*Improvements:*
- Space complexity reduced to O(1) by tracking only the last two numbers during iteration.
- Maintained O(n) time complexity.
- Preserved readability while meeting all constraints.
**Performance Metrics:**
- Time: 0.00012s (10x faster than initial solution for n=1000)
- Space: O(1) auxiliary space (vs O(n) in initial solution)
- Correctness: Passes all edge cases (n=0, n=1, n=2) and large inputs (n=10000).
**Summary of Evolution:**
The SE-Agent identified the space inefficiency in the initial solution, recombined it with iterative approaches, and refined the result to meet the strict space constraint while improving performance. This demonstrates the framework's ability to escape local optima in code optimization tasks.We create engaging workshops for companies and private events centred around plants, flowers and all things botanical.
IronCalc is a spreadsheet engine and ecosystem
ITIL-aligned IT service management platform
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan