Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agents.update_agent(agent_id="<id>", model="functionary-pt")
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.agents.updateAgent({
agentId: "<id>",
updateAgentRequest: {
model: "functionary-pt",
},
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Agents.UpdateAgentAsync(
agentId: "<id>",
body: new MeetKai.MKA1.Types.Components.UpdateAgentRequest() {
Model = "functionary-pt",
}
);
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/agents/{agent_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"model": "functionary-pt",
"instructions": "<string>",
"tools": [
{
"user_location": {
"type": "approximate",
"city": "<string>",
"country": "<string>",
"region": "<string>",
"timezone": "<string>"
},
"filters": {
"allowed_domains": [
"<string>"
]
}
}
],
"tool_choice": "<string>",
"parallel_tool_calls": true,
"max_tool_calls": 150,
"text": {
"format": {}
},
"reasoning": {},
"metadata": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
model: 'functionary-pt',
instructions: '<string>',
tools: [
{
user_location: {
type: 'approximate',
city: '<string>',
country: '<string>',
region: '<string>',
timezone: '<string>'
},
filters: {allowed_domains: ['<string>']}
}
],
tool_choice: '<string>',
parallel_tool_calls: true,
max_tool_calls: 150,
text: {format: {}},
reasoning: {},
metadata: {}
})
};
fetch('https://apigw.mka1.com/api/v1/agents/{agent_id}', 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://apigw.mka1.com/api/v1/agents/{agent_id}",
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>',
'description' => '<string>',
'model' => 'functionary-pt',
'instructions' => '<string>',
'tools' => [
[
'user_location' => [
'type' => 'approximate',
'city' => '<string>',
'country' => '<string>',
'region' => '<string>',
'timezone' => '<string>'
],
'filters' => [
'allowed_domains' => [
'<string>'
]
]
]
],
'tool_choice' => '<string>',
'parallel_tool_calls' => true,
'max_tool_calls' => 150,
'text' => [
'format' => [
]
],
'reasoning' => [
],
'metadata' => [
]
]),
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://apigw.mka1.com/api/v1/agents/{agent_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"<string>\",\n \"tools\": [\n {\n \"user_location\": {\n \"type\": \"approximate\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"region\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"filters\": {\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tool_choice\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 150,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {},\n \"metadata\": {}\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://apigw.mka1.com/api/v1/agents/{agent_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"<string>\",\n \"tools\": [\n {\n \"user_location\": {\n \"type\": \"approximate\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"region\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"filters\": {\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tool_choice\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 150,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/agents/{agent_id}")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"<string>\",\n \"tools\": [\n {\n \"user_location\": {\n \"type\": \"approximate\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"region\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"filters\": {\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tool_choice\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 150,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"object": "agent",
"id": "<string>",
"name": "<string>",
"description": "<string>",
"model": "functionary-pt",
"instructions": "<string>",
"tools": [
{
"user_location": {
"type": "approximate",
"city": "<string>",
"country": "<string>",
"region": "<string>",
"timezone": "<string>"
},
"filters": {
"allowed_domains": [
"<string>"
]
}
}
],
"tool_choice": "<string>",
"parallel_tool_calls": true,
"max_tool_calls": 123,
"text": {
"format": {}
},
"reasoning": {},
"metadata": {},
"version": 2,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}Agents
Actualizar un agente
POST
/
api
/
v1
/
agents
/
{agent_id}
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agents.update_agent(agent_id="<id>", model="functionary-pt")
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.agents.updateAgent({
agentId: "<id>",
updateAgentRequest: {
model: "functionary-pt",
},
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Agents.UpdateAgentAsync(
agentId: "<id>",
body: new MeetKai.MKA1.Types.Components.UpdateAgentRequest() {
Model = "functionary-pt",
}
);
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/agents/{agent_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"model": "functionary-pt",
"instructions": "<string>",
"tools": [
{
"user_location": {
"type": "approximate",
"city": "<string>",
"country": "<string>",
"region": "<string>",
"timezone": "<string>"
},
"filters": {
"allowed_domains": [
"<string>"
]
}
}
],
"tool_choice": "<string>",
"parallel_tool_calls": true,
"max_tool_calls": 150,
"text": {
"format": {}
},
"reasoning": {},
"metadata": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
model: 'functionary-pt',
instructions: '<string>',
tools: [
{
user_location: {
type: 'approximate',
city: '<string>',
country: '<string>',
region: '<string>',
timezone: '<string>'
},
filters: {allowed_domains: ['<string>']}
}
],
tool_choice: '<string>',
parallel_tool_calls: true,
max_tool_calls: 150,
text: {format: {}},
reasoning: {},
metadata: {}
})
};
fetch('https://apigw.mka1.com/api/v1/agents/{agent_id}', 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://apigw.mka1.com/api/v1/agents/{agent_id}",
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>',
'description' => '<string>',
'model' => 'functionary-pt',
'instructions' => '<string>',
'tools' => [
[
'user_location' => [
'type' => 'approximate',
'city' => '<string>',
'country' => '<string>',
'region' => '<string>',
'timezone' => '<string>'
],
'filters' => [
'allowed_domains' => [
'<string>'
]
]
]
],
'tool_choice' => '<string>',
'parallel_tool_calls' => true,
'max_tool_calls' => 150,
'text' => [
'format' => [
]
],
'reasoning' => [
],
'metadata' => [
]
]),
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://apigw.mka1.com/api/v1/agents/{agent_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"<string>\",\n \"tools\": [\n {\n \"user_location\": {\n \"type\": \"approximate\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"region\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"filters\": {\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tool_choice\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 150,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {},\n \"metadata\": {}\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://apigw.mka1.com/api/v1/agents/{agent_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"<string>\",\n \"tools\": [\n {\n \"user_location\": {\n \"type\": \"approximate\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"region\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"filters\": {\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tool_choice\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 150,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/agents/{agent_id}")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"<string>\",\n \"tools\": [\n {\n \"user_location\": {\n \"type\": \"approximate\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"region\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"filters\": {\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tool_choice\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 150,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"object": "agent",
"id": "<string>",
"name": "<string>",
"description": "<string>",
"model": "functionary-pt",
"instructions": "<string>",
"tools": [
{
"user_location": {
"type": "approximate",
"city": "<string>",
"country": "<string>",
"region": "<string>",
"timezone": "<string>"
},
"filters": {
"allowed_domains": [
"<string>"
]
}
}
],
"tool_choice": "<string>",
"parallel_tool_calls": true,
"max_tool_calls": 123,
"text": {
"format": {}
},
"reasoning": {},
"metadata": {},
"version": 2,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}Autorizaciones
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Encabezados
Optional external end-user identifier forwarded by the API gateway.
Parámetros de ruta
Cuerpo
application/json
Required string length:
1 - 120Maximum string length:
2000Minimum string length:
1Ejemplo:
"functionary-pt"
Maximum string length:
20000- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
Rango requerido:
1 <= x <= 300Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Respuesta
Agente actualizado.
Opciones disponibles:
agent Ejemplo:
"functionary-pt"
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Versión de configuración actual. Incrementada en cada actualización o retroceso.
Rango requerido:
x >= 1¿Esta página le ayudó?
⌘I