agent-workspace-token-economy

为代币效率设计的智能体工作空间接口方案,适用于构建含丰富工件的智能体系统、优化智能体的代币成本,或在关系型与文件系统式接口之间做出接口选择。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "agent-workspace-token-economy":https://skillpi.com/zh/skills/deepskill-fcfce432353abf077d80dc57c61b889c21eecc6bb618ccc220a40799a573d793。安装前核对上游来源和版本:https://skillhub.cn/skills/user_d353d7f3/agent-workspace-token-economy。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

为代币效率设计的智能体工作空间接口方案,适用于构建含丰富工件的智能体系统、优化智能体的代币成本,或在关系型与文件系统式接口之间做出接口选择。

0 下载

介绍来源: third_party · user_d353d7f3 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: agent-workspace-token-economy
description: Design Agent workspace interfaces for token efficiency. Use when building artifact-heavy Agent systems, optimizing Agent token costs, or choosing between relational vs filesystem-style interfaces for AI Agents.

Agent Workspace Token Economy

Overview

Interface shape determines Agent token cost. The same model, same data, same task can consume 45% fewer tokens and cost 39% less purely based on how the workspace is presented to the Agent. This skill provides frameworks for designing token-efficient Agent interfaces.

Core Thesis

Token efficiency is not just about model selection and prompt engineering. The operation interface (how data, tools, and artifacts are exposed to the Agent) is a primary cost lever. File-system-style namespace interfaces consistently outperform raw relational interfaces for exploratory and composite tasks.

The Progressive Disclosure Pattern

LLMs are extensively trained on shell, Unix tools, Git, and code navigation corpora. The most stable behavioral pattern:

ls → grep → read → cite line numbers

This is progressive disclosure: low-cost discovery first, targeted reading second, scoped search third, evidence citation last.

Four Pillars of File-System Semantics

Pillar Mechanism Why It Matters
Path as Handle /runs/abc/stdout.log is both name and address Agent can return to evidence without rebuilding context
Scoped Search Global grep for discovery, directory grep for extraction Reduces irrelevant context injection
Line Numbers Natural audit trail Built-in evidence referencing for verification
Push-Down Filter, sort, limit, project in one call Fewer conversation turns = less context re-injection

Two-Layer Architecture

┌─────────────────────────────────────────┐
│  Agent Workspace Layer (Namespace)      │
│  Path addressing, directory listing,    │
│  on-demand read, scoped search,         │
│  permission boundaries, audit trails    │
├─────────────────────────────────────────┤
│  Storage Layer (unchanged)              │
│  Database (reliability, transactions)   │
│  Object storage (large files, blobs)    │
│  APIs (permissions, domain logic)       │
└─────────────────────────────────────────┘

Key insight: Don't replace databases with files. Add a workspace namespace layer ON TOP of existing storage. The bottom layer keeps doing what it's good at; the top layer gives the Agent an interface it navigates efficiently.

Interface Comparison Framework

Dimension Relational Interface Namespace Interface Winner
Single-shot structured query Schema → SELECT → done Catalog → find → done Relational
Composite exploration Multiple JOINs, blob refs, context bloat ls → grep → read with line numbers Namespace
Log/evidence retrieval grep_blob on indirect refs, whole blobs into context Recursive grep with scope, line-number citations Namespace
Schema discovery cost Agent reads schema, guesses JOIN paths Agent lists directories, stats objects Namespace
Error recovery Wrong query = full cost still charged Wrong path = cheap retry with new ls Namespace

Decision rule: For clear aggregations and leaderboards, relational wins. For "find cohort → check logs → cite evidence" composite tasks, namespace wins by 2-3×.

Token Cost Breakdown

Agent token consumption has three layers:

  1. Prompt tokens — everything the Agent reads (schema, query results, logs, tool descriptions)
  2. Reasoning tokens — internal thinking ("what do I look at next?", "how do these tables relate?", "did I miss something?")
  3. Output tokens — final answer and tool calls

Bad interfaces inflate all three layers:

  • More schema to read → more prompt tokens
  • More mental mapping to connect entities → more reasoning tokens
  • More failed attempts → more rounds → compounding prompt + reasoning tokens

When to Apply This Skill

High-Impact Scenarios

  • Experiment tracking systems: runs, metrics, checkpoints, logs, git states
  • Legal document Agent: contracts, precedents, exhibits, annotations, versions
  • Data analysis Agent: notebooks, CSVs, charts, reports, database results
  • R&D Agent: issues, PRs, CI logs, build artifacts, deployment records
  • Multi-media Agent: originals, thumbnails, transcriptions, timestamps, embeddings
  • Multi-Agent collaboration: shared artifacts, version locks, update monitoring

Diagnostic Signals

Your Agent system needs this skill if:

  • Agent spends most turns discovering schema before answering
  • Tool call chains exceed 5 steps for simple questions
  • Logs/blobs are regularly pulled entirely into context
  • Same question costs 2× more on different interfaces
  • Agent gets "lost" mid-task, forgetting the original question

Design Checklist

  • [ ] Can the Agent discover available data with a single low-cost call?
  • [ ] Are paths/addresses stable across sessions?
  • [ ] Can search be scoped to a subset (directory, cohort)?
  • [ ] Do results include line numbers or position references?
  • [ ] Can filtering, sorting, and projection be pushed down in one call?
  • [ ] Does the Agent need to understand schema before starting exploration?
  • [ ] Are blob/log reads on-demand, not eager?
  • [ ] Is there a unified namespace across different storage backends?

Measuring Token Efficiency

metrics:
  prompt_tokens_per_task: total input tokens / task count
  reasoning_tokens_per_task: internal thinking tokens / task count
  cost_per_correct_answer: total_cost / correct_answers
  turns_per_task: tool_call_rounds / task count
  error_rate: failed_attempts / total_attempts

benchmarks:
  - same_model: fixed model across all tests
  - same_data: identical dataset
  - same_tasks: identical question set
  - stateless: fresh context per run
  - repeated: ≥10 runs per condition for stability

Anti-Patterns

  1. Schema-first exploration: Forcing Agent to read full schema before any action
  2. Blob eager loading: Pulling entire logs into context when only 3 lines matter
  3. Flat tool namespace: Hundreds of tools in a single list, no hierarchy
  4. ID indirection: Agent must resolve ID → ref → blob → content chains
  5. Stateful context dependency: Requiring prior conversation to understand current task

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 提供token效率优化的核心框架,解决AI Agent系统中的实际成本痛点
  • 涵盖多种高价值应用场景,包括实验跟踪、法律文档、数据分析等
  • 提供具体的诊断信号和设计清单,实用性强
触发精准88/100

亮点

  • 触发词精准完整,覆盖多种变体,边界清晰
  • description明确指出了适用场景和具体用例
结构规范85/100

亮点

  • 结构清晰,包含Overview、Core Thesis、具体模式、架构设计、对比框架等完整章节
  • 提供了具体的检查清单和度量标准,便于实际应用
  • 文档组织良好,逻辑性强
执行可靠90/100

亮点

  • 提供了具体的架构设计和实现模式
  • 包含详细的度量标准和基准测试方法
  • 给出了明确的设计检查清单和反模式
证据可验 (前四项均值)89/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。