Skip to content

Automate browser based workflows with AI

artifact signed url (#190)

Shuchang Zheng7d5f0c8499b9
diff --git a/skyvern/forge/sdk/artifact/models.py b/skyvern/forge/sdk/artifact/models.py
index 510b06bde..aa00c87f6 100644
--- a/skyvern/forge/sdk/artifact/models.py
+++ b/skyvern/forge/sdk/artifact/models.py
@@ -75,4 +75,5 @@ class Artifact(BaseModel):
description="The URI of the artifact.",
examples=["/Users/skyvern/hello/world.png"],
)
+ signed_url: str | None = None
organization_id: str | None = None
diff --git a/skyvern/forge/sdk/routes/agent_protocol.py b/skyvern/forge/sdk/routes/agent_protocol.py
index 577df4dde..914b37c95 100644
--- a/skyvern/forge/sdk/routes/agent_protocol.py
+++ b/skyvern/forge/sdk/routes/agent_protocol.py
@@ -399,6 +399,9 @@ async def get_agent_task_step_artifacts(
step_id,
organization_id=current_org.organization_id,
)
+ if SettingsManager.get_settings().ENV != "local":
+ for artifact in artifacts:
+ artifact.signed_url = await app.ARTIFACT_MANAGER.get_share_link(artifact)
return ORJSONResponse([artifact.model_dump() for artifact in artifacts])