POST
/
agents
/
{agentId}
/
versioned_prompts
curl --request POST \
  --url https://api.vogent.ai/api/agents/{agentId}/versioned_prompts \
  --header 'Content-Type: application/json' \
  --data '{
  "aiModelId": "<string>",
  "agentType": "STANDARD",
  "prompt": "<string>",
  "flowDefinition": {
    "nodes": [
      {
        "id": "<string>",
        "name": "<string>",
        "type": "<string>",
        "transitionRules": [
          {
            "conditionType": "always",
            "field": "<string>",
            "value": "<string>",
            "values": [
              "<string>"
            ],
            "transitionNodeId": "<string>"
          }
        ],
        "nodeData": {}
      }
    ]
  },
  "name": "<string>",
  "modelOptionValues": [
    {
      "optionId": "<string>",
      "value": "<string>"
    }
  ]
}'
{
  "id": "<string>",
  "name": "<string>",
  "agentType": "STANDARD",
  "prompt": "<string>",
  "flowDefinition": {
    "nodes": [
      {
        "id": "<string>",
        "name": "<string>",
        "type": "<string>",
        "transitionRules": [
          {
            "conditionType": "always",
            "field": "<string>",
            "value": "<string>",
            "values": [
              "<string>"
            ],
            "transitionNodeId": "<string>"
          }
        ],
        "outputSchema": "<string>",
        "nodeData": {}
      }
    ]
  },
  "modelOptionValues": [
    {
      "optionId": "<string>",
      "value": "<string>"
    }
  ]
}

Path Parameters

agentId
string
required

ID of the agent.

Body

application/json
Creates a versioned prompt
aiModelId
string
required

The ID of the model to use.

agentType
enum<string>
required

The type of agent that this prompt represents.

Available options:
STANDARD,
CUSTOM_FLOW
name
string
required
prompt
string | null
flowDefinition
object

For agents with agentType CUSTOM_FLOW, the flow definition that you want to use.

modelOptionValues
object[]

Response

200
application/json
Successful operation
id
string
required

Unique identifier for the versioned prompt

name
string
required

Human-readable name for the versioned prompt

agentType
enum<string>
required

The type of agent this prompt is designed for (STANDARD or CUSTOM_FLOW)

Available options:
STANDARD,
CUSTOM_FLOW
prompt
string | null
required

The actual prompt content that will be used by the agent. Can be null for CUSTOM_FLOW agent types

flowDefinition
object

The flow definition for the agent. Only defined for CUSTOM_FLOW agent types.

modelOptionValues
object[]