agent library

Public entry point for the Syni agent layer — install lifecycle, model management, persona binding, and chat orchestration over the local runtime.

The host SDK (synheart_core) consumes this and wraps it with the four-authority gate + HSI context builder, re-exposing it as Synheart.syni. App developers should depend on synheart_core, not package:syni directly.

Classes

SyniAgent
Orchestrates an installed, persona-bound Syni: install lifecycle, model management, and chat over the local runtime worker isolate.
SyniChatDelta
An incremental token chunk emitted during generation.
SyniChatEvent
One event in a streaming chat response. Discriminated union over incremental deltas and the final structured response.
SyniChatFinal
The final parsed response. Always emitted exactly once at the end of a successful stream.
SyniChatResponse
A completed Syni response.
SyniCloudConfig
SyniCloudModel
A server-side model — runs via syni-service. serviceModelId is the id the service routes to internally; the client never needs the provider/model details.
SyniInstalled
Successfully installed. The runtime engine has loaded the model and is ready to receive chat calls.
SyniInstaller
Downloads + verifies a model (GGUF + its tokenizer.json sibling). Emits progress via the supplied callback. Returns the final on-disk model path.
SyniInstallFailed
Install failed. reason is human-readable; cause is the underlying exception when available.
SyniInstalling
Install in progress. progress is in [0.0, 1.0]; stage explains which sub-step is running.
SyniInstallState
SyniLocalModel
An on-device model — runs via the candle runtime. spec is what SyniAgent.install needs to download + load it.
SyniModelCatalog
Fetches + caches the Syni model catalog from syni-service GET /v1/models.
SyniModelOption
One entry in the Syni model catalog — a local (on-device GGUF) or cloud (server-side) model. The two are peers: the client's router picks among them using optimizedFor tags, requires constraints, and the active execution mode.
SyniModels
V1 model catalog. Replace with a server-signed manifest fetched from synheart-cloud once that exists. Pinned SHA-256 values come from the HuggingFace LFS x-linked-etag header, which is the underlying file's SHA-256 for LFS-stored objects.
SyniModelSpec
SyniNotInstalled
No model downloaded, no persona bound. Default state.
SyniPersona
SyniSpecPersona
Loads a SyniPersona from a bundled syni-spec JSON asset.

Enums

SyniExecutionMode
Where a chat call should run.
SyniInstallStage
SyniResponseKind
Which EngineResponse variant the runtime returned.