All docs
Docs/ API Reference/ lsdtools.integeragent reference
API Reference

lsdtools.integeragent reference

Generated public SDK reference for lsdtools.integeragent.

SDK distribution 1.0.0; API contract 1.0; generator 1.0.0.

Product source digest: 4ea39055732e8883c03ccfecf12af6ccebd2041a12ce1b843e4a769e200f5ef9.

Generated from declared public exports and source syntax. Signatures and annotations are declaration spellings; decorators, factories and annotations are never executed. Class members below are declared members; base classes remain explicit. Source docstrings describe their owning implementation; they do not grant app permissions.

text
Lazy public facade for LSD integer-agent deployment and inference.

Importing this module does not import NumPy, the private inference engine, a
gym, CUDA, a mine adapter, or the product runtime.

lsdtools.integeragent.Backend#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:18.

Python
Backend: TypeAlias
Python
Backend = Literal['cpu', 'cuda']

lsdtools.integeragent.Candidate#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:134.

lsdtools.integeragent.Candidate.action_id#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:135.

Python
action_id: int

lsdtools.integeragent.Candidate.features#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:136.

Python
features: tuple[int, ...]
Python
features = ()

lsdtools.integeragent.CandidateScore#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:292.

lsdtools.integeragent.CandidateScore.action_id#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:293.

Python
action_id: int

lsdtools.integeragent.CandidateScore.score#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:294.

Python
score: int | None

lsdtools.integeragent.CandidateScore.safe#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:295.

Python
safe: bool

lsdtools.integeragent.CandidateScore.grammar#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:296.

Python
grammar: bool

lsdtools.integeragent.CandidateScore.policy#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:297.

Python
policy: bool

lsdtools.integeragent.DecisionMode#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:19.

Python
DecisionMode: TypeAlias
Python
DecisionMode = Literal['manual', 'trained']

lsdtools.integeragent.DecisionProvenance#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:319.

lsdtools.integeragent.DecisionProvenance.service_version#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:320.

Python
service_version: str

lsdtools.integeragent.DecisionProvenance.mode#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:321.

Python
mode: DecisionMode

lsdtools.integeragent.DecisionProvenance.requested_backend#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:322.

Python
requested_backend: str

lsdtools.integeragent.DecisionProvenance.executed_backend#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:323.

Python
executed_backend: str

lsdtools.integeragent.DecisionProvenance.backend_name#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:324.

Python
backend_name: str | None

lsdtools.integeragent.DecisionProvenance.backend_device#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:325.

Python
backend_device: str | None

lsdtools.integeragent.DecisionProvenance.backend_conformance#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:326.

Python
backend_conformance: str | None

lsdtools.integeragent.DecisionProvenance.backend_source_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:327.

Python
backend_source_sha256: str | None

lsdtools.integeragent.DecisionProvenance.deployment_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:328.

Python
deployment_sha256: str | None

lsdtools.integeragent.DecisionProvenance.checkpoint_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:329.

Python
checkpoint_sha256: str | None

lsdtools.integeragent.DecisionProvenance.model_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:330.

Python
model_sha256: str | None

lsdtools.integeragent.DecisionProvenance.capability#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:331.

Python
capability: str

lsdtools.integeragent.DecisionProvenance.codec_id#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:332.

Python
codec_id: str

lsdtools.integeragent.DecisionProvenance.codec_version#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:333.

Python
codec_version: str

lsdtools.integeragent.DecisionProvenance.codec_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:334.

Python
codec_sha256: str

lsdtools.integeragent.DecisionProvenance.adapter_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:335.

Python
adapter_sha256: str

lsdtools.integeragent.DecisionProvenance.evidence_classification#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:336.

Python
evidence_classification: str | None

lsdtools.integeragent.DecisionProvenance.qualification_eligible#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:337.

Python
qualification_eligible: bool | None

lsdtools.integeragent.DecisionProvenance.source_receipt_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:338.

Python
source_receipt_sha256: str | None

lsdtools.integeragent.DecisionProvenance.representation#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:339.

Python
representation: str

lsdtools.integeragent.DecisionRequest#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:153.

lsdtools.integeragent.DecisionRequest.mode#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:154.

Python
mode: DecisionMode

lsdtools.integeragent.DecisionRequest.capability#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:155.

Python
capability: str

