feat(agent): tell cloud agents to upload deliverables as artifacts - #3944
Conversation
|
😎 Merged successfully - details. |
|
Done. Opened #3944 (draft) in posthog/code. What the tool is: The change: added a "Delivering non-code files (artifacts)" section to the cloud task system prompt ( I put it in the cloud prompt rather than the base desktop instructions on purpose — the tool doesn't exist in local desktop sessions, so a global instruction would reference a missing tool. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
✅ Visual changes approved by @puemos — baseline updated in 8 new. |
Add guidance to the cloud task system prompt instructing the agent to call the `upload_artifact` tool for non-code deliverables (reports, images, rendered canvases, data files) so they appear in the user's artifact panel as downloads, rather than being left in the workspace where the user can't see them. The instruction is appended to every cloud system-prompt branch and skipped for Slack-origin sessions, which get a runtime "no artifact delivery" constraint. Exposes UPLOAD_ARTIFACT_QUALIFIED_TOOL_NAME from the tool module, mirroring the signed-commit tool-name constants, so the prompt references the qualified tool id from a single source. Generated-By: PostHog Code Task-Id: 887b21b0-78b0-4741-be7c-1f0e456f926a
Address review feedback from @k11kirky: drop the exported UPLOAD_ARTIFACT tool-name constants (revert upload-artifact.ts to referencing the literal name), remove the verbose explanatory code comment, and tighten the artifact-delivery prompt prose. The instruction now references the `upload_artifact` tool by its short name. Generated-By: PostHog Code Task-Id: 887b21b0-78b0-4741-be7c-1f0e456f926a
Address review feedback from @puemos: drop the Slack gating so the artifact-delivery instruction appears in every cloud session. Sessions that genuinely can't deliver artifacts already get a runtime constraint that overrides the prompt. Generated-By: PostHog Code Task-Id: 887b21b0-78b0-4741-be7c-1f0e456f926a
f8ef7a6 to
71fd26f
Compare
Generated-By: PostHog Code Task-Id: 842d598b-48cc-4059-8fed-18a9965a71c4
Problem
Cloud agents can create downloadable files but leave them only in the workspace, making those deliverables inaccessible to users. Even after uploading a file, an agent may reference its local path instead of the working download URL.
Changes
upload_artifact, never the local workspace path.Why: Users should receive a working download link whenever an agent produces a file, without needing to remind the agent how to deliver it.
How did you test this?
git diff --checkAutomatic notifications
Created with PostHog Code