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

[bot] activeagent gem (Rails AI agent framework) not instrumented

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
rails, ruby

调研方向

从 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::GenerationChannel streams 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_with setting), 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

Local repo files inspected

  • lib/braintrust/contrib.rb — registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No ActiveAgent integration.
  • lib/braintrust/contrib/ — contains only openai/, ruby_openai/, ruby_llm/, anthropic/, and rails/ directories. No active_agent/ directory.
  • Appraisals — no appraisal scenarios for activeagent
  • braintrust.gemspec — no mention of activeagent
  • Grep for activeagent, active_agent, ActiveAgent, GenerationChannel, generate_now across lib/braintrust/ returns zero matches
主要语言
Ruby
星标
9
派生
11
平均合并
2 天 3 小时
30 天内合并 PR
5

环境准备

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

从这里开始

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

braintrustdata/braintrust-sdk-ruby 的其他 Issue

查看 braintrustdata/braintrust-sdk-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

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