Skip to content

Pass arguments to saved prompts. #3

Description

@mruhlin

The action and the warp CLI take a parameter called saved-prompt which accepts the ID of a prompt saved in warp drive. Those prompts can themselves take arguments as defined by the user. There appears to be no way to pass an argument into a saved prompt via the workflow action or the warp CLI.

Example:

  • Create a saved prompt like "tell me whether {{ argument_officer_name }} is a starfleet captain"
  • Run the prompt locally, and the warp UI will prompt the user to populate the value of argument_officer_name. "Picard" should say yes, "Harry Kim" should say no.
  • Get the ID of the prompt
  • Pass that ID in the saved-prompt argument to the warp-agent-action or to the warp cli
  • There's no way to specify a value for the argument

Ideally something like:

warp agent run --saved-prompt "abc123" --argument_officer_name "Harry Kim"

Maybe a JSON blob for the workflow action?

- name: Example Action
   uses: warpdotdev/warp-agent-action@main
   with:
     warp_api_key: ${{ secrets.WARP_API_KEY }}
     saved-prompt: abc123
     prompt-args: { "officer_name": "Harry Kim", "some_other_arg": "foo" }

Main use case here is to manage prompts used by my github workflows outside of source control for faster iteration, and so I can test the prompts locally more easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions