Skip to content

[Feat]: Integrate artifacts into task history #982

@matoushavlena

Description

@matoushavlena

Is your feature request related to a problem? Please describe.

Artifacts (files, images, charts, code outputs) are stored separately from history, making it impossible to fully reconstruct or replay conversations where artifacts are interleaved with messages.
In multi-agent workflows, artifacts are often produced alongside related commentary (e.g., chart → analysis → code → commentary). When artifacts are detached from the message flow, later agents can’t access them in context, reducing the ability to reference, reason over, or transform them.

Describe the solution you'd like

Allow artifacts to appear inline in history alongside messages, using a discriminator to clearly identify the type.
This would preserve chronological order and make parsing easier for clients.
Proposed schema change:

type HistoryItem = { kind: 'message' } & Message | { kind: 'artifact' } & Artifact;

history?: HistoryItem[];

Describe alternatives you've considered

Keeping artifacts separate but adding explicit cross-links to their related messages

Additional context

Issue #301 also addresses preserving chronological task data, but focuses on status updates rather than artifacts.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    TSC ReviewTo be reviewed by the Technical Steering Committee

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions