Skip to content

Home > intention-kernel

intention-kernel package ​

Build provider-neutral agents that interpret intentions, validate plans, execute capability effects and publish grounded, durable responses.

Import these runtime APIs from intention-kernel. For scenario evaluation, assertions, reports, and test helpers, see intention-kernel/testing.

Classes ​

Class

Description

AgentCompilationError

Raised when a public definition cannot be compiled safely.

DurabilityError

Raised when durable state cannot be read or committed safely.

EffectNotAppliedError

Raised by a host adapter only when it knows an external effect was not applied.

EffectUncertainError

Raised when an external effect may have happened and cannot be retried safely.

ExecutionBudgetExceededError

Raised when a bounded turn exceeds its configured execution budget.

IntentionKernelError

Base class for exceptional failures exposed by Intention Kernel.

KernelConfigurationError

Raised when required kernel adapters or execution limits are invalid.

ModelGatewayError

Raised when a model provider cannot produce a usable result.

SchemaValidationError

Raised when data crossing a trust boundary violates its schema.

Functions ​

Function

Description

agentId(value)

Validate and brand an agent ID.

capabilityId(value)

Validate and brand a capability ID.

createKernel(options)

Create a provider-neutral kernel whose compiled agents run on private LangGraph state.

defineAgent(definition)

Define and shallow-freeze a single-agent manifest.

defineCapability(definition)

Define and freeze a capability contract without executing it.

defineModelGuidancePolicy(definition)

Define immutable contextual model guidance without coupling it to a provider.

definePolicy(definition)

Define and freeze a host-owned policy.

defineSchema(definition)

Define a vendor-neutral schema and normalize all validation results.

effectId(value)

Brand a durability-adapter-generated effect ID after checking it is non-empty.

evidenceId(value)

Brand a host- or capability-generated evidence ID after checking it is non-empty.

factType(value)

Validate and brand a fact type.

getKernelPromptDefinitions()

Return every distinct kernel instruction variant with immutable default content.

interactionId(value)

Brand a host- or capability-generated interaction ID after checking it is non-empty.

policyId(value)

Validate and brand a policy ID.

renderModelPrompt(definition, values, template)

Render bounded literal instructions with exact, one-pass substitution.

threadId(value)

Brand a host-generated thread ID after checking it is non-empty.

turnId(value)

Brand a host-generated turn ID after checking it is non-empty.

Interfaces ​

Interface

Description

AgendaItem

Unresolved work persisted between turns.

AgentDefinition

Public definition compiled into an immutable runtime agent.

AgentObjectiveDefinition

Host-defined objective whose completion is represented by one confirmed fact.

AgentProgressionDefinition

Complete declarative progression contract for one compiled agent.

AgentResponseFallbacks

Host-authored safe copy used only when a model cannot ground a control response.

Artifact

Structured artifact returned to a channel or UI.

CanonicalResponse

Capability-authored response copy with explicit evidence annotations.

CapabilityAutomation

Versioned input factory required for server-authorized capability activation.

CapabilityAutomationContext

Input available when a capability is invoked by trusted progression authority.

CapabilityDefinition

Executable operation independent of its infrastructure adapters.

CapabilityEventOptions

Metadata accepted when a capability exposes observable domain progress.

CapabilityEventPublisher

Turn-scoped publisher for sanitized capability and nested-workflow events.

CapabilityExecutionContext

Runtime services available to a capability implementation.

CapabilityGroupDefinition

Declarative set of related capabilities presented as one bounded interaction.

CapabilityGroupMember

One executable member exposed inside a capability group interaction.

CapabilityGuidance

Model-facing semantic guidance attached to one capability contract.

CapabilityIssue

Expected domain failure that is safe to expose through the response composer.

CapabilityReferenceRequirements

Model-reference requirements for capabilities that operate on active server-owned choices.

CapabilityTurnContext

Runtime services available to a capability implementation.

CompiledAgent

Immutable agent executable produced by IntentionKernel.compile().

CompletedWork

Authorized completed operation exposed to the response composer.

ContextReference

Context reference used to resolve a conversational expression.

Contradiction

Explicit contradiction found inside the turn or against confirmed facts.

ConversationMessage

Persisted conversation message.

Durability

Host-owned persistence, locking, deduplication and effect ledger contract.

DurableEffectIdentity

Stable identity supplied when coordinating an external effect.

DurableTurnResult

Result stored for duplicate turn replay.

DurableTurnScope

Scope held while one thread is serialized by a durability adapter.

EffectAuthority

Stable authority passed only to the external operation being coordinated.

EffectExecution

Completed effect value together with its durable receipt.

EffectReceipt

Durable evidence for an idempotent external effect.

EventSink

Sink for sanitized kernel events.

EvidenceRecord

Evidence that supports an interpreted request or business claim.

