SuperAPI AI Directory

decompose

Deterministically decompose text into classified semantic units with authority, risk and attention scores plus entity extraction, without an LLM.

Open website

About this tool

Purpose

Decompose is a deterministic text classification and semantic decomposition tool for AI agents. Its core idea is: let classification happen before reasoning, rather than letting the LLM directly face unprocessed raw text. It converts arbitrary text into classified, structured semantic units, each with authority, risk, and attention scores as well as entities information. The entire process does not rely on an LLM, so it is deterministic, fast, and offline.

Main capabilities

  • Semantic unit decomposition: Breaks text down into structured units with classification labels. The material describes it as "Every unit classified. Every standard extracted. Every risk scored."
  • Multi-dimensional scoring and entity extraction: Each unit carries authority, risk, and attention scores as well as entity extraction results.
  • LLM pre-filtering: Built-in filter_for_llm(), retains mandatory, safety-critical, financial, and compliance-related units, and discards boilerplate text before the content reaches the LLM or vector store.
  • Risk routing: Safety-critical content enters one processing chain, financial content enters another, and boilerplate text is skipped directly.
  • Token cost measurement: The token cost reduction can be observed through the runnable script in examples/ .
  • MCP server support: Can be added to the MCP configuration of agents such as Claude Code, Cursor, and Windsurf, providing two tools—decompose_text(decompose arbitrary text) and decompose_url(fetch a URL and decompose its content).
  • Skill installation: Supports installing skills from ClawHub, or configuring directly; you can also run clawdhub install decompose-mcp.

Technical principles and features

Decompose runs entirely on pure regular expressions and heuristic rules, without using Ollama, without needing an API key, without needing a GPU, and with no inference cost. The material explicitly lists its design trade-offs:

  • Fast: Processing a 50-page specification document takes less than 500ms.
  • Deterministic: The same input always produces the same output.
  • Offline: Can be used in air-gapped environments, on an airplane, or in CI.
  • Composable: The agent's LLM reasons over structured output, while Decompose handles preprocessing.

Its positioning is "The LLM is what your agent uses, and Decompose makes whatever model you're running work better."

How to use

The material gives two integration paths:

  1. Add it as an MCP server to the agent's MCP configuration (Claude Code, Cursor, Windsurf, etc.), after which the agent gains the decompose_text and decompose_url tools.
  2. Install the skill from ClawHub, or run the installation command:clawdhub install decompose-mcp.

For more runnable examples, see the repository examples/ Table of contents.

Applicable scenarios

The material mentions that it originates from Echology's AECai—a document intelligence platform for architecture, engineering, and construction companies, whose classification patterns, entity extraction, and irreducibility detection have been battle-tested on thousands of real AEC documents (specifications, contracts, RFIs, inspection reports, payment applications). Decompose was spun out from AECai's text classification module and has proven to be cross-domain general (insurance, transactions, regulation).

Regarding case studies, Open Scripture Intelligence used Decompose's Markdown-aware chunker and regex entity extraction to convert 31,100 verses into a knowledge graph containing 344,799 cross-reference edges and semantic embeddings, demonstrating that the methodology is domain-agnostic.

Limitations and licensing

The material emphasizes that Decompose is not the endpoint, but rather the "step before the LLM" that most developers skip: documents have structure, that structure can be classified, and classification should happen before reasoning. It is based on regex and heuristics, so it does not rely on semantic understanding models; if deeper semantic reasoning is needed, it still must be performed by the agent's LLM on the structured output.

The project uses the MIT license, with copyright Copyright (c) 2025-2026 Echology, Inc., and is provided free of charge.