[bot] OpenAI Agents API (`client.beta.agents.sessions`) not instrumented
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ruby
調査の方向性
Start with lib/braintrust/contrib/openai/patcher.rb and the existing instrumentation in lib/braintrust/contrib/openai/instrumentation/chat.rb and responses.rb. Check registration in lib/braintrust/contrib.rb, then define the Agents session instrumentation around create_streaming and the session lifecycle. Done means agent input, session metadata, streamed output, and available usage and latency are captured consistently.
索引モデルが issue の本文から書いたものです。
説明
Summary
The official openai Ruby gem now ships a top-level Agents API (client.beta.agents.sessions) — a managed, long-running agent session surface distinct from Chat Completions, the Responses API, and the already-tracked Realtime API (#206). It was added to the gem in v0.90.0 (2026-09-10, "api: add Agents API"), with immediately-following releases adding more capability: v0.91.0 ("add agent session model settings"), v0.96.0 ("add Agents credential and session options"), and v0.97.0 (2026-09-29, "add computer use to beta agents"). This is a genuinely new generative/agentic execution surface with zero instrumentation in this repo today.
What is missing
client = OpenAI::Client.new
events = client.beta.agents.sessions.create_streaming(
agent: {
model: "gpt-6-astra",
instructions: "Write clean code, run it, and report the actual output."
},
environment: { type: "openai_hosted" },
input: "Create tree.py, ..."
)
events.each { |event| puts JSON.generate(event.to_h) }
events.close
client.beta.agents.sessions.delete(session_id)
client.beta.agents.sessions.create_streaming(agent:, environment:, input:, ...)— starts a managed agent session and streams turn/tool-execution events (agent.session.turn.completed,turn.failed,turn.cancelled,session.failed,agent.session.idle, etc.). This is the generation-initiating call — analogous toresponses.create/chat.completions.createfor this API family, but the agent runs (and can use hosted tools, including a newly-added "computer use" tool per v0.97.0) server-side across multiple turns.client.beta.agents.sessions.delete(session_id)— session teardown (lifecycle management, not itself generative, included only for context).
No Patcher in this repo wraps any of this: lib/braintrust/contrib/openai/patcher.rb defines only ChatPatcher, ResponsesPatcher, and ModerationsPatcher.
What a span should capture
- Input:
agentconfig (model, instructions),environment,inputtask - Metadata: provider (
openai), sessionid,model, environment type - Output: aggregated turn events / final session state
- Metrics: token usage per turn if exposed by the event stream, latency to session completion
Braintrust docs status
supported for TypeScript/Python, not_found for Ruby — https://www.braintrust.dev/docs/integrations/sdk-integrations documents startOpenAIAgentsTrace, updateOpenAIAgentsTrace, failOpenAIAgentsTrace, and an openai.agents.sessions.create span for TypeScript and Python under "OpenAI Agents SDK"/agent framework tracing. https://www.braintrust.dev/docs/integrations/ai-providers/openai's Ruby-specific span table lists only chat.completions.create/stream, responses.create/stream, and moderations.create — no Agents API entry anywhere for Ruby. This is a clear cross-language parity gap, not just an unreleased feature.
Upstream sources
- openai-ruby CHANGELOG: https://raw.githubusercontent.com/openai/openai-ruby/main/CHANGELOG.md (v0.90.0 "add Agents API"; v0.91.0 "add agent session model settings"; v0.96.0 "add Agents credential and session options"; v0.97.0 "add computer use to beta agents")
- Agents API quickstart (Ruby example): https://developers.openai.com/api/docs/guides/agents-api/quickstart
- Agents API overview: https://developers.openai.com/api/docs/guides/agents-api/overview
Braintrust docs sources checked
- https://www.braintrust.dev/docs/integrations/ai-providers/openai
- https://www.braintrust.dev/docs/integrations/sdk-integrations
Local repo files inspected
lib/braintrust/contrib/openai/patcher.rb— definesChatPatcher,ResponsesPatcher,ModerationsPatcher; no agents/session patcherlib/braintrust/contrib/openai/instrumentation/— containschat.rb,responses.rb,moderations.rb,common.rb; noagents.rblib/braintrust/contrib.rb— registers onlyChatPatcher/ResponsesPatcher/ModerationsPatcherfor the OpenAI integration- Grep for
agents,beta.agents,Agents APIacrosslib/braintrust/returns zero relevant matches
- 主要言語
- Ruby
- スター
- 9
- フォーク
- 11
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
braintrustdata/braintrust-sdk-ruby のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
ruby
難易度 3/5 半日 初心者へのやさしさ 62/100
-
ruby
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
braintrustdata/braintrust-sdk-ruby の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
Bug: Assistant replies lose the space before numbers ("Oct7", "as of10-22-2026") with OpenAI modelsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
we-promise/sure#4441 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
lugassawan/swe-workbench#823 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Transcription spans omit the requested temperature対応中かも @yorzi が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
crmne/ruby_llm#1276 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs verification
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 6 日以内に返信