Agently 4.1.4.5 Release Notes

July 30, 2026 · View on GitHub

Agently 4.1.4.5 strengthens two runtime boundaries without changing their semantic owners:

  • AgentExecution can opt into lossless continuation when a direct ModelRequest ends with an observed length or incomplete terminal;
  • TriggerFlowExecution now uses Agently-Stage as the direct owner of its process-local managed tasks instead of reproducing a second task scope.

Opt-in long-output continuation

Call .ensure_long_output() on an unstarted direct AgentExecution when the business result must survive a provider response-window boundary:

result = (
    agent
    .input({"topic": "runtime ownership"})
    .instruct("Write the complete technical report.")
    .ensure_long_output()
    .get_result()
)

The first request keeps its original prompt and output contract. Continuation starts only after an observed provider/parser terminal explicitly reports length or incomplete output. Accepted text or structured units are committed append-only, stored through TaskWorkspace, read back, and validated against the original output contract before delivery.

This policy is disabled by default. It supports plain text and declared JSON output contracts and cannot be combined with an explicit AgentTask strategy. Ordinary successful responses remain single-request executions.

See Output Control and examples/basic/ensure_long_output.py.

Stage-backed TriggerFlow task ownership

Agently now requires agently-stage >=0.3.5,<0.4.0.

Each TriggerFlowExecution directly owns one real Stage:

  • execution-created caller-loop tasks enter through Stage.create_task(...);
  • genuinely pre-existing tasks enter through Stage.adopt(...);
  • Stage is the single live task/origin inventory and settlement owner;
  • TriggerFlow retains workflow failure policy, one close deadline, RuntimeEvent projection, and close snapshots.

The former private StageManagedTaskScope adapter has been deleted. This is not a public Stage API exposure through Agently: EventCenter, SignalNet, TriggerFlow, RuntimeEvent, and AgentExecution keep their existing semantic ownership.

Hidden runtime-stream executions now close and settle explicitly after stream consumption, preventing an idle monitor from surviving the caller loop. EventCenter keeps its native background-task mechanism because replacing that hot path did not justify its measured overhead.

Sync/async compatibility

Agently's internal call-shape bridges use Agently-Stage StageCallBridge. FunctionShifter remains importable as a deprecated compatibility facade and delegates to the same bridge; new framework code should not use it as a task lifecycle owner.

Package version inspection known issue

4.1.4.5 mistakenly exposed the non-standard agently.version and Agently.version attributes. Do not depend on them. The 4.1.4.6 development line removes those attributes and exposes only the standard spelling:

import agently
from agently import Agently

assert agently.__version__ == "4.1.4.6"
assert Agently.__version__ == agently.__version__

Performance characterization

The Stage-native TriggerFlow candidate was compared with the previous private adapter in two reverse-order local runs, with 18 recorded samples per variant:

WorkloadCandidate delta
Managed task create and settlement+4.74% (about +0.61 µs/task)
Cancellation settlement-3.08%
Finite TriggerFlow execution-1.34%
TriggerFlow event fan-out+0.29%
Peak traced task memory0.00%

No run emitted a pending-task, unconsumed-exception, or lifecycle warning. These numbers demonstrate bounded local overhead; they do not claim that Stage makes provider-bound model requests faster.

Core changes

AreaWhat changedRecommended usageCompatibility / riskEvidence
Direct long outputAdded opt-in, append-only continuation after an observed length/incomplete terminalCall .ensure_long_output() before starting a direct AgentExecutionAdditive and disabled by default; not compatible with explicit AgentTask strategyDeterministic protocol suite, real DeepSeek structured run, public example
TriggerFlow task lifecycleA real Agently-Stage 0.3.5 instance directly owns execution-managed local tasksKeep using existing TriggerFlow execution APIs; no Stage object is exposed publicly by AgentlyInternal owner change with bounded measured overhead; EventCenter remains nativeStage ownership/settlement tests, full suite, performance A/B
Sync/async bridgeInternal bridges delegate to StageCallBridge; FunctionShifter remains a deprecated facadeNew framework code should use Stage bridges directlyExisting imports remain availableFunctionShifter compatibility tests
Package metadata4.1.4.5 mistakenly added agently.version and Agently.version; the 4.1.4.6 development line replaces them with __version__Use agently.__version__ or Agently.__version__ on 4.1.4.6+Breaking correction; the mistaken attributes are not retainedSource/package metadata consistency and absence tests

Compatibility

  • Python: >=3.10
  • Agently-Stage: >=0.3.5,<0.4.0
  • Recommended Agently DevTools: >=0.1.10,<0.2.0
  • Skills authoring protocol: agently-skills.authoring.v2
  • DevTools observation protocol: agently-devtools.observation-runtime.v1

The 4.1.4.4 ModelRequest, TriggerFlow snapshot, RecordStore retention, and companion protocol contracts remain supported.