Repository navigation
Python: Hosted Agents: Clarification on code execution, artifact retrieval, persistence, and platform responsibility boundaries #9659
Description
Background
I reviewed issue #7916 and PR #9055. My understanding is that #9055 resolves propagation of Code Interpreter generated-file metadata into Hosted Agent responses, allowing clients to discover generated files via container_file_citation and then download them through container APIs.
What appears solved
Code Interpreter -> generated file -> MCP metadata -> Hosted Agent response -> container_file_citation -> client discovers file -> client downloads file.
What I am trying to understand
I am evaluating whether Hosted Agents are intended to be the primary orchestration layer for workflows where the model generates executable code, artifacts are produced, and host applications must persist those artifacts outside the agent runtime.
Typical flow:
Hosted Agent -> model generates Python -> isolated execution -> files generated -> host retrieves files -> host persists artifacts -> host manages drafts, versions, lineage and lifecycle.
Questions
-
Is Code Interpreter intended to be the recommended execution mechanism for model-generated Python workflows that produce durable artifacts?
-
Is the expected pattern: Hosted Agent -> discover file references -> application downloads files -> application persists artifacts, or is there a roadmap for first-class artifact persistence and lifecycle APIs within Hosted Agents?
-
Beyond file citations, are there any recommended Hosted Agent patterns for artifact persistence, storage integration, execution-result callbacks, or lifecycle hooks?
-
For multi-megabyte artifacts, is the intended architecture to retrieve files through container APIs and upload them directly to external storage rather than routing file contents through model or tool outputs?
-
Can the team clarify the intended responsibility boundary between Hosted Agents and application hosts for execution governance, storage, versioning, artifact lifecycle management, persistence, approval workflows, and auditability?
Additional Context
The use case requires: arbitrary Python generation, isolated execution, programmatic retrieval of generated files, governed persistence of generated artifacts, lifecycle management of drafts and final outputs, and durable storage of large generated artifacts. PR #9055 appears to address artifact discovery through container_file_citation, but it is unclear whether the intended architecture is for Hosted Agents to act as a complete orchestration platform or whether execution governance, persistence, lifecycle management, and storage remain application responsibilities.
Clarification Requested
Would the Agent Framework team recommend the following architecture:
Hosted Agent -> reasoning and orchestration
Code Interpreter -> execution
Application Host -> artifact download, persistence, versioning, lifecycle, storage governance
Or are there planned first-class capabilities for artifact persistence, artifact lifecycle, execution callbacks, or storage integration within Hosted Agents?
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
[-]Hosted Agents: Clarification on code execution, artifact retrieval, persistence, and platform responsibility boundaries[/-][+]Python: Hosted Agents: Clarification on code execution, artifact retrieval, persistence, and platform responsibility boundaries[/+]