lsdtools.integeragent.DecisionRequest.codec_id#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:156.

Python
codec_id: str

lsdtools.integeragent.DecisionRequest.codec_version#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:157.

Python
codec_version: str

lsdtools.integeragent.DecisionRequest.codec_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:158.

Python
codec_sha256: str

lsdtools.integeragent.DecisionRequest.adapter_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:159.

Python
adapter_sha256: str

lsdtools.integeragent.DecisionRequest.tokens#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:160.

Python
tokens: tuple[int, ...]

lsdtools.integeragent.DecisionRequest.candidates#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:161.

Python
candidates: tuple[Candidate, ...]

lsdtools.integeragent.DecisionRequest.safe_actions#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:162.

Python
safe_actions: tuple[int, ...]

lsdtools.integeragent.DecisionRequest.grammar_actions#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:163.

Python
grammar_actions: tuple[int, ...]

lsdtools.integeragent.DecisionRequest.policy_actions#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:164.

Python
policy_actions: tuple[int, ...]

lsdtools.integeragent.DecisionRequest.offered_action#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:165.

Python
offered_action: int | None
Python
offered_action = None

lsdtools.integeragent.DecisionResult#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:434.

lsdtools.integeragent.DecisionResult.action_id#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:435.

Python
action_id: int

lsdtools.integeragent.DecisionResult.scores#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:436.

Python
scores: tuple[CandidateScore, ...]

lsdtools.integeragent.DecisionResult.frame_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:437.

Python
frame_sha256: str

lsdtools.integeragent.DecisionResult.provenance#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:438.

Python
provenance: DecisionProvenance

lsdtools.integeragent.DeploymentArtifact#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:275.

lsdtools.integeragent.DeploymentArtifact.data#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:276.

Python
data: bytes

lsdtools.integeragent.DeploymentArtifact.sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:277.

Python
sha256: str

lsdtools.integeragent.DeploymentArtifact.manifest#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:278.

Python
manifest: DeploymentManifest

lsdtools.integeragent.DeploymentManifest#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:256.

lsdtools.integeragent.DeploymentManifest.capability#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:257.

Python
capability: str

lsdtools.integeragent.DeploymentManifest.codec_id#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:258.

Python
codec_id: str

lsdtools.integeragent.DeploymentManifest.codec_version#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:259.

Python
codec_version: str

lsdtools.integeragent.DeploymentManifest.codec_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:260.

Python
codec_sha256: str

lsdtools.integeragent.DeploymentManifest.adapter_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:261.

Python
adapter_sha256: str

lsdtools.integeragent.DeploymentManifest.separator_token#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:262.

Python
separator_token: int

lsdtools.integeragent.DeploymentManifest.score_token#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:263.

Python
score_token: int

lsdtools.integeragent.DeploymentManifest.checkpoint_size_bytes#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:264.

Python
checkpoint_size_bytes: int

lsdtools.integeragent.DeploymentManifest.checkpoint_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:265.

Python
checkpoint_sha256: str

lsdtools.integeragent.DeploymentManifest.model_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:266.

Python
model_sha256: str

lsdtools.integeragent.DeploymentManifest.evidence_classification#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:267.

Python
evidence_classification: str

lsdtools.integeragent.DeploymentManifest.qualification_eligible#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:268.

Python
qualification_eligible: bool

lsdtools.integeragent.DeploymentManifest.source_receipt_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:269.

Python
source_receipt_sha256: str

lsdtools.integeragent.DeploymentManifest.engine_version#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:270.

Python
engine_version: str

lsdtools.integeragent.DeploymentManifest.engine_wheel_sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:271.

Python
engine_wheel_sha256: str

lsdtools.integeragent.DeploymentRef#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:246.

lsdtools.integeragent.DeploymentRef.path#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:247.

Python
path: str

lsdtools.integeragent.DeploymentRef.sha256#

Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:248.

Python
sha256: str

lsdtools.integeragent.IntegerAgentBackendUnavailable#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:44.

Source docstring:

text
The explicitly requested backend cannot execute the deployment.

Declared bases: RuntimeError.

lsdtools.integeragent.IntegerAgentContractError#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:36.

Source docstring:

text
A public decision request violates the integer-agent contract.

Declared bases: ValueError.

lsdtools.integeragent.IntegerAgentDeploymentError#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:40.

Source docstring:

