cx-ai-center
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Center Skill
AI Center Skill
This is the tool for anything about AI/GenAI applications — both questions about their
behavior (prompts/responses, quality, hallucinations, guardrails, security, cost/tokens, errors,
latency — everything AI apps expose through their GenAI spans/tags) and actions to manage them
(applications, evaluations/policies, policy↔app links, model pricing). If a request touches an AI
application or its GenAI telemetry, use this skill.
Coralogix AI Center observes, evaluates, and guards GenAI/LLM applications. This skill
answers questions about AI apps from two sources:
- Configuration (this skill's commands): the AI application inventory, configured evaluations/policies, coverage, custom evaluations, and model pricing — none of which live in span telemetry.
cx ai-center - Telemetry (GenAI spans): what users asked, how the model answered, cost, tokens,
latency, errors, tool calls, and eval/guardrail verdicts — queried with . See references/ai-center-queries.md for the full, runnable query library, span schema, and playbooks.
cx spans '<DataPrime>'
Match the source to the question: "which apps lack guardrails" → config
(); "what are users asking my chatbot" → telemetry
(, reading the conversation from the GenAI spans). Some questions need both —
e.g. "is my chatbot's PII policy actually catching PII?" joins config (is the policy enabled)
with telemetry (the PII verdicts + the messages).
cx ai-center applications listcx spans '…'这是处理所有AI/GenAI应用相关事务的工具 —— 既可以回答关于AI应用行为的问题(提示词/响应、质量、幻觉、防护机制、安全性、成本/令牌、错误、延迟等所有AI应用通过GenAI spans/tags暴露的信息),也可以执行管理操作(应用程序、评估/策略、策略与应用关联、模型定价)。如果请求涉及AI应用或其GenAI遥测数据,请使用此Skill。
Coralogix AI Center用于观测、评估和防护GenAI/LLM应用。此Skill从两个来源获取AI应用相关问题的答案:
- 配置信息(通过此Skill的命令):AI应用清单、已配置的评估/策略、覆盖范围、自定义评估以及模型定价 —— 这些信息均不存储在遥测链路数据中。
cx ai-center - 遥测数据(GenAI spans):用户的提问内容、模型的回答内容、成本、令牌、延迟、错误、工具调用以及评估/防护判定结果 —— 通过****查询。完整的可运行查询库、链路数据 schema 和操作手册,请查看references/ai-center-queries.md。
cx spans '<DataPrime>'
根据问题类型匹配对应数据源:例如“哪些应用未启用防护机制”→ 配置信息();“用户向我的聊天机器人提出了哪些问题”→ 遥测数据(,从GenAI spans中读取对话内容)。部分问题需要同时使用两种数据源 —— 例如“我的聊天机器人的PII策略是否真的能识别出PII?”需要结合配置信息(策略是否启用)和遥测数据(PII判定结果+对话消息)。
cx ai-center applications listcx spans '…'Destructive Operation Safety
破坏性操作安全规范
All write operations (, , , , , )
require interactive confirmation. is a risky command, so writes are also
gated by in . To skip the prompt in scripts, pass
.
createupdatedeleteaddremovesetai-centerallow_risky_commands~/.cx/config.toml--yesIMPORTANT: NEVER pass without explicit user approval. Before executing any write:
--yes- Describe the exact operation to the user (what will be created/modified/deleted/linked).
- Wait for the user to confirm.
- Only then execute with .
--yes
Read operations (, , , , ) do
not require confirmation and can be run freely.
listgetcoveragelist-for-applicationmodel-pricing get所有写入操作(、、、、、)均需要交互式确认。属于高风险命令,因此写入操作还受中的配置限制。若要在脚本中跳过确认提示,请添加参数。
createupdatedeleteaddremovesetai-center~/.cx/config.tomlallow_risky_commands--yes**重要提示:未经用户明确批准,切勿使用参数。**执行任何写入操作前:
--yes- 向用户描述具体操作内容(将创建/修改/删除/关联的对象)。
- 等待用户确认。
- 获得确认后,再添加参数执行操作。
--yes
读取操作(、、、、)无需确认,可直接执行。
listgetcoveragelist-for-applicationmodel-pricing getRead-Only Mode
只读模式
Use (or ) to block every write at the CLI level — safe for
exploration.
--read-onlyCX_READ_ONLY=1使用(或)参数可在CLI层面阻止所有写入操作 —— 适合用于探索性操作。
--read-onlyCX_READ_ONLY=1Agent Mode
Agent模式
When running inside an AI agent (Claude Code, Cursor, Codex, …), cx detects it and — instead of
showing a confirmation prompt that would hang forever (no human is there to type y/n) — stops
immediately with an error telling you to get the user's approval, then re-run with .
--yes当在AI Agent(Claude Code、Cursor、Codex等)内部运行时,cx会自动检测环境,不会显示会导致程序挂起的确认提示(没有人工输入y/n),而是立即终止并抛出错误,提示你获取用户批准后,添加参数重新执行。
--yesNo delete commands (by design)
无删除命令(设计如此)
The CLI intentionally exposes no delete for custom-evaluation policies, AI applications, or
model pricing — even though the AI v3 API has those delete endpoints, does not
surface them.
cx ai-center- Custom-evaluation policy: can't be deleted; to take it off an app, detach with
(the policy object survives and can be re-attached).
custom-evaluations remove - Model pricing: no delete command. It's team-wide (not per-app), so to change or clear
it, run with a new map (an empty map
model-pricing setclears all overrides) —{}replaces the whole set.set
CLI刻意不提供自定义评估策略、AI应用或模型定价的删除命令 —— 尽管AI v3 API包含这些删除端点,但并未开放。
cx ai-center- 自定义评估策略:无法删除;若要从应用中移除,使用命令解除关联(策略对象会保留,可重新关联)。
custom-evaluations remove - 模型定价:无删除命令。它是团队级配置(而非应用级),若要修改或清空配置,使用命令传入新的映射表(空映射表
model-pricing set会清除所有覆盖配置)——{}命令会替换整个配置集合。set
Golden rule
黄金准则
For content questions (quality, hallucination, sentiment, topics) read the actual
conversation and cite the — don't rely on verdict tags alone. The transcript lives in
one of two conventions (/, or the older indexed
/ tags); read it with the Reading conversations (content
questions) queries in the library, which handle both and exclude the system prompt and tool
traffic. Full guidance:
references/ai-center-queries.md.
traceIDgen_ai.input.messagesoutput.messagesgen_ai.prompt.<n>completion.<n>对于内容类问题(质量、幻觉、情感、主题),请读取实际对话内容并引用 —— 不要仅依赖判定标签。对话内容存储在两种约定格式中(/,或旧版索引格式/标签);可使用查询库中的「读取对话内容(内容类问题)」查询语句,该语句会兼容两种格式并排除系统提示词和工具流量。完整指南请查看:references/ai-center-queries.md。
traceIDgen_ai.input.messagesoutput.messagesgen_ai.prompt.<n>completion.<n>CLI Commands
CLI命令
Show names to the user; use UUIDs only internally. When presenting results, refer to apps
and evaluations by their human names (application/subsystem, evaluation name), not raw UUIDs.
The UUID is only needed to call a by-id or write command — resolve it yourself from the
matching command (never guess or make the user paste a UUID).
list**向用户展示名称;仅在内部使用UUID。**展示结果时,请使用应用和评估的人类可读名称(应用/子系统、评估名称),而非原始UUID。仅在调用按ID查询或写入命令时才需要UUID —— 请通过对应的命令自行获取(切勿猜测或让用户粘贴UUID)。
listApplications (inventory + guarded status)
应用程序(清单与防护状态)
| Command | Purpose |
|---|---|
| List AI apps incl. |
| Filter to apps using an eval type (repeatable) |
| Paginate |
| One application by UUID |
| 命令 | 用途 |
|---|---|
| 列出所有AI应用,包含 |
| 筛选使用指定评估类型的应用(可重复使用该参数) |
| 分页查询 |
| 通过UUID查询单个应用 |
Evaluations (configured policies on apps)
评估(应用上配置的策略)
| Command | Purpose |
|---|---|
| All configured evaluations |
| Scope to one app (the pair) |
| Filter by type — |
| One evaluation by UUID |
| Create/enable an evaluation (write) |
| Partial update (write) |
| Remove an evaluation from its app (write) |
| 命令 | 用途 |
|---|---|
| 查询所有已配置的评估 |
| 限定查询范围为单个应用(应用+子系统组合) |
| 按类型筛选 —— |
| 通过UUID查询单个评估 |
| 创建/启用评估(写入操作) |
| 部分更新(写入操作) |
| 从应用中移除评估(写入操作) |
Custom evaluations (policies) & application links
自定义评估(策略)与应用关联
| Command | Purpose |
|---|---|
| All custom evaluation policies |
| Policies linked to one app |
| Create a custom policy (write) |
| Partial update (write) |
| Attach a policy to an app (write) |
| Detach (reversible) (write) |
By-id is prebuilt-only.fetches a prebuilt/configured evaluation. Custom policies have no get-by-id — find one viaevaluations get <id>/custom-evaluations listand match bylist-for-application/name.id
| 命令 | 用途 |
|---|---|
| 查询所有自定义评估策略 |
| 查询与指定应用关联的策略 |
| 创建自定义策略(写入操作) |
| 部分更新(写入操作) |
| 将策略关联到应用(写入操作) |
| 解除关联(可恢复)(写入操作) |
仅预构建评估支持按ID查询。用于查询预构建/已配置的评估。自定义策略不支持按ID查询 —— 请通过evaluations get <id>/custom-evaluations list命令查询,并通过list-for-application/名称匹配。id
Coverage & model pricing
覆盖范围与模型定价
| Command | Purpose |
|---|---|
| Map of each evaluation type → number of apps using it (coverage / gap analysis) |
| Team's custom per-model pricing overrides |
| Set team pricing (team-wide, new data only) (write) |
The bodies for and match the AI v3 API
shape verbatim; use to read JSON from stdin. For , is
required and must be uppercase ( or ); for ,
, , and are required. Exception: takes just
the raw map — cx wraps it as for you, so do not include the
outer envelope. Each model maps to a price object; all four fields are optional doubles
(USD per one million tokens), omit the ones that don't apply:
--from-fileevaluationscustom-evaluations-evaluations createtargetPROMPTRESPONSEcustom-evaluations createnameinstructionspolicyTypemodel-pricing setmodel→price{"prices": …}pricesjson
{
"gpt-4o": {
"inputPricePerMillionTokens": 2.5,
"outputPricePerMillionTokens": 10,
"cacheReadPricePerMillionTokens": 1.25,
"cacheWritePricePerMillionTokens": 3.75
}
}An empty map clears all overrides (set replaces the whole set — it's team-wide, new data only).
returns the wrapper — the
per-model overrides live under (empty when none are set).
{}model-pricing get{ "pricing": { "id", "companyId", "prices": { … } } }prices| 命令 | 用途 |
|---|---|
| 生成各评估类型→使用该类型的应用数量的映射表(覆盖范围/缺口分析) |
| 查询团队的自定义模型定价覆盖配置 |
| 设置团队定价(团队级配置,仅使用新数据)(写入操作) |
evaluationscustom-evaluations--from-file-evaluations createtargetPROMPTRESPONSEcustom-evaluations createnameinstructionspolicyTypemodel-pricing set模型→价格{"prices": …}pricesjson
{
"gpt-4o": {
"inputPricePerMillionTokens": 2.5,
"outputPricePerMillionTokens": 10,
"cacheReadPricePerMillionTokens": 1.25,
"cacheWritePricePerMillionTokens": 3.75
}
}空映射表会清除所有覆盖配置(命令会替换整个配置集合 —— 这是团队级配置,仅使用新数据)。命令返回的结构为 —— 模型级覆盖配置位于字段下(无配置时为空)。
{}setmodel-pricing get{ "pricing": { "id", "companyId", "prices": { … } } }pricesCommon workflows
常见工作流
Inventory & guardrail gaps
清单与防护缺口
bash
undefinedbash
undefinedWhich apps are NOT guarded?
哪些应用未启用防护?
cx ai-center applications list -o json | jq '[.[] | select(.guardrailsIntegrated==false)]'
undefinedcx ai-center applications list -o json | jq '[.[] | select(.guardrailsIntegrated==false)]'
undefinedEnable a policy on an app (write — confirm first!)
为应用启用策略(写入操作 —— 请先确认!)
bash
undefinedbash
undefined1. Describe to the user; 2. get approval; 3. then:
1. 向用户描述操作内容;2. 获取批准;3. 执行以下命令:
cx ai-center evaluations create --from-file eval.json --yes
cx ai-center evaluations create --from-file eval.json --yes
eval.json: { "application": "...", "subsystem": "...", "target": "PROMPT", "config": { "<type>": {...} }, "isEnabled": true }
eval.json示例: { "application": "...", "subsystem": "...", "target": "PROMPT", "config": { "<type>": {...} }, "isEnabled": true }
target
is REQUIRED and must be UPPERCASE — "PROMPT" or "RESPONSE" (the API rejects lowercase / a missing target).
targettarget
为必填项且必须大写 —— "PROMPT"或"RESPONSE"(API会拒绝小写或缺失该字段的请求)。
targetundefinedundefinedRead the actual conversations (telemetry, not config)
读取实际对话内容(遥测数据,非配置信息)
Use with the query library in
references/ai-center-queries.md — reading messages, cost,
latency, errors, tool calls, and per-user analysis.
cx spans使用命令结合references/ai-center-queries.md中的查询库 —— 可读取消息内容、成本、延迟、错误、工具调用以及按用户维度的分析数据。
cx spansKey principles
核心原则
- Config vs. telemetry: inventory / evaluations / policies / coverage / pricing → ; content / cost / latency / errors / verdicts → GenAI spans via
cx ai-center. Don't answer one from the other.cx spans - Confirm before writes. Describe the operation, get approval, then run with .
--yes
- 配置信息 vs 遥测数据:清单/评估/策略/覆盖范围/定价 → 使用;内容/成本/延迟/错误/判定结果 → 通过
cx ai-center查询GenAI链路数据。请勿混淆数据源。cx spans - 写入操作前需确认。描述操作内容,获得用户批准后,再添加参数执行。
--yes
Related Skills
相关Skill
- — general logs/spans/metrics/DataPrime querying (the engine behind the
cx-telemetry-queryingqueries used here).cx spans - — the conversational AI assistant (
cx-olly).cx olly ask
- —— 通用日志/链路/指标/DataPrime查询工具(本Skill中
cx-telemetry-querying查询的底层引擎)。cx spans - —— 对话式AI助手(
cx-olly命令)。cx olly ask