Skip to main content

Create Prompts

This guide shows you how to set up the Agenta SDK for managing prompts programmatically.

Creating a new application

Prompts are applications in Agenta. To create a new prompt, you need to specify the slug, and the type of the application.

The type of the application can be SERVICE:completion, SERVICE:chat, or CUSTOM:

  • SERVICE:completion is for single-turn prompts.
  • SERVICE:chat is for multi-turn prompts.
  • CUSTOM is for custom prompts.
# Creates an empty application
app = ag.AppManager.create(
app_slug="my-app-slug",
template_key="SERVICE:completion", # we define here the app type
# template_key="SERVICE:chat" # chat prompts
# template_key="CUSTOM" # custom configuration (schema-less, however unless you provide a URI, you can only use the registry but not the playground)
)
warning

The app created until now is empty. You cannot use it from the UI yet. You need to create a variant and commit changes to it to be able to use it (next section).