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 designed for LLM-based code agents that enables information exchange between multiple reasoning paths to solve complex software engineering tasks. The framework implements three core operations—Revision, Recombination, and Refinement—that work together to expand search space and escape local optima. Revision analyzes failed trajectories and generates architecturally different problem-solving approaches, Recombination intelligently merges strengths from multiple solution paths, and Refinement optimizes promising trajectories by eliminating redundancies. SE-Agent achieves state-of-the-art performance on SWE-bench Verified with 80% success rate, demonstrating significant gains across various open-source and closed-source LLMs. This framework is ideal for developers building autonomous agents that handle multi-step reasoning and complex software engineering tasks.
[{"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."}]
Improving LLM code agent performance on real-world software engineering tasks
Developing autonomous agents that learn from multiple failed solution attempts
Solving SWE-bench Verified software engineering problems
Creating agents that combine insights across different reasoning trajectories
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.IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan