Skip to main content

caesura-io-core

Analysis orchestration and conversation state for CaesuraO. Use caesura-io-openai for OpenAI applications.

pip install caesura-io-core

Set CAESURA_API_KEY:

from caesura_core import AnalysisContext, AnalyzeMessage, CaesuraConfig, CaesuraEngine, CustomerTurn

engine = CaesuraEngine(CaesuraConfig(mode="sync"))
try:
    conversation_id = engine.create_conversation(name="Example")
    state = engine.observe(
        conversation_id,
        [],
        context=AnalysisContext(
            stateless=conversation_id is None,
            turn=CustomerTurn("message-1", AnalyzeMessage("user", "I need help")),
        ),
    )
    if conversation_id is not None:
        state = engine.read_state(conversation_id)
    for recommendation in (state.recommendations if state is not None else []):
        print(recommendation.analysis)
finally:
    engine.close(raise_errors=False)

Creation returns None on ordinary continue-policy failure; explicit stateless observation in sync mode returns temporary guidance state. Background results are available through completion hooks and drain, with no cross-call guidance. Otherwise reuse the authoritative conversation ID and supply history explicitly. New customer turns need distinct message IDs; retries reuse the same ID. AsyncCaesuraEngine provides awaited equivalents.

The default mode="async" runs analysis in the background; mode="sync" waits. persist=True saves analyses and completed customer/agent dialogue through HTTP. Record application greetings explicitly with persist_messages; they do not trigger analysis.

Analyses may be JSON values or plain text. Preserve AnalyzeResult.analysis; credit usage is available separately. Use MemoryCaesuraStore for process-local guidance, or implement a persistent store with explicit get, set, clear, and clear_all.

See application integration for state, customer selection, persistence, lifecycle, and auditing; migration for upgrades; and runnable examples for local applications.

Licensed under Apache-2.0.

Metadata

Release files for caesura-io-core 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caesura-io-core 4.0.0
File Size Uploaded
caesura_io_core-4.0.0.tar.gz 62.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for caesura-io-core 4.0.0
File Interpreter ABI Platform
caesura_io_core-4.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 101.7 kB

Release files / caesura_io_core-4.0.0.tar.gz

Download URL caesura_io_core-4.0.0.tar.gz
Size 62.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a782b114e66fb6f56f44fd9d4cbaf57f2b24aaf37a6338ffa72b4c097b130b75
BLAKE2b-256 checksum
How to use checksums
ac45ec140c8bf7a2c4342a07d9db3552a83a45134478175aad51ee61004674f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / caesura_io_core-4.0.0-py3-none-any.whl

Download URL caesura_io_core-4.0.0-py3-none-any.whl
Size 39.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9c21c8c4a2ff69dfa6187b082f56abbbd236662742408e119d8d88e43c775e7
BLAKE2b-256 checksum
How to use checksums
2feeca009817a3fc0f9525d884ac15fe9e86db24210643fc983aaf7d97881401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page