AI Link Request Lifecycle (System Perspective)

This page describes how an AI inference request is processed inside the AI Link system after it has been submitted by a partner application. It focuses on execution order, state transitions, and settlement semantics, rather than partner-side integration steps.

The goal of this page is to explain what the system guarantees and how it behaves, so partners and technical stakeholders can reason about reliability, cost, and failure modes.


Lifecycle Overview

Once a request is accepted by AI Link, it progresses through a fixed sequence of system states:

  1. Request acceptance and recording

  2. Asynchronous processing and execution

  3. Result finalization

  4. Post-execution settlement

  5. Result availability

Each stage is designed to be non-blocking, fault-tolerant, and auditable.


1. Request Acceptance and Recording

After receiving a valid request, AI Link performs lightweight validation and records the request on-chain. This record serves as a verifiable reference for execution and settlement.

Key properties:

  • Recording is asynchronous and does not block request acceptance

  • User funds are not locked at this stage

  • The request is assigned a unique identifier used throughout its lifecycle

Once recorded, the request enters the processing pipeline.


2. Asynchronous Processing

AI Link executes inference requests asynchronously on the Nesa network. The originating chain and application do not need to remain active or connected during this phase.

System behavior:

  • Requests are processed independently and concurrently

  • Execution does not depend on synchronous confirmation from external chains

  • Temporary network or execution delays do not invalidate the request

The request transitions to a processing state while inference is underway.


3. Secure Execution and Result Generation

During execution, the system prepares inputs, performs AI inference on the Nesa network, and generates the result payload.

Design considerations:

  • Inputs are handled in a protected form throughout execution

  • Execution is isolated from the originating chain

  • Inference cost and resource usage are measured precisely

Upon successful completion, the system produces an output artifact and transitions the request to a completed state.


4. Post-execution Settlement

Settlement occurs after inference completes and is based on actual execution costs rather than estimates.

Settlement semantics:

  • Fees are calculated from real gas usage and inference costs

  • Settlement is triggered only after execution finishes

  • Funds are deducted from the user’s existing deposit balance

  • No per-request locking is required

This ensures accurate accounting while preserving responsiveness and capital efficiency.


5. Result Availability and Retrieval

Once the settlement is finalized, the results are made available for retrieval. The system guarantees that:

  • Results correspond to a recorded and settled request

  • Each request resolves to a terminal state: completed or failed

  • Results remain available for a bounded retrieval window

Applications can query request status at any time to determine progress or completion.


Failure Handling and Guarantees

AI Link is designed to handle failures explicitly and transparently.

  • If execution fails, the request transitions to a failed state

  • Failed requests do not produce partial or ambiguous results

  • Settlement only occurs for successfully completed executions

  • Request state is always queryable

This makes request handling predictable and safe to integrate into higher-level application logic.


Summary

The AI Link request lifecycle is designed around asynchronous execution, post-execution settlement, and explicit state transitions. By separating request acceptance, execution, and settlement, the system ensures reliability and transparency without blocking application workflows or requiring tight coupling between chains.

This lifecycle allows partners to hand off AI execution to Nesa with confidence, knowing exactly how requests are processed and resolved.

Last updated