---
title: '@0xintuition/atom-classification'
description: Run an explicit plugin set and inspect canonical classifications, publishable fields, and resolver failures.
url: https://docs.intuition.systems/docs/reference/packages/atom-classification
markdown_url: https://docs.intuition.systems/docs/reference/packages/atom-classification.md
version: V2
llms_index: https://docs.intuition.systems/llms.txt
kind: reference
reader:
  - app
  - plugin
packages:
  - '@0xintuition/atom-classification@0.1.1'
---

## What it's for

A plugin engine that classifies input and resolves canonical envelopes in client-only, progressive, or server-only modes. It executes classification logic; the classifications package owns the canonical entity specifications.

## When to use it

Use it to turn an input into typed identity data before enrichment or a creation decision. Select plugins explicitly: creating an engine neither installs every provider nor persists output. Use server-compatible plugins for credentialed providers; a provider factory's existence does not guarantee a network response.

## Install

```sh
npm install @0xintuition/atom-classification@0.1.1
```

The package ships ESM and CommonJS builds for Node 20+ and also supports Bun for server execution. A client engine needs client-compatible plugins; provider requests require a suitable transport. See [module-format compatibility](https://docs.intuition.systems/docs/reference/compatibility#runtime-requirements).

## Entry points

All public modules

| Subpath | Purpose |
| --- | --- |
| `.` | Engines, plugin factories, canonical result contracts, and type registry |
| `./ai` | Optional server AI fallback adapter |
| `./cache` | Resolver cache contracts and adapters |
| `./client` | Client engine factory |
| `./engine` | Shared classification engine |
| `./plugin-factories` | Built-in plugin factories |
| `./plugins` | Plugin manifests, types, and validation |
| `./plugins/amazon` | Amazon plugin and adapters |
| `./plugins/default-url` | Generic URL fallback |
| `./plugins/etherscan` | Etherscan plugin |
| `./plugins/ethereum` | Ethereum input plugin |
| `./plugins/github` | GitHub plugin and adapters |
| `./plugins/imdb` | IMDb plugin and adapters |
| `./plugins/instagram` | Instagram plugin and adapters |
| `./plugins/isbn` | ISBN plugin |
| `./plugins/lexical` | Opt-in lexical classification |
| `./plugins/plain-text` | Generic Thing fallback for text |
| `./plugins/spotify` | Spotify plugin and adapters |
| `./plugins/tiktok` | TikTok plugin |
| `./plugins/tmdb` | TMDB plugin |
| `./plugins/type-profiles` | Runtime type profiles |
| `./plugins/wikipedia` | Wikipedia plugin |
| `./plugins/x` | X plugin and adapters |
| `./plugins/youtube` | YouTube plugin and adapters |
| `./presets` | Explicit default plugin selection |
| `./server` | Server engine factory |
| `./type-registry` | JSON-LD type registration and validation |
| `./types` | Request, result, policy, and provenance schemas |
| `./testing` | Plugin testing helpers |
| `./plugins/coingecko` | CoinGecko plugin |
| `./plugins/coinmarketcap` | CoinMarketCap plugin |
| `./plugins/etsy` | Etsy plugin |
| `./plugins/goodreads` | Goodreads plugin and adapters |
| `./plugins/int` | Intuition Identifier plugin |
| `./plugins/letterboxd` | Letterboxd plugin and adapters |
| `./plugins/openlibrary` | Open Library plugin |
| `./plugins/places` | Places plugin and adapters |
| `./plugins/shopify` | Shopify plugin |
| `./plugins/steam` | Steam plugin |
| `./plugins/wikidata` | Wikidata plugin |
| `./artifact-types` | Shared artifact types |
| `./plugin-api` | Public plugin authoring API |
| `./outcome` | Promise outcome wrapper for classification |
| `./identifier-rung-projection` | Project admissible identifier rungs |
| `./url-hygiene` | URL normalization policy |
| `./ssrf` | Destination and transport policy helpers |
| `./ssrf-guard` | SSRF guard integration |
| `./provider-metrics-contract` | Provider observation contract |
| `./adapters/upstash` | Explicit HTTP cache adapter |

## Depends on and works with

Runtime package dependencies: [atom-enrichment](https://docs.intuition.systems/docs/reference/packages/atom-enrichment), [atom-parser](https://docs.intuition.systems/docs/reference/packages/atom-parser), [classifications](https://docs.intuition.systems/docs/reference/packages/classifications), [iid](https://docs.intuition.systems/docs/reference/packages/iid), [iid-ladder](https://docs.intuition.systems/docs/reference/packages/iid-ladder), [iid-registry](https://docs.intuition.systems/docs/reference/packages/iid-registry), [pipeline-runtime](https://docs.intuition.systems/docs/reference/packages/pipeline-runtime), [predicates](https://docs.intuition.systems/docs/reference/packages/predicates), [primitives](https://docs.intuition.systems/docs/reference/packages/primitives), and [schema-org](https://docs.intuition.systems/docs/reference/packages/schema-org). Peer dependencies: none. `zod` is an additional ordinary dependency in the package manifest.

Classification consumes enrichment helpers; enrichment does not depend on this engine. Your host owns credentials, persistent storage, cache selection, and request policy.

## @0xintuition/atom-classification - Example

An explicit pair of local plugins produces a generic Thing for fixed text. An empty plugin set demonstrates the unmatched-text fallback; the invalid request demonstrates boundary failure without a provider call.

```ts
import {
  classifyOutcome,
  createClientEngine,
  createPlainTextPlugin,
  createTypeProfilesPlugin,
} from '@0xintuition/atom-classification';

const engine = createClientEngine({
  plugins: [createTypeProfilesPlugin(), createPlainTextPlugin()],
  now: () => new Date('2026-01-01T00:00:00.000Z'),
});
export const classified = await engine.classify({
  input: 'A synthetic catalog idea',
  mode: 'client-only',
  classificationSessionId: 'package-reference',
});
console.log(classified.resolved?.publishable[0]?.type);

// Unmatched text remains a candidate Thing, not a verified identity.
export const unmatched = await createClientEngine({ plugins: [] }).classify({
  input: 'Unmatched synthetic catalog label',
  mode: 'client-only',
  classificationSessionId: 'unmatched-fixture',
});
console.log(unmatched.resolved?.fallbackUsed);

export const invalidRequest = await classifyOutcome(engine, {
  input: '',
  mode: 'client-only',
  classificationSessionId: 'invalid-fixture',
});
console.log(invalidRequest.kind);
```

Read `resolved.classifications` for canonical envelopes and `resolved.publishable` for the identity-safe projection. Identity fields are eligible by default, approved rich fields depend on source policy, and volatile fields are excluded. `resolved.atoms` is a compatibility projection. These are candidate payloads, not proof of an on-chain atom.

A completed response's `ok: true` does not promise full resolution: inspect `status` (`placeholder`, `partial`, or `complete`), optional `resolved`, and `resolverErrors`. Unmatched text falls back to a generic Thing with `resolved.fallbackUsed: true`; that candidate is not a verified entity identity. Invalid requests reject `classify`; `classifyOutcome` captures that rejection as an outcome. Cancellation and resolver deadlines are separate from a successful partial result.

External plugins implement `AtomClassificationPlugin` with a validated manifest, classifiers, and resolvers. Register emitted types, satisfy `dependsOn`, and explicitly set a local resolver's `executionMode: 'deterministic'` when it should run under client-only policy. An omitted mode defaults to server enrichment. Follow [Write a classification plugin](https://docs.intuition.systems/docs/core/classification-plugin) for the complete contract and Core composition boundary.

## Related concepts

- [Atom classification](https://docs.intuition.systems/docs/concepts/atom-classification)

See also [Classify and enrich atoms](https://docs.intuition.systems/docs/build/classify-enrich).

## Source

[Package README](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/atom-classification/README.md), [canonical output contract](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/atom-classification/docs/canonical-output-contract.md), [plugin authoring](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/atom-classification/docs/plugin-authoring.md), and [engine implementation](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/atom-classification/src/engine.ts).

Applies to V2 · `@0xintuition/atom-classification` 0.1.1
