agentsight

agentsight is a skill for Claude Code, Codex from alibaba/anolisa. It costs 103 tokens per session (1,030 once invoked), scanned B, original, Apache-2.0.

A command-line and web dashboard tool for viewing AgentSight data about token use, token savings, audits, and interrupted sessions. Tokens are the text units used to measure language-model activity.

In plain words
What is it for?
Use it to compare token use over time, inspect model calls and process events, review session history, and filter reports by time or process.
Why use it?
It helps explain how much agent work costs, what processes and model calls occurred, and where sessions stopped or failed.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/alibaba/anolisa/sysom-agentsight
Any agent
npx skills add alibaba/anolisa --skill sysom-agentsight
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agentsight

README.md
[![agentmods](https://agentmods.dev/badge/skills/alibaba/anolisa/sysom-agentsight.svg)](https://agentmods.dev/skills/alibaba/anolisa/sysom-agentsight)
Your own site
<a href="https://agentmods.dev/skills/alibaba/anolisa/sysom-agentsight"><img src="https://agentmods.dev/badge/skills/alibaba/anolisa/sysom-agentsight.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,030 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00103 $0.01030
Opus 5 $0.00051 $0.00515
Sonnet 5 $0.00021 $0.00206
Haiku 4.5 $0.00010 $0.00103

Measured 3d ago against content hash 9aee00a5258a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

agentsight scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo systemctl start agentsight
src/os-skills/devops/sysom-agentsight/SKILL.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Dashboard(前端)

AgentSight 提供 Web Dashboard(前端) 用于可视化查看 token 消耗和会话历史。

访问方式:

  • 远程访问:http://<server-ip>:7396(需确保安全组已开放该端口)
  • 本地访问:http://127.0.0.1:7396

功能:

  • Token 消耗趋势图(按天/小时)
  • 会话历史浏览
  • LLM 调用详情查看
  • 支持按时间范围、进程过滤

启动服务:

# 如果服务未运行,启动它
sudo systemctl start agentsight

# 查看服务状态
sudo systemctl status agentsight

Token 查询

常用命令

命令 说明
/usr/local/bin/agentsight token --period today 今天消耗
/usr/local/bin/agentsight token --period yesterday 昨天消耗
/usr/local/bin/agentsight token --hours 3 最近 3 小时
/usr/local/bin/agentsight token --period today --compare 今天 vs 昨天对比

返回示例

今天共消耗 125,000 tokens,比昨天(98,000)增长 27%。

输入: 125,000 | 输出: 85,000

审计查询

常用命令

命令 说明
/usr/local/bin/agentsight audit 最近 24 小时事件
/usr/local/bin/agentsight audit --last 48 最近 48 小时
/usr/local/bin/agentsight audit --pid 12345 指定进程
/usr/local/bin/agentsight audit --type llm 仅 LLM 调用
/usr/local/bin/agentsight audit --type process 仅进程行为
/usr/local/bin/agentsight audit --summary 汇总统计
/usr/local/bin/agentsight audit --summary --last 72 最近 72 小时汇总
/usr/local/bin/agentsight audit --json JSON 格式

返回示例

汇总输出:

=== Audit Summary (last 24 hours) ===

LLM calls:        42
Process actions:  128

Providers:
  OpenAI: 35 calls
  Anthropic: 7 calls

Top commands:
  python agent.py: 25 times
  node server.js: 17 times

事件列表(JSON):

{"event_type":"llm_call","pid":1234,"comm":"python",
 "extra":{"provider":"OpenAI","model":"gpt-4o","input_tokens":1500,"output_tokens":800}}

事件类型

类型 字段
llm_call provider, model, input_tokens, output_tokens, request_path, response_status, is_sse
process_action filename, args, exit_code

会话中断查询

数据库:/var/log/sysak/.agentsight/interruption_events.db

中断类型:llm_errorsse_truncatedcontext_overflowagent_crashtoken_limit 严重级别:critical > high > medium > low

Read the full file on GitHub · 124 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 124 lines · 103 tokens per session scan B 9aee00a5258a

Subscribe to this mod's changes

agentsight is a skill published in the GitHub repository alibaba/anolisa (618 stars, last pushed today), licensed Apache-2.0. It adds 103 tokens to every session and 1,030 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.