Create Tool
curl --request POST \
--url https://api-prod.interactly.ai/workflows/v1/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"logical_id": "<string>",
"tool_id": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"signature": "<string>",
"args_schema": {},
"static_messages_config": {
"static_messages": [
"<string>"
],
"static_messages_selection_mode": "random"
},
"result_runtime_variable_name": "tool_result",
"ignore_content_received_during_llm_tool_call_specification": false,
"type": "inline_python",
"code": "<string>"
}
'import requests
url = "https://api-prod.interactly.ai/workflows/v1/tools"
payload = {
"logical_id": "<string>",
"tool_id": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"signature": "<string>",
"args_schema": {},
"static_messages_config": {
"static_messages": ["<string>"],
"static_messages_selection_mode": "random"
},
"result_runtime_variable_name": "tool_result",
"ignore_content_received_during_llm_tool_call_specification": False,
"type": "inline_python",
"code": "<string>"
}
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({
logical_id: '<string>',
tool_id: '<string>',
name: '<string>',
description: '<string>',
category: '<string>',
signature: '<string>',
args_schema: {},
static_messages_config: {static_messages: ['<string>'], static_messages_selection_mode: 'random'},
result_runtime_variable_name: 'tool_result',
ignore_content_received_during_llm_tool_call_specification: false,
type: 'inline_python',
code: '<string>'
})
};
fetch('https://api-prod.interactly.ai/workflows/v1/tools', 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://api-prod.interactly.ai/workflows/v1/tools",
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([
'logical_id' => '<string>',
'tool_id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'category' => '<string>',
'signature' => '<string>',
'args_schema' => [
],
'static_messages_config' => [
'static_messages' => [
'<string>'
],
'static_messages_selection_mode' => 'random'
],
'result_runtime_variable_name' => 'tool_result',
'ignore_content_received_during_llm_tool_call_specification' => false,
'type' => 'inline_python',
'code' => '<string>'
]),
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://api-prod.interactly.ai/workflows/v1/tools"
payload := strings.NewReader("{\n \"logical_id\": \"<string>\",\n \"tool_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"signature\": \"<string>\",\n \"args_schema\": {},\n \"static_messages_config\": {\n \"static_messages\": [\n \"<string>\"\n ],\n \"static_messages_selection_mode\": \"random\"\n },\n \"result_runtime_variable_name\": \"tool_result\",\n \"ignore_content_received_during_llm_tool_call_specification\": false,\n \"type\": \"inline_python\",\n \"code\": \"<string>\"\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://api-prod.interactly.ai/workflows/v1/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"logical_id\": \"<string>\",\n \"tool_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"signature\": \"<string>\",\n \"args_schema\": {},\n \"static_messages_config\": {\n \"static_messages\": [\n \"<string>\"\n ],\n \"static_messages_selection_mode\": \"random\"\n },\n \"result_runtime_variable_name\": \"tool_result\",\n \"ignore_content_received_during_llm_tool_call_specification\": false,\n \"type\": \"inline_python\",\n \"code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/workflows/v1/tools")
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 \"logical_id\": \"<string>\",\n \"tool_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"signature\": \"<string>\",\n \"args_schema\": {},\n \"static_messages_config\": {\n \"static_messages\": [\n \"<string>\"\n ],\n \"static_messages_selection_mode\": \"random\"\n },\n \"result_runtime_variable_name\": \"tool_result\",\n \"ignore_content_received_during_llm_tool_call_specification\": false,\n \"type\": \"inline_python\",\n \"code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"tool": {
"team_id": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"_id": "5eb7cf5a86d9755df3a6c593",
"tool_config": {
"logical_id": "<string>",
"tool_id": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"signature": "<string>",
"args_schema": {},
"static_messages_config": {
"static_messages": [
"<string>"
],
"static_messages_selection_mode": "random"
},
"result_runtime_variable_name": "tool_result",
"ignore_content_received_during_llm_tool_call_specification": false,
"type": "inline_python",
"code": "<string>"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Tools
Create Tool
Endpoint to create a new tool.
POST
/
workflows
/
v1
/
tools
Create Tool
curl --request POST \
--url https://api-prod.interactly.ai/workflows/v1/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"logical_id": "<string>",
"tool_id": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"signature": "<string>",
"args_schema": {},
"static_messages_config": {
"static_messages": [
"<string>"
],
"static_messages_selection_mode": "random"
},
"result_runtime_variable_name": "tool_result",
"ignore_content_received_during_llm_tool_call_specification": false,
"type": "inline_python",
"code": "<string>"
}
'import requests
url = "https://api-prod.interactly.ai/workflows/v1/tools"
payload = {
"logical_id": "<string>",
"tool_id": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"signature": "<string>",
"args_schema": {},
"static_messages_config": {
"static_messages": ["<string>"],
"static_messages_selection_mode": "random"
},
"result_runtime_variable_name": "tool_result",
"ignore_content_received_during_llm_tool_call_specification": False,
"type": "inline_python",
"code": "<string>"
}
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({
logical_id: '<string>',
tool_id: '<string>',
name: '<string>',
description: '<string>',
category: '<string>',
signature: '<string>',
args_schema: {},
static_messages_config: {static_messages: ['<string>'], static_messages_selection_mode: 'random'},
result_runtime_variable_name: 'tool_result',
ignore_content_received_during_llm_tool_call_specification: false,
type: 'inline_python',
code: '<string>'
})
};
fetch('https://api-prod.interactly.ai/workflows/v1/tools', 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://api-prod.interactly.ai/workflows/v1/tools",
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([
'logical_id' => '<string>',
'tool_id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'category' => '<string>',
'signature' => '<string>',
'args_schema' => [
],
'static_messages_config' => [
'static_messages' => [
'<string>'
],
'static_messages_selection_mode' => 'random'
],
'result_runtime_variable_name' => 'tool_result',
'ignore_content_received_during_llm_tool_call_specification' => false,
'type' => 'inline_python',
'code' => '<string>'
]),
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://api-prod.interactly.ai/workflows/v1/tools"
payload := strings.NewReader("{\n \"logical_id\": \"<string>\",\n \"tool_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"signature\": \"<string>\",\n \"args_schema\": {},\n \"static_messages_config\": {\n \"static_messages\": [\n \"<string>\"\n ],\n \"static_messages_selection_mode\": \"random\"\n },\n \"result_runtime_variable_name\": \"tool_result\",\n \"ignore_content_received_during_llm_tool_call_specification\": false,\n \"type\": \"inline_python\",\n \"code\": \"<string>\"\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://api-prod.interactly.ai/workflows/v1/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"logical_id\": \"<string>\",\n \"tool_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"signature\": \"<string>\",\n \"args_schema\": {},\n \"static_messages_config\": {\n \"static_messages\": [\n \"<string>\"\n ],\n \"static_messages_selection_mode\": \"random\"\n },\n \"result_runtime_variable_name\": \"tool_result\",\n \"ignore_content_received_during_llm_tool_call_specification\": false,\n \"type\": \"inline_python\",\n \"code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/workflows/v1/tools")
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 \"logical_id\": \"<string>\",\n \"tool_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"signature\": \"<string>\",\n \"args_schema\": {},\n \"static_messages_config\": {\n \"static_messages\": [\n \"<string>\"\n ],\n \"static_messages_selection_mode\": \"random\"\n },\n \"result_runtime_variable_name\": \"tool_result\",\n \"ignore_content_received_during_llm_tool_call_specification\": false,\n \"type\": \"inline_python\",\n \"code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"tool": {
"team_id": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"_id": "5eb7cf5a86d9755df3a6c593",
"tool_config": {
"logical_id": "<string>",
"tool_id": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"signature": "<string>",
"args_schema": {},
"static_messages_config": {
"static_messages": [
"<string>"
],
"static_messages_selection_mode": "random"
},
"result_runtime_variable_name": "tool_result",
"ignore_content_received_during_llm_tool_call_specification": false,
"type": "inline_python",
"code": "<string>"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Body
application/json
- Inline Python Tool
- Inbuilt Function Tool
- External API Tool
- Knowledge Base Tool
Configuration for an inline Python tool. The "code" field should contain a self-contained executable Python function. Example value of "code" string could be: def add( a: float, b: float, ) -> float: return float(a + b)
If true, any free-text content the LLM returns in the same response as a call to this tool is ignored: not emitted via AssistantResponseEvent, not added to chat history, and not added to the node's structured output. When a response contains multiple tool calls, the text is ignored only if every tool call targets a tool for which this flag is set.