Import agent builder conversations kept in a browser
curl --request POST \
--url https://api.getoneprofile.ai/agents/assistant/conversations/import/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"saved_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"threads": [
{
"turns": [
{
"request": "<string>",
"diff": {
"counts": {
"added": 0,
"removed": 0
}
},
"failed": false,
"summary": "<string>"
}
],
"local_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"task": ""
}
]
}
'import requests
url = "https://api.getoneprofile.ai/agents/assistant/conversations/import/"
payload = {
"saved_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"threads": [
{
"turns": [
{
"request": "<string>",
"diff": { "counts": {
"added": 0,
"removed": 0
} },
"failed": False,
"summary": "<string>"
}
],
"local_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"task": ""
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
saved_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
threads: [
{
turns: [
{
request: '<string>',
diff: {counts: {added: 0, removed: 0}},
failed: false,
summary: '<string>'
}
],
local_id: '<string>',
started_at: '2023-11-07T05:31:56Z',
task: ''
}
]
})
};
fetch('https://api.getoneprofile.ai/agents/assistant/conversations/import/', 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.getoneprofile.ai/agents/assistant/conversations/import/",
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([
'saved_agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'threads' => [
[
'turns' => [
[
'request' => '<string>',
'diff' => [
'counts' => [
'added' => 0,
'removed' => 0
]
],
'failed' => false,
'summary' => '<string>'
]
],
'local_id' => '<string>',
'started_at' => '2023-11-07T05:31:56Z',
'task' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://api.getoneprofile.ai/agents/assistant/conversations/import/"
payload := strings.NewReader("{\n \"saved_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threads\": [\n {\n \"turns\": [\n {\n \"request\": \"<string>\",\n \"diff\": {\n \"counts\": {\n \"added\": 0,\n \"removed\": 0\n }\n },\n \"failed\": false,\n \"summary\": \"<string>\"\n }\n ],\n \"local_id\": \"<string>\",\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"task\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://api.getoneprofile.ai/agents/assistant/conversations/import/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"saved_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threads\": [\n {\n \"turns\": [\n {\n \"request\": \"<string>\",\n \"diff\": {\n \"counts\": {\n \"added\": 0,\n \"removed\": 0\n }\n },\n \"failed\": false,\n \"summary\": \"<string>\"\n }\n ],\n \"local_id\": \"<string>\",\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"task\": \"\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/agents/assistant/conversations/import/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"saved_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threads\": [\n {\n \"turns\": [\n {\n \"request\": \"<string>\",\n \"diff\": {\n \"counts\": {\n \"added\": 0,\n \"removed\": 0\n }\n },\n \"failed\": false,\n \"summary\": \"<string>\"\n }\n ],\n \"local_id\": \"<string>\",\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"task\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"already_present": 123,
"conversations": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_message_at": "2023-11-07T05:31:56Z",
"saved_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_description": "<string>",
"title": "<string>"
}
],
"total_count": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}agent-assistant
Import agent builder conversations kept in a browser
Move the threads a browser kept for one saved agent onto your account, once. Send them as the browser holds them, without the two prompt texts of each diff: only what was asked, what changed and the line counts are kept. The newest ten are kept, each with its last forty turns; more is trimmed rather than refused, and a thread with nothing asked is skipped. A thread already imported under the same local_id is skipped too, so a retried import creates nothing twice; already_present says how many were.
POST
/
agents
/
assistant
/
conversations
/
import
/
Import agent builder conversations kept in a browser
curl --request POST \
--url https://api.getoneprofile.ai/agents/assistant/conversations/import/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"saved_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"threads": [
{
"turns": [
{
"request": "<string>",
"diff": {
"counts": {
"added": 0,
"removed": 0
}
},
"failed": false,
"summary": "<string>"
}
],
"local_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"task": ""
}
]
}
'import requests
url = "https://api.getoneprofile.ai/agents/assistant/conversations/import/"
payload = {
"saved_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"threads": [
{
"turns": [
{
"request": "<string>",
"diff": { "counts": {
"added": 0,
"removed": 0
} },
"failed": False,
"summary": "<string>"
}
],
"local_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"task": ""
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
saved_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
threads: [
{
turns: [
{
request: '<string>',
diff: {counts: {added: 0, removed: 0}},
failed: false,
summary: '<string>'
}
],
local_id: '<string>',
started_at: '2023-11-07T05:31:56Z',
task: ''
}
]
})
};
fetch('https://api.getoneprofile.ai/agents/assistant/conversations/import/', 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.getoneprofile.ai/agents/assistant/conversations/import/",
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([
'saved_agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'threads' => [
[
'turns' => [
[
'request' => '<string>',
'diff' => [
'counts' => [
'added' => 0,
'removed' => 0
]
],
'failed' => false,
'summary' => '<string>'
]
],
'local_id' => '<string>',
'started_at' => '2023-11-07T05:31:56Z',
'task' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://api.getoneprofile.ai/agents/assistant/conversations/import/"
payload := strings.NewReader("{\n \"saved_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threads\": [\n {\n \"turns\": [\n {\n \"request\": \"<string>\",\n \"diff\": {\n \"counts\": {\n \"added\": 0,\n \"removed\": 0\n }\n },\n \"failed\": false,\n \"summary\": \"<string>\"\n }\n ],\n \"local_id\": \"<string>\",\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"task\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://api.getoneprofile.ai/agents/assistant/conversations/import/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"saved_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threads\": [\n {\n \"turns\": [\n {\n \"request\": \"<string>\",\n \"diff\": {\n \"counts\": {\n \"added\": 0,\n \"removed\": 0\n }\n },\n \"failed\": false,\n \"summary\": \"<string>\"\n }\n ],\n \"local_id\": \"<string>\",\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"task\": \"\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/agents/assistant/conversations/import/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"saved_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threads\": [\n {\n \"turns\": [\n {\n \"request\": \"<string>\",\n \"diff\": {\n \"counts\": {\n \"added\": 0,\n \"removed\": 0\n }\n },\n \"failed\": false,\n \"summary\": \"<string>\"\n }\n ],\n \"local_id\": \"<string>\",\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"task\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"already_present": 123,
"conversations": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_message_at": "2023-11-07T05:31:56Z",
"saved_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_description": "<string>",
"title": "<string>"
}
],
"total_count": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
APIKeyHeaderHTTPBearer
Body
application/json
Was this page helpful?