Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature Request] Add integration to smolagents

未关闭
#398 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@FacerAin 已经在做这个了。

开始于 2025年9月30日。

  • #419 来自 @FacerAin —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

首先阅读 issue 中引用的现有 LangGraph 集成,并将其入口点与提议的 art.smolagents.init_chat_model 和 wrap_rollout API 进行比较。在添加集成模块、文档和示例之前,验证 Smolagents 的异步支持并定义 wrapper 行为;完成的标准是示例工作流能够通过 ART 训练运行。

由索引模型根据 Issue 内容生成。

描述

enhancement

Proposal

Hello OpenPipe Team! Thanks for creating such a cool project for agent RL.

I recently saw the LangGraph integration announcement and tested it, and it works great :)
I'd like to propose adding Smolagents integration as well.

I believe Smolagents is fit for ART for several reasons:

  • Simplicity: Smolagents follows a philosophy of simplicity, making it accessible while maintaining capabilities
  • Community: Like LangGraph, it provides diverse community examples and recipes. Particularly, recipes like open_deep_research are ideal use cases where ART's RL techniques can provide significant value
  • Integration-friendly: Smolagents' class architecture (ReACT, Memory, Message, Logging, etc.) is well-structured and easily accessible, making it straightforward to integrate with ART

Example

from art.smolagents import init_chat_model
from smolagents import CodeAgent, WebSearchTool
import art
import weave

@weave.op
async def rollout(model: art.Model, scenario: ResearchScenario) -> art.Trajectory:
    chat_model = init_chat_model(model.name, temperature=1.0)
    
    # Define available tools
    tools = [WebSearchTool()]
    
    # Create the Smolagents ReAct agent
    agent = CodeAgent(tools=tools, model=chat_model, stream_outputs=True)
    
    # Execute workflow (need to verify async support in smolagents)
    return await agent.run(scenario.messages)
    
from art.smolagents import wrap_rollout

...
for batch in training_iterator:
    groups = []
    for scenario in batch.items:
        groups.append(
            art.TrajectoryGroup([
                wrap_rollout(rollout)(model, scenario)
                for _ in range(training_config["rollouts_per_group"])
            ])
        )
...

Roadmap

  • Add art.smolagents integration module with wrapper functions
  • Add documentation and examples.

I'd be happy to work on implementing this feature if the team is interested.
Would love to hear your thoughts and any ideas! Thanks 😊

主要语言
Python
星标
10.8k
派生
1k
平均合并
16 小时 14 分钟
30 天内合并 PR
148

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenPipe/ART 的其他 Issue

查看 OpenPipe/ART 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。