Skip to content

Load an agent from a template zip in the app聽#7205

Description

@mmabrouk

馃 The AI agent says:

Context: The templates work (PRs #7169, #7173, #7170, #7174, #7171, #7172, being consolidated into one PR) lets a user save an agent as a template zip from chat ("Save as template (.zip)") and loads zips through the API: POST /api/agent-templates/validate and POST /api/agent-templates/load with an upload or session_file source, a version + digest pin and an Idempotency-Key. There is no screen in the app to load a zip, so a recipient cannot use a zip they received without calling the API. GitHub folder loading has the same gap (API only; the web client's source type has no github kind).

What to build: in the new-agent / template flow (both the default /m app and classic /w), let the user pick a zip (upload) or a zip in the session's files, call validate, show any issues (file, field, next step), and on a valid result call load with the returned version and digest pin, then open the new agent. Optionally the same for a public GitHub repo + full commit SHA + folder.

References: spec openspec/changes/create-share-load-templates/specs/app-template-gallery/spec.md and specs/template-upload-loading/spec.md; API router api/oss/src/apis/fastapi/agent_templates/router.py; web client web/packages/agenta-entities/src/workflow/api/agentTemplates.ts (already has the source union + validate client).

Acceptance: a zip exported with "Save as template" loads into a working agent from the UI with no API calls; invalid zips show the validation issues; retrying does not create duplicates.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions