Skip to main content

Advanced integrations

Most applications should use the AI SDK middleware or OpenAI wrapper with the default HTTP transport.

Custom storage and application hooks​

Use a durable CaesuraStore when guidance must survive restarts. Stores may be synchronous or asynchronous and must persist mutations through set(). Shared deployments also need application-owned conversation coordination.

Use persistMessages for transcripts, persistAnalysis for required result storage, and persistProviderRequest for required finalized-request storage. These hooks are independent of HTTP persist; observational callbacks should not be used as required storage.

A different model framework​

@caesura-io/core exports createCaesuraEngine, MemoryCaesuraStore, and the analysis/rendering types and helpers. Use the core engine directly only when an existing adapter cannot wrap your framework. Read state with await engine.getState(conversationId), and use engine lifecycle methods to flush, clear, or shut down work.