Python (SDK)
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.agents.create()
# Handle response
print(res)import { Textql } from "@textql/sdk";
const textql = new Textql({
apiKey: process.env["TEXTQL_API_KEY"] ?? "",
});
async function run() {
const result = await textql.agents.create({
body: {},
});
console.log(result);
}
run();curl --request POST \
--url https://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--header 'tql_api_key: <api-key>' \
--data '
{
"name": "<string>",
"prompt": "<string>",
"paradigmOptions": {
"universal": {
"connectorIds": [
123
],
"datasetId": "<string>",
"webSearchEnabled": true,
"sqlEnabled": true,
"ontologyEnabled": true,
"ontologyEditingEnabled": true,
"pythonEnabled": true,
"autoApproveEnabled": true,
"googleDriveEnabled": true,
"powerbiEnabled": true,
"contextEditingEnabled": true,
"formEditorEnabled": true,
"playbookToolsEnabled": true,
"microsoft365Enabled": true,
"feedExplorerEnabled": true,
"bashEnabled": true,
"javascriptEnabled": true,
"feedPostEnabled": true,
"feedCommentEnabled": true,
"feedEngageEnabled": true,
"streamlitEnabled": true,
"compactionDisabled": true,
"gmailEnabled": true,
"chatHistorySearchEnabled": true,
"googleCalendarEnabled": true,
"emailOutputEnabled": true,
"powerbiSelections": [
{
"workspaceId": "<string>",
"reportIds": [
"<string>"
],
"datasetIds": [
"<string>"
],
"workspaceName": "<string>",
"connectorId": 123
}
],
"smsMode": true,
"apiAccessKeyIds": [
"<string>"
]
}
},
"sourceSuggestionId": "<string>",
"slackChannelId": "<string>",
"slackDmUserIds": [
"<string>"
],
"skipOrgDefaultChannel": true,
"fastMode": true,
"isStateful": true,
"postingFrequencyCrons": [
"<string>"
],
"emailRecipientMemberIds": [
"<string>"
],
"channelIds": [
"<string>"
],
"teamsChannelId": "<string>",
"teamsDmUserAadIds": [
"<string>"
],
"slackTrigger": {
"triggerId": "<string>",
"isActive": true,
"teamId": "<string>",
"allowedChannelIds": [
"<string>"
]
},
"postingFrequencyCadences": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
tql_api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
prompt: '<string>',
paradigmOptions: {
universal: {
connectorIds: [123],
datasetId: '<string>',
webSearchEnabled: true,
sqlEnabled: true,
ontologyEnabled: true,
ontologyEditingEnabled: true,
pythonEnabled: true,
autoApproveEnabled: true,
googleDriveEnabled: true,
powerbiEnabled: true,
contextEditingEnabled: true,
formEditorEnabled: true,
playbookToolsEnabled: true,
microsoft365Enabled: true,
feedExplorerEnabled: true,
bashEnabled: true,
javascriptEnabled: true,
feedPostEnabled: true,
feedCommentEnabled: true,
feedEngageEnabled: true,
streamlitEnabled: true,
compactionDisabled: true,
gmailEnabled: true,
chatHistorySearchEnabled: true,
googleCalendarEnabled: true,
emailOutputEnabled: true,
powerbiSelections: [
{
workspaceId: '<string>',
reportIds: ['<string>'],
datasetIds: ['<string>'],
workspaceName: '<string>',
connectorId: 123
}
],
smsMode: true,
apiAccessKeyIds: ['<string>']
}
},
sourceSuggestionId: '<string>',
slackChannelId: '<string>',
slackDmUserIds: ['<string>'],
skipOrgDefaultChannel: true,
fastMode: true,
isStateful: true,
postingFrequencyCrons: ['<string>'],
emailRecipientMemberIds: ['<string>'],
channelIds: ['<string>'],
teamsChannelId: '<string>',
teamsDmUserAadIds: ['<string>'],
slackTrigger: {
triggerId: '<string>',
isActive: true,
teamId: '<string>',
allowedChannelIds: ['<string>']
},
postingFrequencyCadences: ['<string>']
})
};
fetch('https://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent', 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://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent",
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([
'name' => '<string>',
'prompt' => '<string>',
'paradigmOptions' => [
'universal' => [
'connectorIds' => [
123
],
'datasetId' => '<string>',
'webSearchEnabled' => true,
'sqlEnabled' => true,
'ontologyEnabled' => true,
'ontologyEditingEnabled' => true,
'pythonEnabled' => true,
'autoApproveEnabled' => true,
'googleDriveEnabled' => true,
'powerbiEnabled' => true,
'contextEditingEnabled' => true,
'formEditorEnabled' => true,
'playbookToolsEnabled' => true,
'microsoft365Enabled' => true,
'feedExplorerEnabled' => true,
'bashEnabled' => true,
'javascriptEnabled' => true,
'feedPostEnabled' => true,
'feedCommentEnabled' => true,
'feedEngageEnabled' => true,
'streamlitEnabled' => true,
'compactionDisabled' => true,
'gmailEnabled' => true,
'chatHistorySearchEnabled' => true,
'googleCalendarEnabled' => true,
'emailOutputEnabled' => true,
'powerbiSelections' => [
[
'workspaceId' => '<string>',
'reportIds' => [
'<string>'
],
'datasetIds' => [
'<string>'
],
'workspaceName' => '<string>',
'connectorId' => 123
]
],
'smsMode' => true,
'apiAccessKeyIds' => [
'<string>'
]
]
],
'sourceSuggestionId' => '<string>',
'slackChannelId' => '<string>',
'slackDmUserIds' => [
'<string>'
],
'skipOrgDefaultChannel' => true,
'fastMode' => true,
'isStateful' => true,
'postingFrequencyCrons' => [
'<string>'
],
'emailRecipientMemberIds' => [
'<string>'
],
'channelIds' => [
'<string>'
],
'teamsChannelId' => '<string>',
'teamsDmUserAadIds' => [
'<string>'
],
'slackTrigger' => [
'triggerId' => '<string>',
'isActive' => true,
'teamId' => '<string>',
'allowedChannelIds' => [
'<string>'
]
],
'postingFrequencyCadences' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json",
"tql_api_key: <api-key>"
],
]);
$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://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"paradigmOptions\": {\n \"universal\": {\n \"connectorIds\": [\n 123\n ],\n \"datasetId\": \"<string>\",\n \"webSearchEnabled\": true,\n \"sqlEnabled\": true,\n \"ontologyEnabled\": true,\n \"ontologyEditingEnabled\": true,\n \"pythonEnabled\": true,\n \"autoApproveEnabled\": true,\n \"googleDriveEnabled\": true,\n \"powerbiEnabled\": true,\n \"contextEditingEnabled\": true,\n \"formEditorEnabled\": true,\n \"playbookToolsEnabled\": true,\n \"microsoft365Enabled\": true,\n \"feedExplorerEnabled\": true,\n \"bashEnabled\": true,\n \"javascriptEnabled\": true,\n \"feedPostEnabled\": true,\n \"feedCommentEnabled\": true,\n \"feedEngageEnabled\": true,\n \"streamlitEnabled\": true,\n \"compactionDisabled\": true,\n \"gmailEnabled\": true,\n \"chatHistorySearchEnabled\": true,\n \"googleCalendarEnabled\": true,\n \"emailOutputEnabled\": true,\n \"powerbiSelections\": [\n {\n \"workspaceId\": \"<string>\",\n \"reportIds\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"workspaceName\": \"<string>\",\n \"connectorId\": 123\n }\n ],\n \"smsMode\": true,\n \"apiAccessKeyIds\": [\n \"<string>\"\n ]\n }\n },\n \"sourceSuggestionId\": \"<string>\",\n \"slackChannelId\": \"<string>\",\n \"slackDmUserIds\": [\n \"<string>\"\n ],\n \"skipOrgDefaultChannel\": true,\n \"fastMode\": true,\n \"isStateful\": true,\n \"postingFrequencyCrons\": [\n \"<string>\"\n ],\n \"emailRecipientMemberIds\": [\n \"<string>\"\n ],\n \"channelIds\": [\n \"<string>\"\n ],\n \"teamsChannelId\": \"<string>\",\n \"teamsDmUserAadIds\": [\n \"<string>\"\n ],\n \"slackTrigger\": {\n \"triggerId\": \"<string>\",\n \"isActive\": true,\n \"teamId\": \"<string>\",\n \"allowedChannelIds\": [\n \"<string>\"\n ]\n },\n \"postingFrequencyCadences\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("tql_api_key", "<api-key>")
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://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("tql_api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"paradigmOptions\": {\n \"universal\": {\n \"connectorIds\": [\n 123\n ],\n \"datasetId\": \"<string>\",\n \"webSearchEnabled\": true,\n \"sqlEnabled\": true,\n \"ontologyEnabled\": true,\n \"ontologyEditingEnabled\": true,\n \"pythonEnabled\": true,\n \"autoApproveEnabled\": true,\n \"googleDriveEnabled\": true,\n \"powerbiEnabled\": true,\n \"contextEditingEnabled\": true,\n \"formEditorEnabled\": true,\n \"playbookToolsEnabled\": true,\n \"microsoft365Enabled\": true,\n \"feedExplorerEnabled\": true,\n \"bashEnabled\": true,\n \"javascriptEnabled\": true,\n \"feedPostEnabled\": true,\n \"feedCommentEnabled\": true,\n \"feedEngageEnabled\": true,\n \"streamlitEnabled\": true,\n \"compactionDisabled\": true,\n \"gmailEnabled\": true,\n \"chatHistorySearchEnabled\": true,\n \"googleCalendarEnabled\": true,\n \"emailOutputEnabled\": true,\n \"powerbiSelections\": [\n {\n \"workspaceId\": \"<string>\",\n \"reportIds\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"workspaceName\": \"<string>\",\n \"connectorId\": 123\n }\n ],\n \"smsMode\": true,\n \"apiAccessKeyIds\": [\n \"<string>\"\n ]\n }\n },\n \"sourceSuggestionId\": \"<string>\",\n \"slackChannelId\": \"<string>\",\n \"slackDmUserIds\": [\n \"<string>\"\n ],\n \"skipOrgDefaultChannel\": true,\n \"fastMode\": true,\n \"isStateful\": true,\n \"postingFrequencyCrons\": [\n \"<string>\"\n ],\n \"emailRecipientMemberIds\": [\n \"<string>\"\n ],\n \"channelIds\": [\n \"<string>\"\n ],\n \"teamsChannelId\": \"<string>\",\n \"teamsDmUserAadIds\": [\n \"<string>\"\n ],\n \"slackTrigger\": {\n \"triggerId\": \"<string>\",\n \"isActive\": true,\n \"teamId\": \"<string>\",\n \"allowedChannelIds\": [\n \"<string>\"\n ]\n },\n \"postingFrequencyCadences\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["tql_api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"paradigmOptions\": {\n \"universal\": {\n \"connectorIds\": [\n 123\n ],\n \"datasetId\": \"<string>\",\n \"webSearchEnabled\": true,\n \"sqlEnabled\": true,\n \"ontologyEnabled\": true,\n \"ontologyEditingEnabled\": true,\n \"pythonEnabled\": true,\n \"autoApproveEnabled\": true,\n \"googleDriveEnabled\": true,\n \"powerbiEnabled\": true,\n \"contextEditingEnabled\": true,\n \"formEditorEnabled\": true,\n \"playbookToolsEnabled\": true,\n \"microsoft365Enabled\": true,\n \"feedExplorerEnabled\": true,\n \"bashEnabled\": true,\n \"javascriptEnabled\": true,\n \"feedPostEnabled\": true,\n \"feedCommentEnabled\": true,\n \"feedEngageEnabled\": true,\n \"streamlitEnabled\": true,\n \"compactionDisabled\": true,\n \"gmailEnabled\": true,\n \"chatHistorySearchEnabled\": true,\n \"googleCalendarEnabled\": true,\n \"emailOutputEnabled\": true,\n \"powerbiSelections\": [\n {\n \"workspaceId\": \"<string>\",\n \"reportIds\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"workspaceName\": \"<string>\",\n \"connectorId\": 123\n }\n ],\n \"smsMode\": true,\n \"apiAccessKeyIds\": [\n \"<string>\"\n ]\n }\n },\n \"sourceSuggestionId\": \"<string>\",\n \"slackChannelId\": \"<string>\",\n \"slackDmUserIds\": [\n \"<string>\"\n ],\n \"skipOrgDefaultChannel\": true,\n \"fastMode\": true,\n \"isStateful\": true,\n \"postingFrequencyCrons\": [\n \"<string>\"\n ],\n \"emailRecipientMemberIds\": [\n \"<string>\"\n ],\n \"channelIds\": [\n \"<string>\"\n ],\n \"teamsChannelId\": \"<string>\",\n \"teamsDmUserAadIds\": [\n \"<string>\"\n ],\n \"slackTrigger\": {\n \"triggerId\": \"<string>\",\n \"isActive\": true,\n \"teamId\": \"<string>\",\n \"allowedChannelIds\": [\n \"<string>\"\n ]\n },\n \"postingFrequencyCadences\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"agent": {
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"isActive": true,
"lastPostAt": "2023-11-07T05:31:56Z",
"paradigmOptions": {
"universal": {
"connectorIds": [
123
],
"datasetId": "<string>",
"webSearchEnabled": true,
"sqlEnabled": true,
"ontologyEnabled": true,
"ontologyEditingEnabled": true,
"pythonEnabled": true,
"autoApproveEnabled": true,
"googleDriveEnabled": true,
"powerbiEnabled": true,
"contextEditingEnabled": true,
"formEditorEnabled": true,
"playbookToolsEnabled": true,
"microsoft365Enabled": true,
"feedExplorerEnabled": true,
"bashEnabled": true,
"javascriptEnabled": true,
"feedPostEnabled": true,
"feedCommentEnabled": true,
"feedEngageEnabled": true,
"streamlitEnabled": true,
"compactionDisabled": true,
"gmailEnabled": true,
"chatHistorySearchEnabled": true,
"googleCalendarEnabled": true,
"emailOutputEnabled": true,
"powerbiSelections": [
{
"workspaceId": "<string>",
"reportIds": [
"<string>"
],
"datasetIds": [
"<string>"
],
"workspaceName": "<string>",
"connectorId": 123
}
],
"smsMode": true,
"apiAccessKeyIds": [
"<string>"
]
}
},
"postCount": 123,
"commentCount": 123,
"voteCount": 123,
"memberId": "<string>",
"memberName": "<string>",
"lastChatId": "<string>",
"hasWritePermission": true,
"slackChannelId": "<string>",
"slackDmUserIds": [
"<string>"
],
"skipOrgDefaultChannel": true,
"fastMode": true,
"isStateful": true,
"postingFrequencyCrons": [
"<string>"
],
"emailOutputEnabled": true,
"emailRecipientMemberIds": [
"<string>"
],
"webhookTriggerId": "<string>",
"channelIds": [
"<string>"
],
"teamsChannelId": "<string>",
"teamsDmUserAadIds": [
"<string>"
],
"slackTrigger": {
"triggerId": "<string>",
"isActive": true,
"teamId": "<string>",
"allowedChannelIds": [
"<string>"
]
},
"profileImageUrl": "<string>",
"postingFrequencyCadences": [
"<string>"
]
},
"chatId": "<string>"
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Agent Service
Create Agent
POST
/
textql.rpc.public.agent.AgentService
/
CreateAgent
Python (SDK)
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.agents.create()
# Handle response
print(res)import { Textql } from "@textql/sdk";
const textql = new Textql({
apiKey: process.env["TEXTQL_API_KEY"] ?? "",
});
async function run() {
const result = await textql.agents.create({
body: {},
});
console.log(result);
}
run();curl --request POST \
--url https://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--header 'tql_api_key: <api-key>' \
--data '
{
"name": "<string>",
"prompt": "<string>",
"paradigmOptions": {
"universal": {
"connectorIds": [
123
],
"datasetId": "<string>",
"webSearchEnabled": true,
"sqlEnabled": true,
"ontologyEnabled": true,
"ontologyEditingEnabled": true,
"pythonEnabled": true,
"autoApproveEnabled": true,
"googleDriveEnabled": true,
"powerbiEnabled": true,
"contextEditingEnabled": true,
"formEditorEnabled": true,
"playbookToolsEnabled": true,
"microsoft365Enabled": true,
"feedExplorerEnabled": true,
"bashEnabled": true,
"javascriptEnabled": true,
"feedPostEnabled": true,
"feedCommentEnabled": true,
"feedEngageEnabled": true,
"streamlitEnabled": true,
"compactionDisabled": true,
"gmailEnabled": true,
"chatHistorySearchEnabled": true,
"googleCalendarEnabled": true,
"emailOutputEnabled": true,
"powerbiSelections": [
{
"workspaceId": "<string>",
"reportIds": [
"<string>"
],
"datasetIds": [
"<string>"
],
"workspaceName": "<string>",
"connectorId": 123
}
],
"smsMode": true,
"apiAccessKeyIds": [
"<string>"
]
}
},
"sourceSuggestionId": "<string>",
"slackChannelId": "<string>",
"slackDmUserIds": [
"<string>"
],
"skipOrgDefaultChannel": true,
"fastMode": true,
"isStateful": true,
"postingFrequencyCrons": [
"<string>"
],
"emailRecipientMemberIds": [
"<string>"
],
"channelIds": [
"<string>"
],
"teamsChannelId": "<string>",
"teamsDmUserAadIds": [
"<string>"
],
"slackTrigger": {
"triggerId": "<string>",
"isActive": true,
"teamId": "<string>",
"allowedChannelIds": [
"<string>"
]
},
"postingFrequencyCadences": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
tql_api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
prompt: '<string>',
paradigmOptions: {
universal: {
connectorIds: [123],
datasetId: '<string>',
webSearchEnabled: true,
sqlEnabled: true,
ontologyEnabled: true,
ontologyEditingEnabled: true,
pythonEnabled: true,
autoApproveEnabled: true,
googleDriveEnabled: true,
powerbiEnabled: true,
contextEditingEnabled: true,
formEditorEnabled: true,
playbookToolsEnabled: true,
microsoft365Enabled: true,
feedExplorerEnabled: true,
bashEnabled: true,
javascriptEnabled: true,
feedPostEnabled: true,
feedCommentEnabled: true,
feedEngageEnabled: true,
streamlitEnabled: true,
compactionDisabled: true,
gmailEnabled: true,
chatHistorySearchEnabled: true,
googleCalendarEnabled: true,
emailOutputEnabled: true,
powerbiSelections: [
{
workspaceId: '<string>',
reportIds: ['<string>'],
datasetIds: ['<string>'],
workspaceName: '<string>',
connectorId: 123
}
],
smsMode: true,
apiAccessKeyIds: ['<string>']
}
},
sourceSuggestionId: '<string>',
slackChannelId: '<string>',
slackDmUserIds: ['<string>'],
skipOrgDefaultChannel: true,
fastMode: true,
isStateful: true,
postingFrequencyCrons: ['<string>'],
emailRecipientMemberIds: ['<string>'],
channelIds: ['<string>'],
teamsChannelId: '<string>',
teamsDmUserAadIds: ['<string>'],
slackTrigger: {
triggerId: '<string>',
isActive: true,
teamId: '<string>',
allowedChannelIds: ['<string>']
},
postingFrequencyCadences: ['<string>']
})
};
fetch('https://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent', 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://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent",
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([
'name' => '<string>',
'prompt' => '<string>',
'paradigmOptions' => [
'universal' => [
'connectorIds' => [
123
],
'datasetId' => '<string>',
'webSearchEnabled' => true,
'sqlEnabled' => true,
'ontologyEnabled' => true,
'ontologyEditingEnabled' => true,
'pythonEnabled' => true,
'autoApproveEnabled' => true,
'googleDriveEnabled' => true,
'powerbiEnabled' => true,
'contextEditingEnabled' => true,
'formEditorEnabled' => true,
'playbookToolsEnabled' => true,
'microsoft365Enabled' => true,
'feedExplorerEnabled' => true,
'bashEnabled' => true,
'javascriptEnabled' => true,
'feedPostEnabled' => true,
'feedCommentEnabled' => true,
'feedEngageEnabled' => true,
'streamlitEnabled' => true,
'compactionDisabled' => true,
'gmailEnabled' => true,
'chatHistorySearchEnabled' => true,
'googleCalendarEnabled' => true,
'emailOutputEnabled' => true,
'powerbiSelections' => [
[
'workspaceId' => '<string>',
'reportIds' => [
'<string>'
],
'datasetIds' => [
'<string>'
],
'workspaceName' => '<string>',
'connectorId' => 123
]
],
'smsMode' => true,
'apiAccessKeyIds' => [
'<string>'
]
]
],
'sourceSuggestionId' => '<string>',
'slackChannelId' => '<string>',
'slackDmUserIds' => [
'<string>'
],
'skipOrgDefaultChannel' => true,
'fastMode' => true,
'isStateful' => true,
'postingFrequencyCrons' => [
'<string>'
],
'emailRecipientMemberIds' => [
'<string>'
],
'channelIds' => [
'<string>'
],
'teamsChannelId' => '<string>',
'teamsDmUserAadIds' => [
'<string>'
],
'slackTrigger' => [
'triggerId' => '<string>',
'isActive' => true,
'teamId' => '<string>',
'allowedChannelIds' => [
'<string>'
]
],
'postingFrequencyCadences' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json",
"tql_api_key: <api-key>"
],
]);
$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://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"paradigmOptions\": {\n \"universal\": {\n \"connectorIds\": [\n 123\n ],\n \"datasetId\": \"<string>\",\n \"webSearchEnabled\": true,\n \"sqlEnabled\": true,\n \"ontologyEnabled\": true,\n \"ontologyEditingEnabled\": true,\n \"pythonEnabled\": true,\n \"autoApproveEnabled\": true,\n \"googleDriveEnabled\": true,\n \"powerbiEnabled\": true,\n \"contextEditingEnabled\": true,\n \"formEditorEnabled\": true,\n \"playbookToolsEnabled\": true,\n \"microsoft365Enabled\": true,\n \"feedExplorerEnabled\": true,\n \"bashEnabled\": true,\n \"javascriptEnabled\": true,\n \"feedPostEnabled\": true,\n \"feedCommentEnabled\": true,\n \"feedEngageEnabled\": true,\n \"streamlitEnabled\": true,\n \"compactionDisabled\": true,\n \"gmailEnabled\": true,\n \"chatHistorySearchEnabled\": true,\n \"googleCalendarEnabled\": true,\n \"emailOutputEnabled\": true,\n \"powerbiSelections\": [\n {\n \"workspaceId\": \"<string>\",\n \"reportIds\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"workspaceName\": \"<string>\",\n \"connectorId\": 123\n }\n ],\n \"smsMode\": true,\n \"apiAccessKeyIds\": [\n \"<string>\"\n ]\n }\n },\n \"sourceSuggestionId\": \"<string>\",\n \"slackChannelId\": \"<string>\",\n \"slackDmUserIds\": [\n \"<string>\"\n ],\n \"skipOrgDefaultChannel\": true,\n \"fastMode\": true,\n \"isStateful\": true,\n \"postingFrequencyCrons\": [\n \"<string>\"\n ],\n \"emailRecipientMemberIds\": [\n \"<string>\"\n ],\n \"channelIds\": [\n \"<string>\"\n ],\n \"teamsChannelId\": \"<string>\",\n \"teamsDmUserAadIds\": [\n \"<string>\"\n ],\n \"slackTrigger\": {\n \"triggerId\": \"<string>\",\n \"isActive\": true,\n \"teamId\": \"<string>\",\n \"allowedChannelIds\": [\n \"<string>\"\n ]\n },\n \"postingFrequencyCadences\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("tql_api_key", "<api-key>")
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://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("tql_api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"paradigmOptions\": {\n \"universal\": {\n \"connectorIds\": [\n 123\n ],\n \"datasetId\": \"<string>\",\n \"webSearchEnabled\": true,\n \"sqlEnabled\": true,\n \"ontologyEnabled\": true,\n \"ontologyEditingEnabled\": true,\n \"pythonEnabled\": true,\n \"autoApproveEnabled\": true,\n \"googleDriveEnabled\": true,\n \"powerbiEnabled\": true,\n \"contextEditingEnabled\": true,\n \"formEditorEnabled\": true,\n \"playbookToolsEnabled\": true,\n \"microsoft365Enabled\": true,\n \"feedExplorerEnabled\": true,\n \"bashEnabled\": true,\n \"javascriptEnabled\": true,\n \"feedPostEnabled\": true,\n \"feedCommentEnabled\": true,\n \"feedEngageEnabled\": true,\n \"streamlitEnabled\": true,\n \"compactionDisabled\": true,\n \"gmailEnabled\": true,\n \"chatHistorySearchEnabled\": true,\n \"googleCalendarEnabled\": true,\n \"emailOutputEnabled\": true,\n \"powerbiSelections\": [\n {\n \"workspaceId\": \"<string>\",\n \"reportIds\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"workspaceName\": \"<string>\",\n \"connectorId\": 123\n }\n ],\n \"smsMode\": true,\n \"apiAccessKeyIds\": [\n \"<string>\"\n ]\n }\n },\n \"sourceSuggestionId\": \"<string>\",\n \"slackChannelId\": \"<string>\",\n \"slackDmUserIds\": [\n \"<string>\"\n ],\n \"skipOrgDefaultChannel\": true,\n \"fastMode\": true,\n \"isStateful\": true,\n \"postingFrequencyCrons\": [\n \"<string>\"\n ],\n \"emailRecipientMemberIds\": [\n \"<string>\"\n ],\n \"channelIds\": [\n \"<string>\"\n ],\n \"teamsChannelId\": \"<string>\",\n \"teamsDmUserAadIds\": [\n \"<string>\"\n ],\n \"slackTrigger\": {\n \"triggerId\": \"<string>\",\n \"isActive\": true,\n \"teamId\": \"<string>\",\n \"allowedChannelIds\": [\n \"<string>\"\n ]\n },\n \"postingFrequencyCadences\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/textql.rpc.public.agent.AgentService/CreateAgent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["tql_api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"paradigmOptions\": {\n \"universal\": {\n \"connectorIds\": [\n 123\n ],\n \"datasetId\": \"<string>\",\n \"webSearchEnabled\": true,\n \"sqlEnabled\": true,\n \"ontologyEnabled\": true,\n \"ontologyEditingEnabled\": true,\n \"pythonEnabled\": true,\n \"autoApproveEnabled\": true,\n \"googleDriveEnabled\": true,\n \"powerbiEnabled\": true,\n \"contextEditingEnabled\": true,\n \"formEditorEnabled\": true,\n \"playbookToolsEnabled\": true,\n \"microsoft365Enabled\": true,\n \"feedExplorerEnabled\": true,\n \"bashEnabled\": true,\n \"javascriptEnabled\": true,\n \"feedPostEnabled\": true,\n \"feedCommentEnabled\": true,\n \"feedEngageEnabled\": true,\n \"streamlitEnabled\": true,\n \"compactionDisabled\": true,\n \"gmailEnabled\": true,\n \"chatHistorySearchEnabled\": true,\n \"googleCalendarEnabled\": true,\n \"emailOutputEnabled\": true,\n \"powerbiSelections\": [\n {\n \"workspaceId\": \"<string>\",\n \"reportIds\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"workspaceName\": \"<string>\",\n \"connectorId\": 123\n }\n ],\n \"smsMode\": true,\n \"apiAccessKeyIds\": [\n \"<string>\"\n ]\n }\n },\n \"sourceSuggestionId\": \"<string>\",\n \"slackChannelId\": \"<string>\",\n \"slackDmUserIds\": [\n \"<string>\"\n ],\n \"skipOrgDefaultChannel\": true,\n \"fastMode\": true,\n \"isStateful\": true,\n \"postingFrequencyCrons\": [\n \"<string>\"\n ],\n \"emailRecipientMemberIds\": [\n \"<string>\"\n ],\n \"channelIds\": [\n \"<string>\"\n ],\n \"teamsChannelId\": \"<string>\",\n \"teamsDmUserAadIds\": [\n \"<string>\"\n ],\n \"slackTrigger\": {\n \"triggerId\": \"<string>\",\n \"isActive\": true,\n \"teamId\": \"<string>\",\n \"allowedChannelIds\": [\n \"<string>\"\n ]\n },\n \"postingFrequencyCadences\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"agent": {
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"isActive": true,
"lastPostAt": "2023-11-07T05:31:56Z",
"paradigmOptions": {
"universal": {
"connectorIds": [
123
],
"datasetId": "<string>",
"webSearchEnabled": true,
"sqlEnabled": true,
"ontologyEnabled": true,
"ontologyEditingEnabled": true,
"pythonEnabled": true,
"autoApproveEnabled": true,
"googleDriveEnabled": true,
"powerbiEnabled": true,
"contextEditingEnabled": true,
"formEditorEnabled": true,
"playbookToolsEnabled": true,
"microsoft365Enabled": true,
"feedExplorerEnabled": true,
"bashEnabled": true,
"javascriptEnabled": true,
"feedPostEnabled": true,
"feedCommentEnabled": true,
"feedEngageEnabled": true,
"streamlitEnabled": true,
"compactionDisabled": true,
"gmailEnabled": true,
"chatHistorySearchEnabled": true,
"googleCalendarEnabled": true,
"emailOutputEnabled": true,
"powerbiSelections": [
{
"workspaceId": "<string>",
"reportIds": [
"<string>"
],
"datasetIds": [
"<string>"
],
"workspaceName": "<string>",
"connectorId": 123
}
],
"smsMode": true,
"apiAccessKeyIds": [
"<string>"
]
}
},
"postCount": 123,
"commentCount": 123,
"voteCount": 123,
"memberId": "<string>",
"memberName": "<string>",
"lastChatId": "<string>",
"hasWritePermission": true,
"slackChannelId": "<string>",
"slackDmUserIds": [
"<string>"
],
"skipOrgDefaultChannel": true,
"fastMode": true,
"isStateful": true,
"postingFrequencyCrons": [
"<string>"
],
"emailOutputEnabled": true,
"emailRecipientMemberIds": [
"<string>"
],
"webhookTriggerId": "<string>",
"channelIds": [
"<string>"
],
"teamsChannelId": "<string>",
"teamsDmUserAadIds": [
"<string>"
],
"slackTrigger": {
"triggerId": "<string>",
"isActive": true,
"teamId": "<string>",
"allowedChannelIds": [
"<string>"
]
},
"profileImageUrl": "<string>",
"postingFrequencyCadences": [
"<string>"
]
},
"chatId": "<string>"
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Authorizations
Headers
Define the version of the Connect protocol
Available options:
1 Define the timeout, in ms
Body
application/json
Show child attributes
Show child attributes
Available options:
MODEL_UNKNOWN, MODEL_DEFAULT_SMALL, MODEL_DEFAULT, MODEL_DEFAULT_LARGE, MODEL_DEFAULT_REASONING, MODEL_HAIKU_4_5, MODEL_OPUS_4_8, MODEL_FABLE_5, MODEL_SONNET_5, MODEL_GPT_5_6_SOL, MODEL_GEMINI_3_FLASH, MODEL_GEMINI_3_PRO, MODEL_GEMINI_3_1_PRO, MODEL_GEMINI_3_5_FLASH, MODEL_GPT_5_6_TERRA, MODEL_GPT_5_6_LUNA, MODEL_DEEPSEEK_3_2, MODEL_GLM_5, MODEL_VLLM, MODEL_KIMI_K2_6, MODEL_GLM_5_2, MODEL_KIMI_K2_7_CODE, MODEL_QWEN3_7_PLUS, MODEL_MUSE_SPARK_1_1 Show child attributes
Show child attributes
Index-aligned with posting_frequency_crons. A non-empty cadence (HOURLY/FOUR-HOUR/EIGHT-HOUR/DAILY/WEEKLY) marks a flexible schedule whose cron the backend generates; "" (or an empty list) means exact.
⌘I