Skip to main content
GET
/
api
/
v1
/
prompts
/
{prompt_id}
Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";

const syllableSDK = new SyllableSDK({
  apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});

async function run() {
  const result = await syllableSDK.prompts.getById({
    promptId: 417330,
  });

  console.log(result);
}

run();
{
  "name": "<string>",
  "type": "<string>",
  "llm_config": {
    "provider": "azure_openai",
    "model": "gpt-4o",
    "version": "2024-05-13",
    "api_version": "2024-06-01",
    "temperature": 1,
    "seed": 123
  },
  "id": 123,
  "last_updated": "2024-01-01T12:00:00Z",
  "description": "Prompt for a weather agent.",
  "context": "You are a weather agent. Answer the user's questions about weather and nothing else.",
  "tools": [],
  "session_end_enabled": false,
  "session_end_tool_id": 1,
  "edit_comments": "Updated prompt text to include requirement to not answer questions that aren't about weather.",
  "last_updated_by": "[email protected]",
  "session_end_tool": {
    "name": "<string>",
    "definition": {
      "tool": {
        "function": {
          "name": "<string>",
          "description": "<string>",
          "parameters": "<unknown>"
        },
        "type": "function"
      },
      "type": "endpoint",
      "endpoint": {
        "url": "<string>",
        "method": "get",
        "argument_location": "body"
      },
      "context": {
        "task": {
          "id": "<string>",
          "config": {},
          "variables": [
            {
              "name": "<string>",
              "value": "<unknown>",
              "value_from": {
                "expression": "<string>",
                "type": "cel"
              },
              "type": "string",
              "description": "<string>",
              "title": "<string>",
              "format": "<string>",
              "pattern": "<string>",
              "enum": [
                "<string>"
              ],
              "examples": [
                "<unknown>"
              ]
            }
          ],
          "metadata": {
            "priority": 123,
            "parent_tool_name": "<string>"
          },
          "tool": {
            "name": "<string>",
            "description": "<string>"
          },
          "type": "expression",
          "version": "v1alpha",
          "inputs": [
            {
              "name": "<string>",
              "type": "string",
              "description": "<string>",
              "title": "<string>",
              "format": "<string>",
              "pattern": "<string>",
              "enum": [
                "<string>"
              ],
              "examples": [
                "<unknown>"
              ],
              "required": true
            }
          ],
          "expression": {
            "expression": "<string>",
            "type": "cel"
          },
          "output": "<unknown>",
          "on": {
            "start": [
              {
                "name": "<string>",
                "value": "<unknown>",
                "value_from": {
                  "expression": "<string>",
                  "type": "cel"
                },
                "if": {
                  "expression": "<string>",
                  "type": "cel"
                },
                "action": "set"
              }
            ],
            "submit": [
              {
                "name": "<string>",
                "value": "<unknown>",
                "value_from": {
                  "expression": "<string>",
                  "type": "cel"
                },
                "if": {
                  "expression": "<string>",
                  "type": "cel"
                },
                "action": "set"
              }
            ]
          }
        }
      },
      "defaults": "<unknown>",
      "static_parameters": [
        {
          "default": "fahrenheit",
          "description": "Whether the temperature information should be fetched in Celsius or Fahrenheit",
          "name": "temperature_unit",
          "required": false,
          "type": "string"
        }
      ],
      "result": "<unknown>",
      "options": {
        "propagate_tool_result": false
      }
    },
    "service_id": 123,
    "id": 123,
    "last_updated": "2023-11-07T05:31:56Z",
    "last_updated_by": "<string>",
    "last_updated_comments": "Updated to use new API endpoint",
    "service_name": "<string>",
    "prompts_info": [
      {
        "id": 123,
        "name": "<string>"
      }
    ],
    "agents_info": [
      {
        "id": 123,
        "name": "<string>"
      }
    ]
  },
  "agent_count": 5,
  "version_number": 1,
  "tools_full": [
    {
      "name": "<string>",
      "definition": {
        "tool": {
          "function": {
            "name": "<string>",
            "description": "<string>",
            "parameters": "<unknown>"
          },
          "type": "function"
        },
        "type": "endpoint",
        "endpoint": {
          "url": "<string>",
          "method": "get",
          "argument_location": "body"
        },
        "context": {
          "task": {
            "id": "<string>",
            "config": {},
            "variables": [
              {
                "name": "<string>",
                "value": "<unknown>",
                "value_from": {
                  "expression": "<string>",
                  "type": "cel"
                },
                "type": "string",
                "description": "<string>",
                "title": "<string>",
                "format": "<string>",
                "pattern": "<string>",
                "enum": [
                  "<string>"
                ],
                "examples": [
                  "<unknown>"
                ]
              }
            ],
            "metadata": {
              "priority": 123,
              "parent_tool_name": "<string>"
            },
            "tool": {
              "name": "<string>",
              "description": "<string>"
            },
            "type": "expression",
            "version": "v1alpha",
            "inputs": [
              {
                "name": "<string>",
                "type": "string",
                "description": "<string>",
                "title": "<string>",
                "format": "<string>",
                "pattern": "<string>",
                "enum": [
                  "<string>"
                ],
                "examples": [
                  "<unknown>"
                ],
                "required": true
              }
            ],
            "expression": {
              "expression": "<string>",
              "type": "cel"
            },
            "output": "<unknown>",
            "on": {
              "start": [
                {
                  "name": "<string>",
                  "value": "<unknown>",
                  "value_from": {
                    "expression": "<string>",
                    "type": "cel"
                  },
                  "if": {
                    "expression": "<string>",
                    "type": "cel"
                  },
                  "action": "set"
                }
              ],
              "submit": [
                {
                  "name": "<string>",
                  "value": "<unknown>",
                  "value_from": {
                    "expression": "<string>",
                    "type": "cel"
                  },
                  "if": {
                    "expression": "<string>",
                    "type": "cel"
                  },
                  "action": "set"
                }
              ]
            }
          }
        },
        "defaults": "<unknown>",
        "static_parameters": [
          {
            "default": "fahrenheit",
            "description": "Whether the temperature information should be fetched in Celsius or Fahrenheit",
            "name": "temperature_unit",
            "required": false,
            "type": "string"
          }
        ],
        "result": "<unknown>",
        "options": {
          "propagate_tool_result": false
        }
      },
      "service_id": 123,
      "id": 123,
      "last_updated": "2023-11-07T05:31:56Z",
      "last_updated_by": "<string>",
      "last_updated_comments": "Updated to use new API endpoint",
      "service_name": "<string>",
      "prompts_info": [
        {
          "id": 123,
          "name": "<string>"
        }
      ],
      "agents_info": [
        {
          "id": 123,
          "name": "<string>"
        }
      ]
    }
  ]
}

