---
id: CON-PFM-LLM-002
name: AI Operation
feature: FEAT-PFM-LLM-02
product_area: platform
module: llm
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
definition: >-
  An AI operation is a published definition of a kind of model work, connecting its purpose with routing,
  prompts, budgets and historical prices.
owned_by: MOD-PFM-LLM
synonyms:
  - catalog entry
  - task (Tribal)
not_to_be_confused_with:
  - 'A customer-visible feature, which may use several operations.'
  - 'A request, which is one invocation of the definition.'
facets:
  - name: Model and generation settings
    meaning: Routing selects the provider and model together with output and reasoning settings.
    used_for: Applying one declared model choice consistently.
  - name: Limits
    meaning: 'Conversation and attempt budgets constrain turns, tools, time and cost at specified checks.'
    used_for: Preventing unbounded work and explaining bounded outcomes.
  - name: Prompt and its version
    meaning: Versioned instructions identify the prompt used by a request.
    used_for: Tracing an answer to its original guidance.
  - name: Estimate and ceiling
    meaning: Per-turn estimates and a request ceiling determine the preflight reservation.
    used_for: Checking affordability before model work begins.
  - name: Application and feature
    meaning: Application and feature attribution connects internal operation keys with recognizable product work.
    used_for: Grouping reports and evaluating operation restrictions.
  - name: Routing version
    meaning: An immutable publication preserves the routing definition used at a particular time.
    used_for: Explaining past requests after declarations change.
  - name: Model price and rate version
    meaning: A rate version retains model usage prices in credits and cents.
    used_for: Keeping past charges independent of later repricing.
  - name: AI task key
    meaning: A declared execution key identifies a kind of work that may make several requests.
    used_for: Accounting for a whole task across its conversations.
relationships:
  - to: CON-PFM-LLM-001
    statement: Request records retain the catalog versions that explain routing and pricing.
    provenance: observed
    source: 'services-platform:modules/llm/db/llm-invocations.table.ts'
  - to: CON-PFM-LLM-003
    statement: 'Operation budgets determine the admission reservation, subject to organization controls.'
    provenance: observed
    source: 'services-platform:modules/llm/catalog/pricing.ts'
lifecycle:
  - state: Declared
    meaning: An engineer has defined the operation and model rates.
    how_it_changes: Publication validates the declarations.
  - state: Published
    meaning: A routing and pricing version is available to requests.
    how_it_changes: Changed declarations append another version while preserving history.
acted_on_by:
  - CAP-PFM-LLM-005
  - CAP-PFM-LLM-006
  - CAP-PFM-LLM-001
  - CAP-PFM-LLM-002
  - CAP-PFM-LLM-013
visible_to:
  - ACT-PFM-033
  - ACT-PFM-004
  - ACT-PFM-034
evidence:
  - >-
    services-platform at ad3f6a6582843008ed0f5a17b131878d15829af1: docs/llm.md (What is declared, and what is
    published); modules/llm/catalog/*; services/catalog/*; db/llm-operation-routing-versions.table.ts,
    llm-model-rate-versions.table.ts; prompts/queries/generate-query.md; services/usage/usage-features.ts.
supersedes: []
---

# AI Operation

## What It Is

An AI operation describes a repeatable kind of AI work that Rhythm offers. It gives engineering a common place to state which model performs that work, which instructions it receives and what budgets govern the conversation. Staff usually recognize the feature, such as Describe With AI, rather than the operation’s internal name. The operation connects that familiar feature with the technical choices that make one request reproducible.

An engineer declares the operation and its related model prices. Publication checks the complete catalog and appends versions only where content changes. A version therefore records what was in force rather than acting as an editable settings form. An earlier request continues to identify its own versions even after engineering changes a prompt, budget or price. Reverting a declaration also creates another historical version.

## What It Is Not

An operation is not one request, a staff conversation or an application entitlement. Several operations may serve one feature, and a feature’s user-facing name does not independently establish its routing. The declared ceiling is an input to reservation and conversation checks. It does not guarantee that measured cost can never exceed the hold, because the final-answer and credit checks have a particular order.

## How It Is Used

Engineers use operation publication to make model work explicit before a feature calls it. Invalid declarations stop publication rather than leave an apparently usable but unpriced catalog. Rhythm staff inspect current routing and recent history when explaining which model or prompt produced expensive or unsuccessful work. Scripted tests use the same declared rates to check accounting. Accurate rates remain an engineering responsibility; the publication process does not compare them with a supplier invoice.

## Its Facets

**Model and generation settings.** Routing chooses the provider, model, reasoning effort and output capacity used for a request.

**Limits.** Turn, tool, duration, attempt and credit budgets address different ways a conversation can fail to converge. Their enforcement points matter when interpreting a completed answer.

**Prompt and its version.** Instructions have an explicit version so later analysis can distinguish model behavior from changed guidance.

**Estimate and ceiling.** The operation’s expected turn usage and permitted turns determine a reservation, capped by its declared credit ceiling.

**Application and feature.** These published labels support attribution and product-level reporting.

**Routing version.** Immutable routing history preserves the definition behind each request.

**Model price and rate version.** Versioned prices convert model usage into allowance credits and reported cents without repricing history.

**AI task key.** A separate declared task identity allows several requests to be grouped as one execution.

## How It Relates

AI requests resolve the published operation and retain its routing and price references. The AI allowance uses its reservation for admission, while organization limits can disable individual operations. AI usage presents those operations through catalog history and feature breakdowns. A query or another consuming feature supplies domain tools and judges its answer rather than making the operation responsible for domain state.

## What It Could Become

The product should settle whether the declared budgets represent admission protections or absolute conversation bounds, especially when a final answer precedes later checks. A future service consumer also needs the approved shared-runtime and Platform-metering direction translated into a concrete contract. Catalog expansion should retain immutable history and centralized attribution rather than let each consumer invent a separate price or allowance.
