把 AgentSight 可观测性能力接入 DSH,使 Agent 可调用 agentsight_status 工具查询插件自身状态与版本。
- Language
- Rust
- License
- Apache-2.0
- Branch
- main
Install
$ dsh plugin --profile web add github:alibaba/anolisa/src/agentsight/dsh-pluginRun the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial
一句话定位
这是一个把 AgentSight 可观测性能力接入 DSH(DeepSeek Harness)的桥接插件。它本身只注册一个名为 agentsight_status 的工具,让运行中的 Agent 能查询到插件是否已激活以及当前版本号,相当于在 DSH 内暴露 AgentSight 的"自报家门"入口。
核心能力
- 向 DSH 注入名为
agentsight的 Cordis 插件,依赖宿主提供的tools扩展 - 注册内置工具
agentsight_status,供 Agent 在会话中调用 - 调用时返回插件名称、版本号(从 package.json 动态读取)、激活状态以及当前能力清单
- 在插件加载完成时通过
ctx.logger.info输出一条启动日志,标注已注册的版本号和工具名
技术实现
- 语言: TypeScript(ESM,target ES2022)
- 关键依赖:
@deepseek-ai/cordis^4.0.1(插件宿主框架)、@deepseek-ai/dsh-tools^0.1.0-rc.2(DSH 工具注册扩展) - 架构模式: Cordis 标准插件模式 —— 通过
cordis.patch.yml的insert声明插入点,运行时执行apply(ctx)把工具注册到ctx.tools上 - 入口文件:
src/index.ts(49 行,全部逻辑)
适用场景
当用户已经在机器上部署了 AgentSight 主程序(负责 eBPF 追踪、Token 统计、Dashboard 等),并希望 DSH 内的 Agent 能感知到 AgentSight 的存在时安装此插件。典型用法是让 Agent 在每次会话开始或被问到"我装了什么可观测工具"时调用 agentsight_status 自检,而不是在对话里硬编码版本号。
前置依赖与兼容性
| 依赖 | 最低版本 | 说明 |
|---|---|---|
| DSH 宿主框架 | >=0.1.0-rc.2 <0.2.0 | 通过 peerDependencies 声明,需 @deepseek-ai/dsh-tools 在该范围内 |
| Node.js | >=22.0.0 | 通过 engines 字段声明,TS 编译目标为 ES2022 |
| 操作系统 | 跨平台 | 插件代码本身不依赖原生模块;其所桥接的 AgentSight 主程序另需 Linux 内核 >= 5.8 |
安装方式
dsh plugin --profile web add github:alibaba/anolisa/src/agentsight/dsh-plugin
配置项
本插件无需额外配置。
常见问题
Q: 这个插件能采集 Agent 的 LLM 调用、Token 消耗或网络流量吗?
A: 不能。此插件只注册一个 agentsight_status 工具,不启动任何探针、不读取网络数据、不写入数据库。真正的采集工作由 AgentSight 主程序完成,需另外部署。
Q: 安装后还需要额外配置吗?
A: 不需要。该插件只通过 Cordis 注入并注册一个内置工具,没有 Schema 配置项、不读取环境变量、不读写外部文件,安装即用。
Q: 它和 AgentSight 主程序是什么关系?
A: 它是 DSH 与 AgentSight 之间的轻量桥接层,仅暴露状态查询能力;真正的 eBPF 数据采集、SQLite 存储、HTTP API 与 Dashboard 由 AgentSight 主程序提供,需要单独部署。
Q: 卸载会影响已采集的数据吗?
A: 该插件本身不持久化任何数据,所以卸载它是安全的;它不会触碰 AgentSight 主程序的 SQLite、配置或追踪记录。
Q: 能在 macOS 或 Windows 上跑吗?
A: 插件代码本身是跨平台的 TypeScript/Node.js 代码,但其所桥接的 AgentSight 主程序依赖 Linux 内核的 eBPF 能力。如果只启用此插件而没有安装主程序,工具会始终报告 active=true 但 capabilities 仅含 status。
Q: 调用 agentsight_status 返回的 version 是从哪里读的?
A: 在插件 apply() 执行时通过 fs.readFileSync 读取自身 package.json 的 version 字段,因此返回值始终是构建时打包进插件的那个版本。
上手难度
入门 — 只有一个工具、无配置、无副作用,安装即可使用。
已知问题与限制
agentsight_status工具的capabilities字段目前硬编码返回['status'],并未根据宿主是否真正安装了 AgentSight 主程序来动态变化,因此返回值不能用来判断主程序是否在运行- 插件不提供 AgentSight 主程序的版本、运行状态或采集通道健康度查询接口,调用方若需更详细的信息需绕开本插件查询主程序自身的 HTTP API
- 由于
apply()依赖宿主暴露ctx.tools扩展,在不满足inject: ['tools']的宿主环境下加载会失败
Agentic Nexus Operating Layer & Interface System Architecture
The operating system layer for Agent workloads.
Let Agents drive the system straight from your terminal, and strip the tool responses that reach the model before they cost you — while keeping the Shell, Agent framework, and sandbox you already run.
中文版 · Website · Quick Start · User Guide · Contributing
ANOLISA is a server-side operating layer for AI Agent workloads. It addresses three practical constraints of Agent execution: terminal entry, Token cost, and execution environments. Keep the Shell, Agent framework, and sandbox you already use. ANOLISA CLI provides a single installation entry point, while each capability can be enabled independently.
New to ANOLISA? Choose your first outcome in the Quick Start →
Components
| Agent entry | Context efficiency | Runtime & security |
|---|---|---|
| cosh-ng Shell copilot | Token-less Tool-output compression | ws-ckpt Checkpoint and rollback |
| OS Skills System and DevOps expertise | AgentSight Trace and Token visibility | SkillFS Focused Skill views |
| ktuner Kernel tuning | Agent Memory Cross-session memory | Agent Sec Core Sandbox and verification |
| Blaze Sandbox lifecycle |
What it solves
01 · AGENT INTERFACE
Let the Agent work directly in the terminal
cosh-ng is an AI-native Linux terminal: it keeps familiar Bash/Zsh behavior, then adds an Agent that can understand intent, use tools and Skills, and ask for approval before risky work. Shell commands and natural language share one terminal instead of forcing users into a separate chat application.
02 · CONTEXT EFFICIENCY
See where Tokens go and cut waste before it reaches the model
Token-less removes redundancy from tool schemas and responses before they reach the model. Agent Memory reuses useful context across sessions. SkillFS keeps the current Skill view focused and makes other Skills discoverable when needed. AgentSight shows where Tokens are spent.
See an Agent run from the kernel up
On Linux, AgentSight uses eBPF to observe an Agent without changing its code. Follow user input through model and tool calls, with Token use and sub-agent branches in the same view.
Try Token-less with Claude Code in 3 minutes
Install Token-less and connect it to Claude Code:
curl -fsSL https://get.agentic-os.sh | bash
export PATH="$HOME/.local/bin:$PATH"
anolisa install tokenless
anolisa adapter enable tokenless claude-code
Restart Claude Code, run one tool-heavy task, then inspect the result:
tokenless stats summary
tokenless stats list --limit 5
Open the full Token-less Quick Start → · Read the user manual
In one observed coding task, Token-less saved 317K Tokens (40.5%), based on AgentSight measurements. Results vary by workload.
debug and trace are dropped by the field blacklist, metadata as null, and
tags / extra as empty values. Compression runs between the Agent and the
model, so no Agent framework code changes. Dropped array items stay retrievable
through a <<tokenless:KEY>> marker, which keeps the compression reversible.
| Tool responses | Tool schemas | Full pipeline |
|---|---|---|
| 65.8% fewer Tokens | 47.3% fewer Tokens | 62.9% fewer Tokens |
| ResponseCompressor · 46.85 µs | SchemaCompressor · 11.44 µs | 198.91 µs |
Savings apply to the tool responses entering the context, not to the whole session bill. The Token-less user manual explains how to estimate the effect for a given workload.
03 · EXECUTION RUNTIME
Give every Agent execution a boundary and a way back
ANOLISA is building out the Agent execution environment: Agent Sec Core isolates risky operations, and ws-ckpt keeps recovery points for workspace changes.
Catch a changed Skill before it runs
When a signed Skill changes, the Agent reports drifted before using it again.
A rescan records blocking findings as deny.
Try the Agent demo → · Skill Ledger guide
Choose a runtime or security starting point → · Start with ANOLISA CLI
Install
ANOLISA CLI is the common installation entry point. cosh-ng is installed in system mode; Token-less and other capabilities can be added independently.
curl -fsSL https://get.agentic-os.sh | bash
sudo anolisa --install-mode system install cosh-ng
anolisa install tokenless
Run cosh to enter the AI-native terminal. Token-less can also optimize tool
calls from an existing Agent without changing its framework.
Documentation
Quick Start · Installation · User Guide · Troubleshooting · Build from Source · Changelog
Community
Scan with DingTalk to join the ANOLISA community.
- Open an issue for bugs and feature requests.
- Read CONTRIBUTING.md before submitting a pull request.
- Report vulnerabilities through the Security Policy.
License
ANOLISA is released under the Apache License 2.0.