> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Packaged AI capabilities

> Compose models, agents, knowledge, document review and evaluations through existing Bijection components.

Bijection packages common AI workflows as components and typed adapters. Your
application declares the model, tools, source population and review rules.
Native requests, permissions, files and external calls retain their existing
authority.

Inference, parsing, training and other compute run on external sources.
Bijection does not provide a managed compute platform. Components connect those
sources to the application's governed data and operations.

## Choose the owner

| Capability | Package and entry point | What it owns |
| - | - | - |
| Models and metering | `@bijectionhq/language-models` | Declared providers, exact model IDs, capabilities, budgets and attempt accounting |
| Platform gateway access | `@bijectionhq/language-models/gateway` | Catalog adapter with a fresh scoped token for the exact configured gateway URL |
| Typed AI tasks | `@bijectionhq/language-models/tasks` | Validated input/output, bounded context and explicit terminal outcomes |
| Managed agents | `@bijectionhq/agents/managed` | Bounded model/tool loops over existing thread storage |
| Knowledge collections | `@bijectionhq/rag/collections` | Deterministic chunks, isolated index generations and current source citations |
| Document intelligence | `@bijection/documents` | Native source versions, work attempts, semantic evidence, corrections and review |
| Durable orchestration | `@bijectionhq/workflow` | Existing durable step continuations around external work |
| Workspace assistant | `@bijection/assistants` | Member-owned conversations, authorized tools, source evidence and operation drafts |
| AI evaluations | `@bijectionhq/experiments/ai` | Versioned assertions over retained original executions, with explicit missing evidence |
| Model lifecycle | `@bijection/model-lifecycle` | Existing external training/evaluation jobs and governed promotion |
| Channel assistants | `@bijection/assistants/channels` | Finite continuation of an authenticated, retained channel occurrence |

These source entry points are selected by the platform's immutable component
lock. A source import or a unit test does not establish package publication,
native deployment compatibility or hosted qualification.

## Start with a metered handle

Declare a catalog once with `defineLanguageModels`, install it on the language
models component, and pass typed handles to consumers. A handle contains model
identity and capabilities; it never contains a reusable provider credential.
Credentials remain deployment configuration or native gateway custody.

`defineAiTask` combines an input schema, an output schema, instructions and a
context builder. It opens a metered session before the builder reads protected
records. Each retained intent has one provider attempt, with SDK retries
disabled. Results distinguish completed output, invalid input/output, refusal,
failure, insufficient evidence, uncertainty and cancellation. An uncertain
attempt retains its reservation and must not be replayed to guess whether the
provider ran.

`defineManagedAgent` adds a declared tool allowlist and bounded steps, tool
calls, prompt bytes and output bytes. It checks the native session around tool
work. Hitting a step or output limit is a refused outcome, never a completed
answer. Tools execute through the application's current authenticated context.

## Publish knowledge from canonical sources

`defineKnowledgeCollection` embeds a bounded source population into a namespace
isolated by collection and generation. The host owns accepted indexing work and
publication. Its publication mutation must recheck the original work, source
revisions and previous pointer before accepting ready index entries.

Retrieval uses vector results only to select candidates. It rereads canonical
sources and their current revisions before returning text and citations, then
rechecks the published generation. Cached text cannot bypass a revoked or
changed source. Citations identify collection, source, revision, generation and
chunk. Different chunks or revisions remain distinct in the workspace.

## Review business changes through native operations

The assistant's operation tool creates drafts for a person to submit through the
normal operation dialog. Model output does not grant permission or execute a
business change. The actual operation rechecks current data and its review rule.

Documents use the same boundary: an external worker claims an existing native
attempt and reads files through scoped native delivery. Parsed pages and model
values retain source evidence. `requireResult` checks the exact definition,
current source selection, unresolved issues and required review before a
business operation can use the result.

The agent workspace exposes host-owned original work, immutable definition
identity, model attempts and verified native request links. Cancellation fences
late content writes through `/storage`; settlement can still resolve an already
dispatched attempt. Recovery reads original retained evidence.

The knowledge `/workspace` and `/application` adapters expose source coverage,
current publication, bounded refresh history and explicit metered previews.
Inspection performs no inference. Current-source checks still apply to previews.

## Measure original executions

`defineAiEvaluation` evaluates explicit case/candidate/repetition slots against
original outputs, tool traces, citations, latency, cost and optional judgments.
Declarations pin target/configuration, case-set revision, baseline, evaluator
versions, repetitions, populations and finite cost/deadline limits. Missing or
unknown slots remain in the denominator. Duplicate execution IDs cannot count as
independent repetitions. Partial cost stays partial, with exact picodollar
values retained.

`defineAiJudge` from `/ai/judge` runs a pinned rubric through a metered typed
task. Its original model-produced judgment has its own uncertainty and
accounting. It grants no approval.

The evaluation workspace adapters expose versioned definitions and retained
reports. `aiLifecycleMeasurements` converts a report into metric/table fragments
for the existing model-lifecycle owner, using an explicit selection or held-out
validation population. Aggregate cost/deadline status remains explicit. It
creates neither a native report identity nor promotion approval. Run new
inference as an explicit admitted intent; evaluating stored evidence does not
silently run a model.

## Run the reference journeys

The repository's
[AI operations reference](https://github.com/bijectionhq/bijection/tree/main/examples/ai-operations)
connects retained typed classification, support investigation, knowledge
refresh, reviewed delivery remedies and refunds, external invoice parsing,
document review and evaluation reports in the standard workspace. Its default
models are labelled fixtures that call no provider and demonstrate contracts
rather than model quality.

The optional Slack worker reuses the existing signed channel transport. It
accepts the occurrence before inference, resumes only its original request ID,
and commits a reply from stored settled evidence. Its separate native service
grant admits policy reads; a Slack actor does not acquire a person's finance
permissions. Accepted reply submission and confirmed provider delivery remain
separate outcomes.

The reference also connects original evaluation evidence to native assessment,
reviewed promotion, prediction-to-decision creation evidence and observed
outcome feedback. Its finite Workflow recipes observe original owners using an
explicitly authorized native service credential. They preserve original
operation requests and never impersonate the initiating person or repeat
inference during replay.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.