Authorizations

Syllable-API-Key
string
header
required

Path Parameters

prompt_id
integer
required

Response

Successful Response

Response model for prompt operations. A prompt defines the behavior of an agent by delivering instructions to the LLM about how the agent should behave. A prompt can be linked to one or more agents. A prompt can also be linked to tools to allow an agent using it to use those tools. For more information, see Console docs.

name
string
required

The prompt name

Example:

"Weather Agent Prompt"

type
string
required

The type of the prompt

Example:

"prompt_v1"

llm_config
PromptLlmConfig · object
required

The configuration for the LLM that the prompt uses

Example:
{
"model": "gpt-4o",
"provider": "openai",
"version": "2024-08-06"
}
id
integer
required

The internal ID of the prompt

Example:

1

last_updated
string | null
required

The last updated date of the prompt

Example:

"2024-01-01T12:00:00Z"

description
string | null

The description of the prompt

Example:

"Prompt for a weather agent."

context
string | null

The prompt text that will be sent to the LLM at the beginning of the conversation

Example:

"You are a weather agent. Answer the user's questions about weather and nothing else."

tools
string[]
deprecated

Names of the tools to which the prompt has access (DEPRECATED - use information from full tools field instead)

Examples:

"hangup"

"summary"

session_end_enabled
boolean
default:false

Whether session end functionality is enabled for this prompt

Example:

false

session_end_tool_id
integer | null

ID of the optional session end tool associated with the prompt

Example:

1

edit_comments
string | null

The comments for the most recent edit to the prompt

Example:

"Updated prompt text to include requirement to not answer questions that aren't about weather."

last_updated_by
string | null

Email address of the user who most recently updated the prompt

session_end_tool
DaoToolResponse · object

The session end tool associated with the prompt

agent_count
integer | null

The number of agents using the prompt

Example:

5

version_number
integer | null

The version number of the current version of the prompt

Example:

1

tools_full
ToolResponse · object[] | null

Full definitions of tools to which the prompt has access