Skip to content

cayu.evals.trajectory

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

from cayu.evals import final_output_text

Return the text of the last assistant message in transcript.

final_output_text(transcript: Iterable[Message]) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import SessionTrajectoryError

Typed fail-closed error from trajectory_from_session.

Bases: RuntimeError.

SessionTrajectoryError.__init__(code: SessionTrajectoryErrorCode, *, session_id: str, parent_session_id: str | None=None, terminal_code: TerminalSessionEvidenceErrorCode | None=None, limit: int | None=None, observed: int | None=None) -> None

Release source · Runtime guarantees · Capability guides

from cayu.evals import trajectory_from_session

Reconstruct one exact, bounded production session tree as a Trajectory.

The operation reads durable session state only. It never runs application code, providers, tools, environments, hooks, recovery, or writes. Children are admitted only when their first durable session.started or session.forked event is no later than their parent’s terminal event. Every admitted node must independently satisfy the completed/failed terminal-evidence contract.

async trajectory_from_session(app: CayuApp, session_id: str, *, bounds: SessionTrajectoryBounds | None=None) -> Trajectory

Release source · Runtime guarantees · Capability guides