Token导航 LogoToken导航TokenDH.com
decompose (Echology Io) logo
AI代理stdio官方级别未说明来源级核验

decompose (Echology Io)

MCP Server

Decompose是一款确定性文本分类工具,能够将任何文本转化为结构化的语义单元,适用于AI代理处理文档。

工具数

2

提示词数

0

GitHub Stars

9

资源数

0
PythonClaudeAI代理ClaudeCursorWindsurf

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

echology-io

提供方

echology-io

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install decompose-mcp

详细介绍

分解

![CI](https://github.com/echology-io/decompose/actions/workflows/ci.yml) ![PyPI](https://pypi.org/project/decompose-mcp/) ![Python](https://pypi.org/project/decompose-mcp/)

停止提示。开始分解。

AI代理的确定性文本分类。分解可以立即将任何文本转换为分类的、结构化的语义单元。没有法学硕士。没有设置。一个函数调用。

______________________________________________________________________

之前:您的代理人阅读此内容

The contractor shall provide all materials per ASTM C150-20. Maximum load
shall not exceed 500 psf per ASCE 7-22. Notice to proceed within 14 calendar
days of contract execution. Retainage of 10% applies to all payments.
For general background, the project is located in Denver, CO...

之后:您的代理人阅读此内容

[
  {
    "text": "The contractor shall provide all materials per ASTM C150-20.",
    "authority": "mandatory",
    "risk": "compliance",
    "type": "requirement",
    "irreducible": true,
    "attention": 8.0,
    "entities": ["ASTM C150-20"]
  },
  {
    "text": "Maximum load shall not exceed 500 psf per ASCE 7-22.",
    "authority": "prohibitive",
    "risk": "safety_critical",
    "type": "constraint",
    "irreducible": true,
    "attention": 10.0,
    "entities": ["ASCE 7-22"]
  }
]

每个单位都进行了分类。提取每个标准。每个风险都得分了。你的经纪人知道什么是重要的。

______________________________________________________________________

安装

pip install decompose-mcp

用作MCP服务器

添加到代理的MCP配置中(Claude Code、Cursor、Windsurf等):

{
  "mcpServers": {
    "decompose": {
      "command": "uvx",
      "args": ["decompose-mcp", "--serve"]
    }
  }
}

你的代理人有两个工具:

  • decompose_text --分解任何文本
  • decompose_url --获取URL并分解其内容

开爪

从ClawHub安装技能或直接配置:

{
  "mcpServers": {
    "decompose": {
      "command": "python3",
      "args": ["-m", "decompose", "--serve"]
    }
  }
}

或者安装技能: clawdhub install decompose-mcp

用作CLI

# Pipe text
cat spec.txt | decompose --pretty

# Inline
decompose --text "The contractor shall provide all materials per ASTM C150-20."

# Compact output (smaller JSON)
cat document.md | decompose --compact

用作图书馆

from decompose import decompose_text, filter_for_llm

result = decompose_text("The contractor shall provide all materials per ASTM C150-20.")

for unit in result["units"]:
    print(f"[{unit['authority']}] [{unit['risk']}] {unit['text'][:60]}...")

# Pre-filter for LLM context — keep only high-value units
filtered = filter_for_llm(result, max_tokens=4000)
print(f"{filtered['meta']['reduction_pct']}% token reduction")
llm_input = filtered["text"]  # Ready for your LLM

______________________________________________________________________

每个字段的含义

字段它告诉您的代理
authority强制性、禁止性、指令性、许可性、条件性、信息性这是硬性要求还是背景?
risk安全_关键、安全、合规、财务、合同、咨询、信息这有多重要?
type需求、定义、参考、约束、叙述、数据这是什么类型的内容?
irreducibletrue/false必须逐字保存吗?
attention0.0-10.0代理应该在这里花费多少计算?
entities标准、规范、规定引用了哪些正式参考文献?
actionabletrue/false有人需要做某事吗?

______________________________________________________________________

用这个构建什么

分解不是目的地。这是大多数开发人员跳过的LLM之前的步骤——不是因为它很难,而是因为没有人向他们展示它的存在。文档具有结构。这种结构是可以分类的。分类应该在推理之前进行。

Without:  document → chunk → embed → retrieve → LLM → answer  (100% of tokens)
With:     document → decompose → filter/route → LLM → answer  (20-40% of tokens)

过滤器:内置LLM预过滤器

filter_for_llm() 保留强制性、安全关键性、财务和合规性部门——在样板到达您的LLM或矢量存储之前将其删除。

from decompose import decompose_text, filter_for_llm

result = decompose_text(open("contract.md").read())
filtered = filter_for_llm(result, max_tokens=4000)

# filtered["text"] = high-value units only, ready for LLM
# filtered["meta"]["reduction_pct"] = how much was dropped (typically 60-80%)

# Or use the units directly for embedding
for unit in filtered["units"]:
    embed_and_store(unit["text"], metadata={
        "authority": unit["authority"],
        "risk": unit["risk"],
        "attention": unit["attention"],
    })

途径:基于风险的处理

安全关键内容进入一个链。财务内容转到另一个。锅炉板被跳过。

from decompose import decompose_text

result = decompose_text(spec_text)

for unit in result["units"]:
    if unit["risk"] == "safety_critical":
        safety_chain.process(unit)       # Full analysis + human review
    elif unit["risk"] == "financial":
        audit_chain.process(unit)         # Flag for finance team
    elif unit["attention"] = 1.0]

print(f"{len(high)}/{total} units need LLM analysis")
print(f"{100 - len(high) * 100 // total}% token reduction")

examples/ 用于可运行的脚本。

______________________________________________________________________

为什么没有法学硕士?

分解运行在纯正则表达式和启发式算法上。没有Ollama,没有API密钥,没有GPU,没有推理成本。

这是故意的:

  • :50页规格小于500ms
  • 确定性的:相同的输入总是产生相同的输出
  • 离线:在飞机上、CI上气隙工作
  • 可组合:您的代理对结构化输出的LLM原因——分解处理预处理

LLM是什么 *代理* 使用。分解可以让你运行的任何模型更好地工作。

______________________________________________________________________

由Echology建造

分解是由构建的 回声学 并从中提取 AECai,一个面向建筑、工程和建筑公司的文档智能平台。分类模式、实体提取和不可约性检测经过数千个真实AEC文档的战斗测试,这些文档包括规范、合同、RFI、检查报告和支付应用程序。

Decompose获得了独立性——它最初是AECai的文本分类模块,被证明足够通用,可以跨领域(保险、交易、监管)工作,并且是独立发布的。免费,麻省理工学院授权。

案例研究:开放式圣经智能

对工程规范进行分类的相同组块和实体提取模式也构成了圣经。 开放式圣经智能 使用Decompose的Markdown感知分块器和正则表达式实体提取将31100节经文转换为具有344799条交叉引用边和语义嵌入的知识图,证明该方法与领域无关。

博客

许可证: 麻省理工学院-版权所有(c)2025-2026回声学,股份有限公司。

目录标签

目录标签

PythonClaudeAI代理文本分类本地部署语义分析离线处理确定性输出

支持客户端

ClaudeCursorWindsurf

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP