ArtifactTools collection lets the agent inspect artifacts produced earlier in the same conversation, for example to compare against the chart from an earlier turn or summarise a past table. One instance is created per thread, bound to its thread_id, so listing and fetching are scoped to that one conversation without the id being an LLM-facing parameter.
Both tools are read-only: they produce no artifact and stream no artifact event. They exist so the agent can reason over its own past output by id, rather than re-emitting large payloads into the conversation.
Shared conventions (the @workspace_tool contract, the injected action_and_reasoning argument, and the JSON envelope) are documented in Tools; the typed-artifact channel that produces these artifacts in the first place is in Agent core logic. The decorator injects the required action_and_reasoning argument, so it is omitted from the argument tables below.
Source: backend/app/tools/artifacts.py
list_artifacts
Return a compact, newest-first index of the artifacts produced earlier in this conversation.
Description shown to the agent:
List artifacts produced earlier in this conversation, newest first. Returns a compact index (id, type, title, turn). Useful before referencing or re-fetching a specific artifact.Arguments
Returns: newline-separated lines of the form
#<id> [turn <n>] <type> — <title> (the title clause is dropped when the artifact has no title), newest first, or (no artifacts produced yet in this conversation) when none exist. The listing is scoped to this thread.
Implementation: calls repo.list_artifacts(thread_id, artifact_type=..., limit=...) and formats each row into the compact index line. Source: backend/app/tools/artifacts.py.
get_artifact
Fetch the full JSON payload of one past artifact by its id, plus its metadata.
Description shown to the agent:
Fetch the full JSON payload of a past artifact by id. Use this to compare against, summarise, or reason over an earlier chart or table. The payload is returned as JSON; do not re-emit it verbatim to the user, refer to it by id and describe what changed.Arguments
Returns: a JSON string wrapping the payload with its metadata, not the bare payload:
artifact #<id> not found in this conversation.
Implementation: calls repo.get_artifact(artifact_id) and enforces thread scoping by checking artifact.thread_id == self.thread_id before returning, so artifacts from other conversations are never disclosed. The payload is serialised with json.dumps(..., default=str). Source: backend/app/tools/artifacts.py.