import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.agents.createAgent({
createAgentRequest: {
name: "release-research-agent",
description: "Looks up current release information before answering.",
model: "functionary-pt",
instructions: "Use web search when the question depends on current external information.",
tools: [
{
type: "web_search",
searchContextSize: "medium",
},
],
toolChoice: "auto",
},
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Agents.CreateAgentAsync(body: new MeetKai.MKA1.Types.Components.CreateAgentRequest() {
Name = "release-research-agent",
Description = "Looks up current release information before answering.",
Model = "functionary-pt",
Instructions = "Use web search when the question depends on current external information.",
Tools = new List<ToolDefinitionUnion>() {
ToolDefinitionUnion.CreateToolDefinition1(
new ToolDefinition1() {
Type = ToolDefinitionType1.WebSearch,
SearchContextSize = ToolDefinitionSearchContextSize.Medium,
}
),
},
ToolChoice = "auto",
});
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agents.create_agent(name="release-research-agent", model="functionary-pt", description="Looks up current release information before answering.", instructions="Use web search when the question depends on current external information.", tools=[
{
"type": "web_search",
"search_context_size": "medium",
},
], tool_choice="auto", parallel_tool_calls=True)
# Handle response
print(res)curl --request POST \
--url https://apigw.mka1.com/api/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "release-research-agent",
"description": "Verifica informações sobre lançamentos atuais antes de responder.",
"model": "functionary-pt",
"instructions": "Use web search when the question depends on current external information.",
"tools": [
{
"type": "web_search",
"search_context_size": "medium"
}
],
"tool_choice": "auto",
"parallel_tool_calls": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'release-research-agent',
description: 'Verifica informações sobre lançamentos atuais antes de responder.',
model: 'functionary-pt',
instructions: 'Use web search when the question depends on current external information.',
tools: [{type: 'web_search', search_context_size: 'medium'}],
tool_choice: 'auto',
parallel_tool_calls: true
})
};
fetch('https://apigw.mka1.com/api/v1/agents', 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",
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' => 'release-research-agent',
'description' => 'Verifica informações sobre lançamentos atuais antes de responder.',
'model' => 'functionary-pt',
'instructions' => 'Use web search when the question depends on current external information.',
'tools' => [
[
'type' => 'web_search',
'search_context_size' => 'medium'
]
],
'tool_choice' => 'auto',
'parallel_tool_calls' => true
]),
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"
payload := strings.NewReader("{\n \"name\": \"release-research-agent\",\n \"description\": \"Verifica informações sobre lançamentos atuais antes de responder.\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"Use web search when the question depends on current external information.\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"search_context_size\": \"medium\"\n }\n ],\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"release-research-agent\",\n \"description\": \"Verifica informações sobre lançamentos atuais antes de responder.\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"Use web search when the question depends on current external information.\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"search_context_size\": \"medium\"\n }\n ],\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/agents")
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\": \"release-research-agent\",\n \"description\": \"Verifica informações sobre lançamentos atuais antes de responder.\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"Use web search when the question depends on current external information.\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"search_context_size\": \"medium\"\n }\n ],\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}"
response = http.request(request)
puts response.read_body{
"object": "agent",
"id": "<string>",
"name": "<string>",
"description": "<string>",
"model": "functionary-pt",
"instructions": "<string>",
"tools": [
{
"type": "web_search",
"search_context_size": "low",
"user_location": {
"type": "approximate",
"city": "<string>",
"country": "<string>",
"region": "<string>",
"timezone": "<string>"
},
"filters": {
"allowed_domains": [
"<string>"
]
}
}
],
"tool_choice": "<unknown>",
"parallel_tool_calls": true,
"max_tool_calls": 123,
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"reasoning": {
"effort": "low"
},
"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": "<unknown>"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>"
}
}Criar um agente
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.agents.createAgent({
createAgentRequest: {
name: "release-research-agent",
description: "Looks up current release information before answering.",
model: "functionary-pt",
instructions: "Use web search when the question depends on current external information.",
tools: [
{
type: "web_search",
searchContextSize: "medium",
},
],
toolChoice: "auto",
},
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Agents.CreateAgentAsync(body: new MeetKai.MKA1.Types.Components.CreateAgentRequest() {
Name = "release-research-agent",
Description = "Looks up current release information before answering.",
Model = "functionary-pt",
Instructions = "Use web search when the question depends on current external information.",
Tools = new List<ToolDefinitionUnion>() {
ToolDefinitionUnion.CreateToolDefinition1(
new ToolDefinition1() {
Type = ToolDefinitionType1.WebSearch,
SearchContextSize = ToolDefinitionSearchContextSize.Medium,
}
),
},
ToolChoice = "auto",
});
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agents.create_agent(name="release-research-agent", model="functionary-pt", description="Looks up current release information before answering.", instructions="Use web search when the question depends on current external information.", tools=[
{
"type": "web_search",
"search_context_size": "medium",
},
], tool_choice="auto", parallel_tool_calls=True)
# Handle response
print(res)curl --request POST \
--url https://apigw.mka1.com/api/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "release-research-agent",
"description": "Verifica informações sobre lançamentos atuais antes de responder.",
"model": "functionary-pt",
"instructions": "Use web search when the question depends on current external information.",
"tools": [
{
"type": "web_search",
"search_context_size": "medium"
}
],
"tool_choice": "auto",
"parallel_tool_calls": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'release-research-agent',
description: 'Verifica informações sobre lançamentos atuais antes de responder.',
model: 'functionary-pt',
instructions: 'Use web search when the question depends on current external information.',
tools: [{type: 'web_search', search_context_size: 'medium'}],
tool_choice: 'auto',
parallel_tool_calls: true
})
};
fetch('https://apigw.mka1.com/api/v1/agents', 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",
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' => 'release-research-agent',
'description' => 'Verifica informações sobre lançamentos atuais antes de responder.',
'model' => 'functionary-pt',
'instructions' => 'Use web search when the question depends on current external information.',
'tools' => [
[
'type' => 'web_search',
'search_context_size' => 'medium'
]
],
'tool_choice' => 'auto',
'parallel_tool_calls' => true
]),
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"
payload := strings.NewReader("{\n \"name\": \"release-research-agent\",\n \"description\": \"Verifica informações sobre lançamentos atuais antes de responder.\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"Use web search when the question depends on current external information.\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"search_context_size\": \"medium\"\n }\n ],\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"release-research-agent\",\n \"description\": \"Verifica informações sobre lançamentos atuais antes de responder.\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"Use web search when the question depends on current external information.\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"search_context_size\": \"medium\"\n }\n ],\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/agents")
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\": \"release-research-agent\",\n \"description\": \"Verifica informações sobre lançamentos atuais antes de responder.\",\n \"model\": \"functionary-pt\",\n \"instructions\": \"Use web search when the question depends on current external information.\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"search_context_size\": \"medium\"\n }\n ],\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}"
response = http.request(request)
puts response.read_body{
"object": "agent",
"id": "<string>",
"name": "<string>",
"description": "<string>",
"model": "functionary-pt",
"instructions": "<string>",
"tools": [
{
"type": "web_search",
"search_context_size": "low",
"user_location": {
"type": "approximate",
"city": "<string>",
"country": "<string>",
"region": "<string>",
"timezone": "<string>"
},
"filters": {
"allowed_domains": [
"<string>"
]
}
}
],
"tool_choice": "<unknown>",
"parallel_tool_calls": true,
"max_tool_calls": 123,
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"reasoning": {
"effort": "low"
},
"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": "<unknown>"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>"
}
}Autorizações
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>.
Cabeçalhos
Optional external end-user identifier forwarded by the API gateway.
Corpo
1 - 1201"functionary-pt"
200020000Configuração da ferramenta para criação ou atualização de agente. Shell container_auto aceita network_policy com tipo 'allowlist' e até 256 allowed_domains (nomes de host DNS); uma lista vazia ou omitida nega todos os hosts externos. Isso restringe ainda mais as políticas do locatário e do operador. Segredos de domínio, campos de política desconhecidos e a alteração de uma política container_reference são rejeitados. computer_use_preview não é suportado. Respostas históricas de agentes e versões mantêm seus campos de ferramenta originais.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
Valor JSON arbitrário.
1 <= x <= 300Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Resposta
Agente criado.
agent "functionary-pt"
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
Valor JSON arbitrário.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Versão da configuração atual. Incrementada a cada atualização ou reversão.
x >= 1Esta página foi útil?