Skip to content

cendor-sdk 1.1.0

Choose a tag to compare

@github-actions github-actions released this 05 Jul 21:24

Added

  • Live progress hookrun(agent, input, on_step=cb) (and run.aio) calls cb(step) with each
    Step live as the run advances, complementing the post-hoc Result.steps. Works for single-
    and multi-agent runs (each Step carries its agent's name); a raised callback never breaks a run.
  • Opt-in prompt cachingAgent(cache=True) enables explicit provider prompt caching. For
    Anthropic it puts a cache_control breakpoint on the system prompt + tool schema (the stable
    prefix); cache-read/write tokens flow through cendor-core's usage extraction + pricing, so
    Result.usage/cost reflect the savings. A no-op for providers that cache automatically (OpenAI).
  • Multi-agent streamingrun.stream([...]) / run.astream([...]) now stream a handoff run
    (previously raised TypeError): events from each active agent, switching on a transfer_to_<peer>
    call, with one terminal RunComplete carrying the aggregate Result.
  • Live OTel spanscendor.sdk.otel.live_spans() context manager emits gen_ai spans as a run
    progresses (the streaming counterpart to the post-hoc span_tree()): a root agent.run span
    brackets the block and a child chat/execute_tool span is emitted as each call completes (start
    backdated by latency_ms for accurate duration). No-op without OpenTelemetry.
  • __version__ is now derived from installed package metadata (single source of truth: pyproject).