Skip to content

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 22 Jul 10:27
0cd7141

Added

  • Durable step persistence — a model-backed, owner-scoped store for
    pydantic-ai-harness's StepPersistence capability. Pass
    AGUIServer(step_store=DefaultStepStore) (the constructor is the
    request -> StepStore factory — the harness protocol carries no request, so
    the store binds one and is built per run) and every run records an append-only
    event log, a (run_id, tool_call_id) tool-effect ledger, and a continuable
    snapshot at each provider-valid boundary, keyed on the AG-UI run_id. Four new
    models under django_ag_ui.contrib.store (StoredRun / StoredStepEvent /
    StoredSnapshot / StoredToolEffect, migration 0003) back
    DefaultStepStore, which structurally satisfies the harness StepStore
    protocol. Every row filters by the resolved owner, so a run_id from one user
    can't read another's runs; an anonymous request without ALLOW_ANONYMOUS
    degrades to no-op rather than aborting the run. Requires the [harness] extra.
    A custom backend is any request -> StepStore callable. See
    Durable step persistence.
  • Resume / fork endpoints — configuring a step_store also mounts owner-scoped
    resume/<run_id>/ and fork/<run_id>/ endpoints. Both seed a new run from a
    prior run's last continuable snapshot: the server loads it (a run_id from
    another owner is a clean 404), injects it as the run's message_history
    (AgentSession gained the seam; run_stream_native composes it ahead of the
    client's new turn), and records the new run with parent_run_id pointing back
    at the source — so the parent is never mutated. resume and fork are two
    names for one mechanism (the harness's continue_run / fork_run are
    data-identical). The web-component checkpoint UI rides a downstream release.