에이전트 메뉴얼 생성
에이전트의 현재 편집본에 메뉴얼을 추가합니다. 추가한 메뉴얼은 다음 에이전트 버전부터 포함됩니다.
curl --request POST \
--url https://client-api.tryvox.co/v3/agents/{agent_id}/manuals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_head_revision": 1,
"name": "",
"trigger": "",
"content": "",
"built_in_tools": [
{
"toolType": "end_call",
"speakDuringExecution": {
"enabled": false,
"messages": [
"<string>"
]
},
"allowInterruptionDuringExecution": true,
"responseMode": "wait",
"name": "end_call",
"description": "<string>"
}
],
"config": {}
}
'import requests
url = "https://client-api.tryvox.co/v3/agents/{agent_id}/manuals"
payload = {
"expected_head_revision": 1,
"name": "",
"trigger": "",
"content": "",
"built_in_tools": [
{
"toolType": "end_call",
"speakDuringExecution": {
"enabled": False,
"messages": ["<string>"]
},
"allowInterruptionDuringExecution": True,
"responseMode": "wait",
"name": "end_call",
"description": "<string>"
}
],
"config": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_head_revision: 1,
name: '',
trigger: '',
content: '',
built_in_tools: [
{
toolType: 'end_call',
speakDuringExecution: {enabled: false, messages: ['<string>']},
allowInterruptionDuringExecution: true,
responseMode: 'wait',
name: 'end_call',
description: '<string>'
}
],
config: {}
})
};
fetch('https://client-api.tryvox.co/v3/agents/{agent_id}/manuals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://client-api.tryvox.co/v3/agents/{agent_id}/manuals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_head_revision' => 1,
'name' => '',
'trigger' => '',
'content' => '',
'built_in_tools' => [
[
'toolType' => 'end_call',
'speakDuringExecution' => [
'enabled' => false,
'messages' => [
'<string>'
]
],
'allowInterruptionDuringExecution' => true,
'responseMode' => 'wait',
'name' => 'end_call',
'description' => '<string>'
]
],
'config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://client-api.tryvox.co/v3/agents/{agent_id}/manuals"
payload := strings.NewReader("{\n \"expected_head_revision\": 1,\n \"name\": \"\",\n \"trigger\": \"\",\n \"content\": \"\",\n \"built_in_tools\": [\n {\n \"toolType\": \"end_call\",\n \"speakDuringExecution\": {\n \"enabled\": false,\n \"messages\": [\n \"<string>\"\n ]\n },\n \"allowInterruptionDuringExecution\": true,\n \"responseMode\": \"wait\",\n \"name\": \"end_call\",\n \"description\": \"<string>\"\n }\n ],\n \"config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://client-api.tryvox.co/v3/agents/{agent_id}/manuals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_head_revision\": 1,\n \"name\": \"\",\n \"trigger\": \"\",\n \"content\": \"\",\n \"built_in_tools\": [\n {\n \"toolType\": \"end_call\",\n \"speakDuringExecution\": {\n \"enabled\": false,\n \"messages\": [\n \"<string>\"\n ]\n },\n \"allowInterruptionDuringExecution\": true,\n \"responseMode\": \"wait\",\n \"name\": \"end_call\",\n \"description\": \"<string>\"\n }\n ],\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/agents/{agent_id}/manuals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_head_revision\": 1,\n \"name\": \"\",\n \"trigger\": \"\",\n \"content\": \"\",\n \"built_in_tools\": [\n {\n \"toolType\": \"end_call\",\n \"speakDuringExecution\": {\n \"enabled\": false,\n \"messages\": [\n \"<string>\"\n ]\n },\n \"allowInterruptionDuringExecution\": true,\n \"responseMode\": \"wait\",\n \"name\": \"end_call\",\n \"description\": \"<string>\"\n }\n ],\n \"config\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"trigger": "<string>",
"content": "<string>",
"agent_id": "<string>",
"manual_id": "<string>",
"head_revision": 123,
"built_in_tools": [
{
"toolType": "end_call",
"speakDuringExecution": {
"enabled": false,
"messages": [
"<string>"
]
},
"allowInterruptionDuringExecution": true,
"responseMode": "wait",
"name": "end_call",
"description": "<string>"
}
],
"config": {},
"references": {},
"diagnostics": [
{}
]
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "에이전트를 찾을 수 없습니다.",
"details": {
"agent_id": "7f3e9c12-4a8b-4d5e-9f1a-2b3c4d5e6f7a"
}
}
}{
"error": {
"code": "REVISION_CONFLICT",
"message": "다른 변경이 저장되었습니다.",
"details": {
"expected_head_revision": 12,
"actual_head_revision": 13
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 10,
"window_seconds": 1,
"scope": "user"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}Authorizations
워크스페이스 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.
Path Parameters
agent_id로 반환되는 에이전트 UUID입니다.
Body
생성할 메뉴얼입니다.
메뉴얼 생성 요청입니다. 생략한 메뉴얼 필드는 빈 값으로 시작합니다.
마지막으로 조회한 에이전트 head_revision입니다. 그 뒤 에이전트가 바뀌었으면 409 REVISION_CONFLICT를 반환합니다.
x >= 0메뉴얼 이름입니다. 최대 128자이며, 공백만 있는 이름은 보낼 수 없습니다.
128메뉴얼을 불러올 대화 상황입니다. 비워 두면 다른 메뉴얼이 참조할 때만 불러옵니다.
메뉴얼 본문입니다. 공백을 포함해 최대 8,096자이며 @tool:과 @manual: 참조를 담을 수 있습니다.
8096이 메뉴얼의 빌트인 도구 목록입니다. 본문에서 @tool:{name}으로 참조합니다. 각 name은 고유한 식별자([a-zA-Z_][a-zA-Z0-9_]*)여야 합니다.
통화 종료 built-in 도구 설정입니다.
- EndCallTool
- TransferCallTool
- TransferAgentTool
- SendSmsTool
- SendDtmfTool
- SearchAddressTool
- SkillTool
Show child attributes
Show child attributes
메뉴얼 설정입니다. 옵션은 tool_call_sound 하나이며, 메뉴얼을 불러온 직후 재생할 실행 대기음입니다.
Show child attributes
Show child attributes
Response
성공 응답
메뉴얼 1건입니다. 본문의 참조와 진단을 함께 담습니다.
메뉴얼 이름입니다. 최대 128자입니다.
128메뉴얼을 불러올 대화 상황입니다. 비워 두면 다른 메뉴얼이 참조할 때만 불러옵니다.
메뉴얼 본문입니다. 공백을 포함해 최대 8,096자이며 @tool:과 @manual: 참조를 담을 수 있습니다.
8096에이전트 UUID입니다.
메뉴얼 UUID입니다.
현재 편집본의 리비전입니다. 다음 쓰기 요청의 expected_head_revision으로 보냅니다.
이 메뉴얼의 빌트인 도구 목록입니다. 본문에서 @tool:{name}으로 참조합니다. 각 name은 고유한 식별자([a-zA-Z_][a-zA-Z0-9_]*)여야 합니다.
통화 종료 built-in 도구 설정입니다.
- EndCallTool
- TransferCallTool
- TransferAgentTool
- SendSmsTool
- SendDtmfTool
- SearchAddressTool
- SkillTool
Show child attributes
Show child attributes
메뉴얼 설정입니다. 옵션은 tool_call_sound 하나이며, 메뉴얼을 불러온 직후 재생할 실행 대기음입니다.
Show child attributes
Show child attributes
본문에서 찾은 참조입니다. manual_ids, tool_ids(커스텀 도구), built_in_names로 나눠 담습니다.
Show child attributes
Show child attributes
이 메뉴얼에서 발견된 진단 목록입니다. 각 항목에 code, severity, manual_id, path, reference, message가 담깁니다.
Was this page helpful?
curl --request POST \
--url https://client-api.tryvox.co/v3/agents/{agent_id}/manuals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_head_revision": 1,
"name": "",
"trigger": "",
"content": "",
"built_in_tools": [
{
"toolType": "end_call",
"speakDuringExecution": {
"enabled": false,
"messages": [
"<string>"
]
},
"allowInterruptionDuringExecution": true,
"responseMode": "wait",
"name": "end_call",
"description": "<string>"
}
],
"config": {}
}
'import requests
url = "https://client-api.tryvox.co/v3/agents/{agent_id}/manuals"
payload = {
"expected_head_revision": 1,
"name": "",
"trigger": "",
"content": "",
"built_in_tools": [
{
"toolType": "end_call",
"speakDuringExecution": {
"enabled": False,
"messages": ["<string>"]
},
"allowInterruptionDuringExecution": True,
"responseMode": "wait",
"name": "end_call",
"description": "<string>"
}
],
"config": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_head_revision: 1,
name: '',
trigger: '',
content: '',
built_in_tools: [
{
toolType: 'end_call',
speakDuringExecution: {enabled: false, messages: ['<string>']},
allowInterruptionDuringExecution: true,
responseMode: 'wait',
name: 'end_call',
description: '<string>'
}
],
config: {}
})
};
fetch('https://client-api.tryvox.co/v3/agents/{agent_id}/manuals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://client-api.tryvox.co/v3/agents/{agent_id}/manuals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_head_revision' => 1,
'name' => '',
'trigger' => '',
'content' => '',
'built_in_tools' => [
[
'toolType' => 'end_call',
'speakDuringExecution' => [
'enabled' => false,
'messages' => [
'<string>'
]
],
'allowInterruptionDuringExecution' => true,
'responseMode' => 'wait',
'name' => 'end_call',
'description' => '<string>'
]
],
'config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://client-api.tryvox.co/v3/agents/{agent_id}/manuals"
payload := strings.NewReader("{\n \"expected_head_revision\": 1,\n \"name\": \"\",\n \"trigger\": \"\",\n \"content\": \"\",\n \"built_in_tools\": [\n {\n \"toolType\": \"end_call\",\n \"speakDuringExecution\": {\n \"enabled\": false,\n \"messages\": [\n \"<string>\"\n ]\n },\n \"allowInterruptionDuringExecution\": true,\n \"responseMode\": \"wait\",\n \"name\": \"end_call\",\n \"description\": \"<string>\"\n }\n ],\n \"config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://client-api.tryvox.co/v3/agents/{agent_id}/manuals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_head_revision\": 1,\n \"name\": \"\",\n \"trigger\": \"\",\n \"content\": \"\",\n \"built_in_tools\": [\n {\n \"toolType\": \"end_call\",\n \"speakDuringExecution\": {\n \"enabled\": false,\n \"messages\": [\n \"<string>\"\n ]\n },\n \"allowInterruptionDuringExecution\": true,\n \"responseMode\": \"wait\",\n \"name\": \"end_call\",\n \"description\": \"<string>\"\n }\n ],\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/agents/{agent_id}/manuals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_head_revision\": 1,\n \"name\": \"\",\n \"trigger\": \"\",\n \"content\": \"\",\n \"built_in_tools\": [\n {\n \"toolType\": \"end_call\",\n \"speakDuringExecution\": {\n \"enabled\": false,\n \"messages\": [\n \"<string>\"\n ]\n },\n \"allowInterruptionDuringExecution\": true,\n \"responseMode\": \"wait\",\n \"name\": \"end_call\",\n \"description\": \"<string>\"\n }\n ],\n \"config\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"trigger": "<string>",
"content": "<string>",
"agent_id": "<string>",
"manual_id": "<string>",
"head_revision": 123,
"built_in_tools": [
{
"toolType": "end_call",
"speakDuringExecution": {
"enabled": false,
"messages": [
"<string>"
]
},
"allowInterruptionDuringExecution": true,
"responseMode": "wait",
"name": "end_call",
"description": "<string>"
}
],
"config": {},
"references": {},
"diagnostics": [
{}
]
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "에이전트를 찾을 수 없습니다.",
"details": {
"agent_id": "7f3e9c12-4a8b-4d5e-9f1a-2b3c4d5e6f7a"
}
}
}{
"error": {
"code": "REVISION_CONFLICT",
"message": "다른 변경이 저장되었습니다.",
"details": {
"expected_head_revision": 12,
"actual_head_revision": 13
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 10,
"window_seconds": 1,
"scope": "user"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}