text
A deployment is malformed, mismatched, unanchored, or tampered with.

Declared bases: RuntimeError.

lsdtools.integeragent.IntegerAgentInferenceError#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:48.

Source docstring:

text
A trained model rejected or failed a valid inference request.

Declared bases: RuntimeError.

lsdtools.integeragent.IntegerAgentServiceUnavailable#

Kind: class. Source: sdk/src/lsdtools/integeragent.py:32.

Source docstring:

text
The installed product lacks a compatible integer-agent service.

Declared bases: RuntimeError.

lsdtools.integeragent.MAX_BATCH_CANDIDATES#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:22.

Python
MAX_BATCH_CANDIDATES = 65536

lsdtools.integeragent.MAX_BATCH_REQUESTS#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:21.

Python
MAX_BATCH_REQUESTS = 256

lsdtools.integeragent.MAX_CANDIDATES_PER_REQUEST#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:23.

Python
MAX_CANDIDATES_PER_REQUEST = 4096

lsdtools.integeragent.MAX_CANDIDATE_FEATURES#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:25.

Python
MAX_CANDIDATE_FEATURES = 4096

lsdtools.integeragent.MAX_CONTEXT_TOKENS#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:24.

Python
MAX_CONTEXT_TOKENS = 65536

lsdtools.integeragent.MAX_REPRESENTATION_TOKEN_CELLS#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:26.

Python
MAX_REPRESENTATION_TOKEN_CELLS = 16777216

lsdtools.integeragent.SERVICE_API_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/integeragent.py:20.

Python
SERVICE_API_CONTRACT = 'lsd-integeragent-service-v1'

lsdtools.integeragent.build_deployment#

Kind: function. Source: sdk/src/lsdtools/integeragent.py:656.

Python
build_deployment(checkpoint: bytes, *, source_receipt: bytes, capability: str, codec_id: str, codec_version: str, codec_sha256: str, adapter_sha256: str, separator_token: int, score_token: int, evidence_classification: str, qualification_eligible: bool, source_receipt_sha256: str, expected_checkpoint_sha256: str | None=None, expected_model_sha256: str | None=None) -> DeploymentArtifact
Python
adapter_sha256: str
capability: str
checkpoint: bytes
codec_id: str
codec_sha256: str
codec_version: str
evidence_classification: str
expected_checkpoint_sha256: str | None
expected_model_sha256: str | None
qualification_eligible: bool
score_token: int
separator_token: int
source_receipt: bytes
source_receipt_sha256: str

lsdtools.integeragent.capabilities#

Kind: function. Source: sdk/src/lsdtools/integeragent.py:811.

Python
capabilities() -> dict[str, object]

lsdtools.integeragent.decide#

Kind: function. Source: sdk/src/lsdtools/integeragent.py:731.

Python
decide(request: DecisionRequest, *, deployment: DeploymentRef | DeploymentArtifact | bytes | None=None, backend: Backend='cpu', device: int=0) -> DecisionResult
Python
backend: Backend
deployment: DeploymentRef | DeploymentArtifact | bytes | None
device: int
request: DecisionRequest

lsdtools.integeragent.decide_many#

Kind: function. Source: sdk/src/lsdtools/integeragent.py:755.

Python
decide_many(requests: Sequence[DecisionRequest], *, deployment: DeploymentRef | DeploymentArtifact | bytes | None=None, backend: Backend='cpu', device: int=0) -> tuple[DecisionResult, ...]
Python
backend: Backend
deployment: DeploymentRef | DeploymentArtifact | bytes | None
device: int
requests: Sequence[DecisionRequest]

lsdtools.integeragent.load_deployment#

Kind: function. Source: sdk/src/lsdtools/integeragent.py:696.

Python
load_deployment(reference: DeploymentRef) -> DeploymentArtifact
Python
reference: DeploymentRef

lsdtools.integeragent.save_deployment#

Kind: function. Source: sdk/src/lsdtools/integeragent.py:705.

Python
save_deployment(path: str, artifact: DeploymentArtifact, *, overwrite: bool=False) -> DeploymentRef
Python
artifact: DeploymentArtifact
overwrite: bool
path: str
By LSD Team · Last updated Sep 09, 2026 Ask a question View as Markdown
Type to search every doc, guide, and tutorial.
↑↓ navigate openesc close