FactCandidate

Candidate fact returned by a capability before reducer validation.

FactDeclaration

Fact a capability promises to publish.

FactRecord

Confirmed fact persisted in the conversation checkpoint.

FactReference

Reference to a versioned fact.

FactRequirement

Fact required before a capability can execute.

IntentionBatch

Complete semantic interpretation of one user turn.

IntentionEvidence

Evidence extracted by the model for an interpreted intention.

IntentionKernel

Isolated runtime facade that compiles declarative agent manifests.

IntentionKernelErrorOptions

Constructor properties for IntentionKernelError.

IntentionRequest

One user objective interpreted from the current turn.

Interaction

A single user-facing information or confirmation request.

InteractionAnswer

Structured answer to the currently active interaction.

InteractionOption

Server-owned selectable option.

KernelCheckpoint

Minimal durable state owned by Intention Kernel.

KernelClock

Host-supplied clock used for durable timestamps.

KernelEvent

Observable event emitted by the kernel.

KernelIdGenerator

Host-supplied source of unique, observable runtime identifiers.

KernelLimits

Bounded execution settings. Zero is supported only for recentMessageLimit.

KernelOptions

Provider and host adapters used by one isolated kernel instance.

ModelCapabilityContract

Expanded capability contract supplied only after the operation was selected.

ModelCapabilitySummary

Compact capability entry used only to select relevant operations.

ModelGateway

Adapter contract for any structured-output model provider.

ModelGuidanceExample

One auditable example attached to contextual model guidance.

ModelGuidancePolicyContext

Canonical, read-only state available to a host-owned guidance selector.

ModelGuidancePolicyDefinition

Semantic guidance selected before capability routing; it never grants execution authority.

ModelGuidancePolicyMatch

Result of evaluating one host-owned contextual guidance selector.

ModelPromptDefinition

Stable versioned instruction contract, independent of provider and storage.

ModelPromptReference

Exact instruction definition and execution values for one model request.

ModelPromptResolver

Synchronous instance-scoped resolver; storage loading belongs to the host.

ModelRequest

Provider-neutral structured model request.

ModelResult

Validated provider response before kernel schema validation.

ModelUsage

Provider metadata returned for observability and cost accounting.

PolicyDefinition

Pure extension point for host-owned business constraints.

ProgressionObjectiveState

Durable status of the configured primary objective.

ProgressionOccurrence

Durable fact-bound occurrence of one progression rule.

ProgressionRuleDefinition

Fact-triggered target made available by the host application.

ProgressionState

Kernel-owned progression state persisted with the conversation checkpoint.

ResolvedModelPrompt

Pinned host revision resolved from an already loaded snapshot.

ResponseBrief

Port-free, evidence-bearing input for response composition.

ResponseClaim

Evidence annotation for one exact factual span in the assistant message.

ResponseDecision

Validated semantic meaning of the current turn supplied to response composition.

RuntimeSchema

Vendor-neutral runtime schema used at every trust boundary.

RunTurnInput

Public input for one compiled-agent turn.

SchemaDefinition

Input accepted by defineSchema().

SelectedModelGuidancePolicy

Model-visible projection of one contextual guidance policy selected by the host.

TurnResponse

Validated response returned by a compiled agent.

TurnResult

Public result committed exactly once for one turn.

TurnSelection

Host-verified answer produced by a clicked interaction control.

ValidationIssue

Normalized schema issue independent of the validation vendor.

Variables ​

Variable

Description

VERSION

Package version for runtime diagnostics; verified against the installed artifact during packaging.

Type Aliases ​

Type Alias

Description

AgendaItemId

Stable agenda item identifier.

AgentId

Stable agent identifier.

BrandedId

Nominal string used to keep unrelated kernel identifiers distinct at compile time.

CapabilityId

Stable capability identifier such as product.search.

CapabilityResult

Result returned by a capability.

EffectId

Stable effect identifier.

EffectStatus

Durable lifecycle of an external mutation.

ErrorContext

JSON-safe context attached to a public kernel error.

EvidenceId

Stable evidence identifier.

FactModelVisibility

Controls how a persisted fact is exposed to model tasks.

FactType

Stable fact type such as product.candidates.

IntentionId

Stable intention identifier.

InteractionId

Stable interaction identifier.

JsonSchema

JSON Schema representation accepted by model adapters.

LifecycleAction

Kernel-owned lifecycle request that never invokes a business capability.

ModelCapability

Task-specific capability projection supplied to a model gateway.

PolicyDecision

Decision returned by a pure policy.

PolicyId

Stable policy identifier.

StepId

Stable plan step identifier.

ThreadId

Stable thread identifier supplied by the host.

TurnId

Stable turn identifier supplied by the host.

ValidationResult

Result of validating untrusted data.