SE-Agent
SE-Agent copied to clipboard
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...
![]() |
SE-Agent: Self-Evolution Trajectory Optimization in Multi-Step Reasoning with LLM-Based Agents |
๐ State-of-the-Art Performance on SWE-bench Verified: 80%
๐ฐ News
- 2025.09.19 ๐ Excited to announce that our papers have been accepted to NeurIPS 2025 โ RepoMaster as a Spotlight (โ3.2%) and SE-Agent as a Poster (โ24.52%)!
- 2025.08.28 ๐ We open-sourced RepoMaster โ an AI agent that leverages GitHub repos to solve complex real-world tasks.
- 2025.08.26 ๐ We open-sourced GitTaskBench โ a repo-level benchmark & tooling suite for real-world tasks.
- 2025.08.10 ๐ We open-sourced SE-Agent โ a self-evolution trajectory framework for multi-step reasoning.
๐ Ecosystem: RepoMaster ยท GitTaskBench ยท SE-Agent ยท Team Homepage
๐ฏ What is SE-Agent?
SE-Agent is a self-evolution framework that enables information exchange between reasoning paths through a trajectory-level evolution mechanism, breaking the cognitive limitations of single trajectories. This approach expands the search space, escapes local optima, and demonstrates emergent capabilities from collective interactions, achieving 80% Top1 performance on SWE-bench Verified, truly realizing autonomous evolution for LLM-based agents in complex reasoning tasks.
๐ Performance Results
๐ SWE-bench Verified Evaluation: State-of-the-Art Performance!
SE-Agent ranks Top1 among open-source frameworks on SWE-bench Verified.
โจ Performance Comparison: Leading with Significant Gains!
SE-Agent gain significant gains on SWE-bench Verified across various open-source/closed-source LLMs.
โก Quick Start
Get SE-Agent running in 30 seconds:
# 1. Clone and install
git clone https://github.com/JARVIS-Xs/SE-Agent.git
cd SE-Agent
pip install -e .
# 2. Set up API key
echo "DEEPSEEK_API_KEY=your_key_here" > .env
# 3. Run demo (no API calls)
python SE/basic_run.py --mode demo
# 4. Run your first experiment
python SE/basic_run.py --mode execute
Expected Output:
โ
SE-Agent initialized successfully
๐ Starting self-evolution with 3 iterations
๐ก Need detailed setup? See ๐ฆ Installation & Configuration below
๐ง How SE-Agent Works
SE-Agent implements three core self-evolution operations that transform how agents approach problem-solving:
๐ Three Core Operations
1. ๐ง Revision - Failure-Driven Strategy Generation
Analyzes individual failed trajectories through deep self-reflection and targeted improvement. Goes beyond simple retries by identifying fundamental approach limitations and creating architecturally orthogonal problem-solving paradigms. This involves analyzing a single trajectory to identify errors, inefficiencies, or conceptual blind spots, then prompting the agent to generate completely different solution approaches that address these specific limitations.
2. ๐ค Recombination - Cross-Trajectory Knowledge Synthesis
Creates novel trajectories by intelligently combining strengths from multiple existing solution paths. This is where cross-trajectory inspiration primarily occurs - SE-Agent intelligently selects high-performing segments from different trajectories and merges them to construct superior approaches. The process explicitly leverages the interdependence of various attempts, allowing successes in one area to compensate for shortcomings in others, enabling 1+1>2 synergistic effects that transcend individual trajectory limitations.
3. โจ Refinement - Risk-Aware Trajectory Optimization
Optimizes promising trajectories by eliminating redundancies and enhancing efficiency using insights from the entire trajectory pool. After new trajectories are formed, this step further hones them by removing unnecessary steps, streamlining action sequences, and incorporating risk-aware guidance that prevents systematic blind spots and failure modes learned from the collective exploration history.
๐ป Usage Examples
Basic Self-Evolution Experiment
# Configure multi-iteration strategy
strategy_config = {
"iterations": [
{"base_config": "baseline", "operator": None},
{"base_config": "enhanced", "operator": "alternative_strategy"},
{"base_config": "enhanced", "operator": "crossover"}
]
}
Run self-evolution process
python SE/basic_run.py --config SE/configs/se_configs/experiment.yaml --mode execute
Custom Operator Development
SE-Agent supports flexible operator extensibility for creating custom evolution strategies:
from SE.operators import TemplateOperator, register_operator
class MyEvolutionOperator(TemplateOperator):
def _generate_content(self, instance_info, problem_description, trajectory_data):
# Implement your custom evolution strategy
return "Your generated strategy content"
# Register and use
register_operator("my_operator", MyEvolutionOperator)
๐ Complete Operator Development Guide: See SE/operators.md for comprehensive operator development documentation including architecture, examples, and best practices
Batch Processing
# Process multiple SWE-bench instances
sweagent run-batch \
--config config/default.yaml \
--agent.model.name deepseek/deepseek-chat \
--instances.subset verified \
--instances.slice :10
๐ Documentation
SE-Agent provides comprehensive documentation for different use cases:
| Document | Purpose | Audience |
|---|---|---|
| SE/README.md | SE Framework detailed guide | Developers & Researchers |
| SE/operators.md | Operator development guide | Advanced developers |
| instruction.md | Usage instructions & configuration | All users |
Quick Navigation
- ๐ Getting Started: Follow the Quick Start above
- โ๏ธ Configuration: See instruction.md for detailed setup
- ๐ง Development: Check SE/README.md for framework internals
- ๐ ๏ธ Custom Operators: Refer to SE/operators.md for operator development
๐๏ธ Architecture Overview
SE-Agent consists of three main components working in harmony:
๐ SE-Agent Architecture
โโโ ๐ง SE Framework (SE/)
โ โโโ Multi-iteration experiment orchestration
โ โโโ Self-evolution operators (Revision, Recombination, Refinement)
โ โโโ Intelligent trajectory processing & compression
โโโ ๐ง SWE-Agent Base (sweagent/)
โ โโโ LLM agent implementations
โ โโโ Environment interaction layer
โ โโโ Tool execution system
โโโ ๐ Trajectory System
โโโ Compressed trajectory storage (.tra files - 80% size reduction)
โโโ Cross-iteration knowledge accumulation
โโโ LLM-driven trajectory analysis & summarization
๐ฆ Installation & Configuration
Installation Options
Option 1: Pip Installation (Recommended)
git clone https://github.com/JARVIS-Xs/SE-Agent.git
cd SE-Agent
pip install -e .
Option 2: Conda Environment
git clone https://github.com/JARVIS-Xs/SE-Agent.git
cd SE-Agent
conda create -n SE python=3.12
conda activate SE
pip install -e .
Verify Installation:
sweagent --help
python SE/test/run_operator_tests.py
API Key Configuration
Choose one of the following API providers:
# Create .env file
echo "DEEPSEEK_API_KEY=your_deepseek_key" > .env
# OR
echo "OPENAI_API_KEY=your_openai_key" > .env
# OR
echo "ANTHROPIC_API_KEY=your_anthropic_key" > .env
๐ Detailed Configuration Guide: See instruction.md for comprehensive configuration options, strategy parameters, and execution workflows
๐งช Testing & Development
Quick Testing
# Run all tests
pytest
# Run SE framework tests
python SE/test/run_operator_tests.py
# Demo mode (no API calls)
python SE/basic_run.py --mode demo
# Code formatting
ruff check .
ruff format .
Development Resources
- ๐ง SE Framework Guide: SE/README.md - Comprehensive SE framework documentation with testing, development workflow, and project structure
- โ๏ธ Operator Development: SE/operators.md - Complete operator development guide with architecture details and examples
- ๐ Usage Instructions: instruction.md - Detailed usage instructions, configuration options, and execution strategies
Citation
If you use SE-Agent in your research, please cite our paper:
@article{se-agent-2025,
title={SE-Agent: Self-Evolution Trajectory Optimization in Multi-Step Reasoning with LLM-Based Agents},
author={Jiaye Lin and Yifu Guo and Yuzhen Han and Sen Hu and Ziyi Ni and Licheng Wang and Mingguang Chen and Daxin Jiang and Binxing Jiao and Chen Hu and Huacan Wang},
journal={arXiv preprint arXiv:2508.02085},
year={2025},
url={https://arxiv.org/abs/2508.02085}
}
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
We would like to thank the following projects and contributors:
- SWE-Agent - Our foundation framework, developed by Carlos E. Jimenez, John Yang, Kilian Lieret and team
- SWE-bench - For providing the evaluation benchmark and test datasets that enable rigorous assessment of software engineering AI agents
- litellm - For unified LLM API interface support
- Open source community - For contributions to the advancement of software engineering AI agents
๐ Contact & Support
- ๐ง Email: [email protected]
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ค QuantaAlpha: QuantaAlpha is an elite research team dedicated to advancing AI Agent technology, committed to pushing the frontiers of artificial intelligence.
- ๐ HomePage:https://quantaalpha.github.io
โญ Star History
โญ If SE-Agent helps your research or projects, please give us a star! โญ
Made with โค๏ธ by the QuantaAlpha Team Research Team
