- _declarative_base.py: continuation branch was writing 'Inputs.input' via
state.set, which routes to the Custom namespace and never updates the
PowerFx-visible Workflow.Inputs.input. Update state_data['Inputs'] in
place via get_state_data / set_state_data so =Workflow.Inputs.input and
=inputs.input see the new turn's user text on continuation.
- _declarative_base.py: refresh docstring to clarify that on a list[Message]
trigger, Conversation.messages excludes the current user message at the
start of the turn (agent executors append it before invoking the inner
agent).
- _responses.py: when previous_response_id is supplied (no conversation_id),
the prior checkpoint lives under <storage>/<previous_response_id> but new
checkpoints must land under <storage>/<current_response_id> for the next
turn to find them. Hold onto restore_storage from the get_latest lookup
and pass it to the restore-only run; pass write_storage (current id) to
the message-delivery run and to checkpoint cleanup.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the prior 'combined message + checkpoint_id in one run()' approach
with a cleaner default: Workflow.run no longer wipes shared state or runner-
context messages between calls. Iteration counting and per-run kwargs still
reset on a fresh-message run; checkpoint and responses runs are continuations
that preserve everything.
This lets a WorkflowAgent be invoked repeatedly on the same instance and
maintain multi-turn context (e.g. accumulated Conversation.messages) without
asking developers to opt in. Hosted-agent multi-turn pattern becomes two
explicit calls: restore-from-checkpoint (drive to idle), then run-with-message.
Key changes:
- _workflow.py: drop _state.clear() and reset_for_new_run() from run().
Reset iteration count and run kwargs on fresh-message runs only.
Restore 'Cannot provide both message and checkpoint_id' validation.
Add async guard: fresh-message run with un-drained pending executor
messages from a prior run is invalid.
- _runner.py: clear _state before import_state in restore_from_checkpoint
so restore is authoritative (import_state merges, not replaces).
- _agent.py: revert checkpoint branch to restore-only (no message forward).
- _responses.py (foundry_hosting): two-call host pattern - restore checkpoint
silently, then run with new user input.
- tests: state-preservation is the new default; rebuild Workflow for clean slate.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allow Workflow.run(message=..., checkpoint_id=...) so callers can restore
prior workflow state from a checkpoint AND deliver a new message to the
start executor in a single call. The existing reset_context logic
already preserves shared state when checkpoint_id is set, so this gives
us 'fresh start executor invocation with prior state intact' - exactly
what hosted multi-turn declarative workflows need.
- _workflow.py: drop the message+checkpoint_id mutual exclusion and
update _execute_with_message_or_checkpoint to do both (restore then
execute) when both are provided.
- _agent.py: in _run_core's checkpoint branch, also forward
input_messages so WorkflowAgent.run(messages, checkpoint_id=...) works
end-to-end. Falls back to the legacy 'restore only' behavior when
messages are absent.
- _declarative_base.py: detect continuation in _ensure_state_initialized
by checking whether DECLARATIVE_STATE_KEY already exists in shared
state; if so, refresh inputs/LastMessage* and append non-user trigger
messages instead of calling state.initialize() (which would wipe
Conversation/Local/System).
- foundry_hosting/_responses.py: collapse the host's two-call pattern
(restore-only, then fresh run) into a single combined call now that
the underlying APIs support it.
- tests: drop the assertion that combined message+checkpoint_id raises.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
_handle_inner_workflow only forwarded the latest user turn to WorkflowAgent.run, even though _handle_inner_agent already prepends history fetched from Foundry storage to the messages it sends a regular agent. Declarative workflows reset Conversation.messages on every run (state.initialize), so checkpoint replay alone does not give them prior turns - the host has to pass them in, the same way it does for non-workflow agents. Mirror that contract: fetch context.get_history() and pass [*history, *input_messages] to the workflow agent.
* Bump Python package versions for 1.2.0 release
Released tier bumps 1.1.1 -> 1.2.0 (core, openai, foundry, root) to
reflect additive public APIs landed since 1.1.0: functional workflow API
(#4238) and FunctionTool SKIP_PARSING sentinel (#5424). All beta packages
stamped 1.0.0b260424, alpha packages 1.0.0a260424. All 26 non-core
agent-framework-core floors raised to >=1.2.0,<2. CHANGELOG consolidates
the never-tagged 1.1.1 entries with the post-merge additions into [1.2.0].
* Update CHANGELOG footer links for 1.2.0
Advance [Unreleased] comparison base from python-1.1.0 to python-1.2.0
and add a [1.2.0] reference link comparing python-1.1.0...python-1.2.0
so the heading links resolve correctly.
* Fix CHANGELOG: restore [1.1.1] section and add proper [1.2.0]
Previous commit incorrectly renamed the [1.1.1] header to [1.2.0], which
wiped the historical 1.1.1 entries and wrongly attributed them to 1.2.0.
This restores [1.1.1] to its origin/main content and adds a new [1.2.0]
section above containing only the commits in python-1.1.1..HEAD:
- #4238 functional workflow API
- #5142 GitHub Copilot OpenTelemetry
- #2403 A2A bridge support
- #5070 oauth_consent_request events in Foundry clients
- #5447 FoundryAgent hosted agent sessions
- #5459 hosting server dependency upgrade + types
- #5389 AG-UI reasoning/multimodal parsing fix
- #5440 stop [TOOLBOXES] warning spam
- #5455 user agent prefix fix
Also corrects the [1.2.0] compare base to python-1.1.1 (not 1.1.0) and
adds the missing [1.1.1] reference link.
* fixes to FoundryAgent to connect to new hosted agents
Co-authored-by: Copilot <copilot@github.com>
* fix mypy
Co-authored-by: Copilot <copilot@github.com>
* Python: remove Foundry service session helpers
Remove the public hosted-agent service session CRUD helpers from FoundryAgent and drop the related feature-stage inventory entry.
Update the hosted-agent sample to create and delete service sessions directly through the preview AIProjectClient APIs, and tighten a few test harnesses surfaced by full workspace validation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix from merge
* fix hosted env detection
Co-authored-by: Copilot <copilot@github.com>
* reverted sample update
* fix tests and code
Co-authored-by: Copilot <copilot@github.com>
* remove aenter
* skipping some tests
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Eduard van Valkenburg
·
2026-04-24 09:25:03 +00:00
* Bump Python version for a release.
* Revert lockstep bumps on unchanged connectors
Per PR review: only connectors that changed (or whose published metadata
changed) should get new versions. Keeps released tier at 1.1.1, a2a/ag-ui
at 1.0.0b260422, foundry-hosting at 1.0.0a260422; reverts the 19 unchanged
betas and 2 unchanged alphas to 1.0.0b260421/1.0.0a260421. Reverts all 26
non-core agent-framework-core floors to >=1.1.0,<2 since no connector
actually depends on a 1.1.1 API or bug fix.
* Restore lockstep prerelease bumps and raise core floors to >=1.1.1
Reverses the lean-revert: all beta packages stamped 1.0.0b260423 and alpha
packages stamped 1.0.0a260423 (Asia date, matching release cut time). All
26 non-core packages raise agent-framework-core lower bound from >=1.1.0,<2
to >=1.1.1,<2 to signal the validated cohort for this release. CHANGELOG
date updated to 2026-04-23.
* Python: Wrapper + Samples 1st (#5177)
* Experiment
* Update dependency and add non streaming
* Add more samples
* Rename samples
* Add invocations
* Comments 1
* Comments 2
* Comments 3
* Improve README
* Add local shell sample
* WIP: Add eval and memory samples
* Update user agent prefix
* Update user agent prefix doc
* Update dependency (#5215)
* Add tests and more content types (#5235)
* Add tests
* fix tests and sample
* Fix formatting
* Remove function approval contents
* Python: Refine samples and upgrade packages (#5261)
* Refine samples and upgrade pacakges
* Upgrade to a new package that fixes a bug
* Update model env var
* Move samples (#5281)
* Python: Upgrade agentserver packages (#5284)
* Upgrade agentserver packages
* Fix new types
* Python: Add special handling for workflows (#5298)
* Add special handling for workflows
* Address comments
* Improve samples (#5372)
* Python: Add more types (#5378)
* Add more type supports
* Upgrade packages
* Remove TODOs in README
* Fix README
* Comments and mypy
* User agent scoped
* Fix README
* Fix pre commit
* Fix pre commit 2
* Fix pre commit 3
* Fix pre commit 4
* Fix pre commit 5
* Fix pre commit 6
* Add azure-monitor-opentelemetry to dev deps
Fixes Samples & Markdown CI failure. The PR's new transitive dep on
azure-monitor-opentelemetry-exporter (via azure-ai-agentserver-core) makes
pyright resolve the azure.monitor.opentelemetry namespace, flipping the
check_md_code_blocks diagnostic for `configure_azure_monitor` from
reportMissingImports (filtered) to reportAttributeAccessIssue (not filtered).
Installing the umbrella azure-monitor-opentelemetry package in dev makes
pyright resolve the symbol correctly, matching the install guidance the
observability README already gives users.
---------
Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>