@atomic-content-protocol/enrichment
LLM enrichment pipelines for the Atomic Content Protocol.
Runs tagging, summarisation, entity extraction, classification, and embedding over ACOs using Anthropic, OpenAI, or Ollama providers.
Install
npm install @atomic-content-protocol/enrichment @atomic-content-protocol/core
Quick start
import {
ProviderRouter,
UnifiedPipeline,
BatchEnricher,
} from "@atomic-content-protocol/enrichment";
const router = ProviderRouter.fromConfig({
quality: "fast", // fast (Haiku 4.5 / GPT-5.6 Luna) | balanced | best
anthropic: { apiKey: process.env.ANTHROPIC_API_KEY! },
openai: { apiKey: process.env.OPENAI_API_KEY! }, // fallback + embeddings
});
const enricher = new BatchEnricher(router, [new UnifiedPipeline()]);
const enriched = await enricher.enrichOne(myACO);
What's in the package
providers/—AnthropicProvider,OpenAIProvider,OllamaProviderrouter/—ProviderRouter,CircuitBreakerpipelines/—TagPipeline,SummaryPipeline,EntityPipeline,ClassificationPipeline,UnifiedPipeline,EmbedPipelinebatch/—BatchEnricherfor bulk enrichment (concurrencyoption)utils/—estimateEnrichmentCost,parseUnifiedOutput(Zod validation of model output), provenance helpers
Enrichment never overwrites a field that already has a value unless force: true; provenance records the model that actually answered after any fallback.
UnifiedPipeline runs tags + summary + entities + classification + language in a single LLM call — the cheapest path to a fully enriched ACO.
A text or document body under 50 characters (MIN_BODY_LENGTH_FOR_ENRICHMENT, after trimming) is not sent to the model at all: it gets no summary, tags, key entities or language, the same way a video without a transcript does, and the ACO comes back unchanged. Give it a real body and the next run enriches it.
Links
- Protocol spec: atomiccontentprotocol.org
- Repository: github.com/atomic-content-protocol/sdk
Stewardship
The Atomic Content Protocol is an open standard stewarded by Stacks, Inc — the company behind Stacklist.
License
Apache-2.0