[bot] activeagent gem (Rails AI agent framework) not instrumented
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 领域
- backend, observability
调研方向
从 lib/braintrust/contrib.rb 和现有的 contrib/openai、ruby_openai、ruby_llm、anthropic 以及 rails 集成开始,然后查看 ActiveAgent 的 generate_now、generate_later、streaming 和 action API。检查 Appraisals 和 braintrust.gemspec,了解依赖项和 appraisal 模式。完成的标准是:ActiveAgent 执行和 action dispatch 已使用所列出的 spans、metadata、outputs 以及在可用时的聚合 usage 完成 instrument。
由索引模型根据 Issue 内容生成。
描述
Summary
The activeagent gem (v1.0.2, 84K+ downloads, released June 10, 2026) is a Rails-native AI agent framework not instrumented by this SDK. Positioned as "the only agent-oriented AI framework designed for Rails, where Agents are Controllers," it provides a clear agent execution surface — generate_now, generate_later, streaming via ActionCable, and action-as-tool calling — across OpenAI, Anthropic, Ollama, OpenRouter, and RubyLLM providers.
While the underlying LLM calls may be captured through existing openai, anthropic, or ruby_llm instrumentation, the activeagent agent-run layer (agent action dispatch, multi-turn orchestration, context management, callbacks) has no dedicated instrumentation.
What is missing
No instrumentation exists for any activeagent execution surface. Key APIs that should be instrumented:
Agent Execution
Agent.prompt(message: "...").generate_now— Synchronous agent execution. Invokes the agent action, drives the model through one or more turns, and returns the final response. This is the primary blocking execution path.Agent.prompt(message: "...").generate_later— Asynchronous agent execution via ActiveJob. Queues agent execution as a background job.
Streaming
- Streaming via ActionCable —
ActiveAgent::GenerationChannelstreams agent response chunks in real time to a WebSocket channel. Each streaming turn produces intermediate content events before a final completion event.
Tool / Action Calling
- Agent actions as tools — Public instance methods defined in an agent class are automatically exposed to the LLM as callable tools. The framework dispatches tool calls by invoking the corresponding action method. Each action dispatch should produce a child span within the agent run.
Context / Transcript Management
with(...)— Sets context variables available to the agent during execution.- The framework maintains a message transcript across multi-turn interactions that should be captured in the root agent span.
Expected instrumentation
Agent run spans should capture:
- Input: initial prompt / user message, agent class name, action (if explicit)
- Metadata: provider (
openai,anthropic,ruby_llm, etc.), model, agent configuration (generate_withsetting), temperature/other inference params - Output: final generated response after all turns complete
- Metrics: aggregated token usage across all turns (if available from provider)
Tool/action dispatch child spans should capture:
- Action method name and arguments
- Return value (tool result)
Braintrust docs status
not_found — activeagent is not listed anywhere in Braintrust's integrations directory at https://www.braintrust.dev/docs/integrations. The SDK integrations page at https://www.braintrust.dev/docs/integrations/sdk-integrations lists only ruby-llm as a Ruby-specific integration. No mention of Rails agent frameworks.
Upstream sources
- GitHub: https://github.com/activeagents/activeagent
- RubyGems: https://rubygems.org/gems/activeagent (v1.0.2, June 10, 2026, 84K+ downloads)
- Documentation / project site: https://www.activeagents.ai/
Local repo files inspected
lib/braintrust/contrib.rb— registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No ActiveAgent integration.lib/braintrust/contrib/— contains onlyopenai/,ruby_openai/,ruby_llm/,anthropic/, andrails/directories. Noactive_agent/directory.Appraisals— no appraisal scenarios foractiveagentbraintrust.gemspec— no mention ofactiveagent- Grep for
activeagent,active_agent,ActiveAgent,GenerationChannel,generate_nowacrosslib/braintrust/returns zero matches
- 主要语言
- Ruby
- 星标
- 9
- 派生
- 11
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 5
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 小时 新手友好度 72/100
up-for-grabs/up-for-grabs.net#6330 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
TheOdinProject/curriculum#31490 ·
维护者通常 1 天内回复
-
Documentation: RSpecRails/FileFixture and RSpecRails/ReceivePerformLater cops missing from website未关闭
难度 2/5 1-3 小时 新手友好度 72/100
rubocop/rubocop-rspec_rails#136 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
hotwired/turbo-rails#791 ·