huggingface / huggingface/smolagents
ENH: Feature request / Idea: Custom CodeAgent: Codex, Claude Code, OpenHeands, Copilot etc
- Dominant language
- Python
- Stars
- 29.3k
- Forks
- 3k
- Avg merge
- 17m
- Merged PRs (30d)
- 2
Description
**Problem**
Instead of competing with SotA Coding Agents that focus on code generation, Smolagents could benefit from integrating with them.
While Smolagents is excellent in creating a general agentic framework, enforcing the security limitations of the produced code, retry mechanisms, and code output verification, it can leverage SotA Coding Agents' superior capabilities in producing high-quality code and testing it.
The Code Agent should be able to use state-of-the-art external coding agents on tests like those listed in the well-established and respected [SWE-Bench Verified](https://www.swebench.com/) benchmarking.
**Proposed solution**
Provide a CustomCodeAgent that could integrate with OpenHands, Codex, Claude Code, Copilot, [SWE-agent](https://github.com/SWE-agent/SWE-agent), [TRAE-Agent](https://github.com/bytedance/trae-agent), [Refact](https://github.com/smallcloudai/refact), etc.
**Is this not possible with the current options.**
Currently, CodeAgnet is only a SmolAgent implementation.
**Alternatives considered**
Run with 3rd party Code Agent and then provide the results as a context or create a custom LLM wrapper. Which is suboptimal.
**Additional context (optional)**
The listed Coding agents may work locally as CLI, may be imported as a module, or consumed remotely via API.
---
### Checklist
- [X] I have searched the existing issues and have not found a similar feature request.
- [X] I have verified that this feature is not already implemented in the latest version.
- [X] I am willing to work on this feature and submit a pull request. (see my [PR](https://github.com/huggingface/smolagents/pull/1912))
Contributor guide
Assessment
This issue has not been assessed yet.