Skip to content

Python: Hosted Agents: Clarification on code execution, artifact retrieval, persistence, and platform responsibility boundaries #9659

Open

Description

@ShivamGoyal03

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

  1. Is Code Interpreter intended to be the recommended execution mechanism for model-generated Python workflows that produce durable artifacts?

  2. 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?

  3. Beyond file citations, are there any recommended Hosted Agent patterns for artifact persistence, storage integration, execution-result callbacks, or lifecycle hooks?

  4. 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?

  5. 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?

Activity

  1. added
    pythonUsage: [Issues, PRs], Target: Python
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Oct 23, 2026
  2. changed the title [-]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[/+] on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions