LoongSuite Pilot

228 字

LoongSuite Pilot

来源: wiki/sources/wechat-batch-a-agent-dev-tools
开发方: 阿里巴巴(林润骑 / 太业)
协议: 开源
定位: AI Coding Agent 可观测性采集平台

核心问题

2025-2026 年 AI Coding Agent 进入爆发期(Cursor、Claude Code、Codex、Qoder),但企业几乎无法回答以下基本问题:
- 团队每个人的 Agent 每天消耗多少 Token?
- 哪些任务适合交给 Agent?
- Agent 输出不符预期时中间经历了什么?
- 一次会话修改 30 个文件,修改链路是什么?

困难来自三层:Agent 行为天然难观测(多 ReAct 循环)、多 Agent 数据格式割裂、端侧(本地 IDE)是可观测盲区。

五大设计选择

1. ALL IN ONE 架构

  • 统一采集平台,一次部署覆盖所有已安装 AI Coding Agent
  • 声明式 agents.d/*.json 配置文件,新增 Agent 无需改框架代码

2. 适配 Agent 而非改造 Agent

  • 不修改 Agent 运行时(Agent 是第三方闭源产品)
  • 5 种采集基类:
采集基类 策略 适用场景
BaseHookInput Hook JSONL 增量读取 Cursor、Claude Code、Codex
BaseIdeInput IDE 历史文件快照轮询 IDE 插件类 Agent
BaseSqliteInput SQLite rowid 游标增量查询 Qoder 等本地数据库 Agent
BaseSessionInput Session 文件轮询 会话日志型 Agent
BaseCliForwarder CLI 遥测日志转发 CLI 类 Agent

3. 语义规范统一异构数据

  • 所有原始数据归一化为 AgentActivityEntry 事件格式
  • 遵循 LoongSuite GenAI 可观测语义规范(基于 OpenTelemetry GenAI 扩展)
  • 统一字段:gen_ai.usage.input_tokensgen_ai.session.idgen_ai.tool.call.id
  • 保留完整层级:session → turn → step → response/tool_call

4. 灵活粒度平衡观测与安全

  • 按 Agent 类型配置是否采集消息内容、工具参数
  • 自动脱敏引擎(云 AK、API Key、数据库连接串、私钥)

5. 多目标输出不绑定后端

  • 本地 JSONL / SLS Logstore / HTTP Endpoint / OTLP Trace 并行扇出

已适配 Agent

Agent 覆盖事件
Claude Code 用户提问、工具调用(前/后)、任务完成、上下文压缩、子 Agent 生命周期
Codex 会话启动、用户提问、工具调用(前/后)、任务完成
Cursor 12 种事件:会话生命周期、工具调用、提问、子 Agent 等
Qoder / Qoder Work Hook + IDE 历史 + 数据库 + 会话文件多路并行

安装方式

curl -fsSL https://loongcollector-community-edition.oss-cn-shanghai.aliyuncs.com/loongsuite-pilot/installer.sh | bash -s -- install \
  --sls-endpoint "https://cn-xx.log.aliyuncs.com" \
  --sls-project "my-project" --sls-logstore "my-logstore" \
  --sls-ak-id "your-ak-id" --sls-ak-secret "your-ak-secret"

安装后自动扫描 AI Coding Agent,注入采集能力,支持 Trace 模式还原完整执行链路。

关联概念


创建于:2026-06-16 | 基于微信公众号文章合集批次 A