Python
import os
from meibel import MeibelClient
from meibel.models import UpdateAgentDefinitionRequest
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
request = UpdateAgentDefinitionRequest(
display_name="Customer Support Agent",
instructions="You are a helpful customer support agent for Acme Corp.",
llm_model="gpt-4o",
temperature=0.3,
max_tokens=2048,
tags=["support", "production"],
)
response = client.agents.update("agent_abc123", request)
print(f"Updated agent {response.id}, version {response.version}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const updatedAgent = await client.agents.update("agent_abc123", {
display_name: "Support Assistant",
instructions: "You are a helpful customer support agent for Acme Corp. Be concise and friendly.",
llm_model: "gpt-4o",
temperature: 0.3,
max_tokens: 2048,
tools: [
{
name: "search_knowledge_base",
type: "rag_search",
description: "Search the support knowledge base for relevant articles",
config: { datasource_id: "ds_kb_9f8e7d6c" },
use_for: ["answering product questions", "troubleshooting steps"],
},
],
execution_policy: {
datasources: {
ds_kb_9f8e7d6c: {
documents: {
filter: { "data_element.__name__": { $nin: ["internal_notes.pdf"] } },
},
},
},
},
tags: ["support", "production"],
});
console.log(`Updated agent ${updatedAgent.id} to version ${updatedAgent.version}`);
console.log(`Catalog URN: ${updatedAgent.catalog_urn}`);package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
resp, err := client.Agents.Update(context.Background(), "agent_abc123", v2.UpdateAgentDefinitionRequest{
DisplayName: v2.String("Support Assistant"),
Instructions: v2.String("You are a helpful customer support agent for Acme Corp."),
LlmModel: v2.String("gpt-4o"),
Temperature: v2.Float64(0.3),
MaxTokens: v2.Int(2048),
Tools: []v2.AgentToolDefinition{
{
Name: "order_lookup",
Type: "database_query",
Description: v2.String("Look up order details by order ID"),
Config: map[string]any{
"datasource_id": "ds_orders_prod",
},
},
},
Tags: []string{"support", "production"},
})
if err != nil {
panic(err)
}
fmt.Printf("Updated agent %s to version %s\n", resp.ID, resp.Version)
}curl --request PUT \
--url https://api.meibel.ai/v2/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"display_name": "<string>",
"instructions": "<string>",
"type": "<string>",
"description": "<string>",
"llm_model": "<string>",
"fallback_models": [
"<string>"
],
"datasources": [
"<string>"
],
"tools": [
{
"name": "<string>",
"type": "<string>",
"description": "",
"config": {},
"parameters_schema": {},
"use_for": [
"<string>"
],
"avoid_for": [
"<string>"
],
"require_approval": false,
"approval_message": "<string>"
}
],
"artifacts": [
"<string>"
],
"confidence_configs": [
"<string>"
],
"temperature": 1,
"max_tokens": 123,
"tags": [
"<string>"
],
"icon": "<string>",
"execution_policy": {
"datasources": {},
"tools": {}
},
"execution_policy_ids": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
instructions: '<string>',
type: '<string>',
description: '<string>',
llm_model: '<string>',
fallback_models: ['<string>'],
datasources: ['<string>'],
tools: [
{
name: '<string>',
type: '<string>',
description: '',
config: {},
parameters_schema: {},
use_for: ['<string>'],
avoid_for: ['<string>'],
require_approval: false,
approval_message: '<string>'
}
],
artifacts: ['<string>'],
confidence_configs: ['<string>'],
temperature: 1,
max_tokens: 123,
tags: ['<string>'],
icon: '<string>',
execution_policy: {datasources: {}, tools: {}},
execution_policy_ids: ['<string>']
})
};
fetch('https://api.meibel.ai/v2/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://api.meibel.ai/v2/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'instructions' => '<string>',
'type' => '<string>',
'description' => '<string>',
'llm_model' => '<string>',
'fallback_models' => [
'<string>'
],
'datasources' => [
'<string>'
],
'tools' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '',
'config' => [
],
'parameters_schema' => [
],
'use_for' => [
'<string>'
],
'avoid_for' => [
'<string>'
],
'require_approval' => false,
'approval_message' => '<string>'
]
],
'artifacts' => [
'<string>'
],
'confidence_configs' => [
'<string>'
],
'temperature' => 1,
'max_tokens' => 123,
'tags' => [
'<string>'
],
'icon' => '<string>',
'execution_policy' => [
'datasources' => [
],
'tools' => [
]
],
'execution_policy_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.meibel.ai/v2/agents/{agent_id}")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"datasources\": [\n \"<string>\"\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters_schema\": {},\n \"use_for\": [\n \"<string>\"\n ],\n \"avoid_for\": [\n \"<string>\"\n ],\n \"require_approval\": false,\n \"approval_message\": \"<string>\"\n }\n ],\n \"artifacts\": [\n \"<string>\"\n ],\n \"confidence_configs\": [\n \"<string>\"\n ],\n \"temperature\": 1,\n \"max_tokens\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"icon\": \"<string>\",\n \"execution_policy\": {\n \"datasources\": {},\n \"tools\": {}\n },\n \"execution_policy_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"datasources\": [\n \"<string>\"\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters_schema\": {},\n \"use_for\": [\n \"<string>\"\n ],\n \"avoid_for\": [\n \"<string>\"\n ],\n \"require_approval\": false,\n \"approval_message\": \"<string>\"\n }\n ],\n \"artifacts\": [\n \"<string>\"\n ],\n \"confidence_configs\": [\n \"<string>\"\n ],\n \"temperature\": 1,\n \"max_tokens\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"icon\": \"<string>\",\n \"execution_policy\": {\n \"datasources\": {},\n \"tools\": {}\n },\n \"execution_policy_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"catalog_urn": "<string>",
"version": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Agents
Update Agent
PUT
/
agents
/
{agent_id}
Python
import os
from meibel import MeibelClient
from meibel.models import UpdateAgentDefinitionRequest
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
request = UpdateAgentDefinitionRequest(
display_name="Customer Support Agent",
instructions="You are a helpful customer support agent for Acme Corp.",
llm_model="gpt-4o",
temperature=0.3,
max_tokens=2048,
tags=["support", "production"],
)
response = client.agents.update("agent_abc123", request)
print(f"Updated agent {response.id}, version {response.version}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const updatedAgent = await client.agents.update("agent_abc123", {
display_name: "Support Assistant",
instructions: "You are a helpful customer support agent for Acme Corp. Be concise and friendly.",
llm_model: "gpt-4o",
temperature: 0.3,
max_tokens: 2048,
tools: [
{
name: "search_knowledge_base",
type: "rag_search",
description: "Search the support knowledge base for relevant articles",
config: { datasource_id: "ds_kb_9f8e7d6c" },
use_for: ["answering product questions", "troubleshooting steps"],
},
],
execution_policy: {
datasources: {
ds_kb_9f8e7d6c: {
documents: {
filter: { "data_element.__name__": { $nin: ["internal_notes.pdf"] } },
},
},
},
},
tags: ["support", "production"],
});
console.log(`Updated agent ${updatedAgent.id} to version ${updatedAgent.version}`);
console.log(`Catalog URN: ${updatedAgent.catalog_urn}`);package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
resp, err := client.Agents.Update(context.Background(), "agent_abc123", v2.UpdateAgentDefinitionRequest{
DisplayName: v2.String("Support Assistant"),
Instructions: v2.String("You are a helpful customer support agent for Acme Corp."),
LlmModel: v2.String("gpt-4o"),
Temperature: v2.Float64(0.3),
MaxTokens: v2.Int(2048),
Tools: []v2.AgentToolDefinition{
{
Name: "order_lookup",
Type: "database_query",
Description: v2.String("Look up order details by order ID"),
Config: map[string]any{
"datasource_id": "ds_orders_prod",
},
},
},
Tags: []string{"support", "production"},
})
if err != nil {
panic(err)
}
fmt.Printf("Updated agent %s to version %s\n", resp.ID, resp.Version)
}curl --request PUT \
--url https://api.meibel.ai/v2/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"display_name": "<string>",
"instructions": "<string>",
"type": "<string>",
"description": "<string>",
"llm_model": "<string>",
"fallback_models": [
"<string>"
],
"datasources": [
"<string>"
],
"tools": [
{
"name": "<string>",
"type": "<string>",
"description": "",
"config": {},
"parameters_schema": {},
"use_for": [
"<string>"
],
"avoid_for": [
"<string>"
],
"require_approval": false,
"approval_message": "<string>"
}
],
"artifacts": [
"<string>"
],
"confidence_configs": [
"<string>"
],
"temperature": 1,
"max_tokens": 123,
"tags": [
"<string>"
],
"icon": "<string>",
"execution_policy": {
"datasources": {},
"tools": {}
},
"execution_policy_ids": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
instructions: '<string>',
type: '<string>',
description: '<string>',
llm_model: '<string>',
fallback_models: ['<string>'],
datasources: ['<string>'],
tools: [
{
name: '<string>',
type: '<string>',
description: '',
config: {},
parameters_schema: {},
use_for: ['<string>'],
avoid_for: ['<string>'],
require_approval: false,
approval_message: '<string>'
}
],
artifacts: ['<string>'],
confidence_configs: ['<string>'],
temperature: 1,
max_tokens: 123,
tags: ['<string>'],
icon: '<string>',
execution_policy: {datasources: {}, tools: {}},
execution_policy_ids: ['<string>']
})
};
fetch('https://api.meibel.ai/v2/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://api.meibel.ai/v2/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'instructions' => '<string>',
'type' => '<string>',
'description' => '<string>',
'llm_model' => '<string>',
'fallback_models' => [
'<string>'
],
'datasources' => [
'<string>'
],
'tools' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '',
'config' => [
],
'parameters_schema' => [
],
'use_for' => [
'<string>'
],
'avoid_for' => [
'<string>'
],
'require_approval' => false,
'approval_message' => '<string>'
]
],
'artifacts' => [
'<string>'
],
'confidence_configs' => [
'<string>'
],
'temperature' => 1,
'max_tokens' => 123,
'tags' => [
'<string>'
],
'icon' => '<string>',
'execution_policy' => [
'datasources' => [
],
'tools' => [
]
],
'execution_policy_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.meibel.ai/v2/agents/{agent_id}")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"datasources\": [\n \"<string>\"\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters_schema\": {},\n \"use_for\": [\n \"<string>\"\n ],\n \"avoid_for\": [\n \"<string>\"\n ],\n \"require_approval\": false,\n \"approval_message\": \"<string>\"\n }\n ],\n \"artifacts\": [\n \"<string>\"\n ],\n \"confidence_configs\": [\n \"<string>\"\n ],\n \"temperature\": 1,\n \"max_tokens\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"icon\": \"<string>\",\n \"execution_policy\": {\n \"datasources\": {},\n \"tools\": {}\n },\n \"execution_policy_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"datasources\": [\n \"<string>\"\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters_schema\": {},\n \"use_for\": [\n \"<string>\"\n ],\n \"avoid_for\": [\n \"<string>\"\n ],\n \"require_approval\": false,\n \"approval_message\": \"<string>\"\n }\n ],\n \"artifacts\": [\n \"<string>\"\n ],\n \"confidence_configs\": [\n \"<string>\"\n ],\n \"temperature\": 1,\n \"max_tokens\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"icon\": \"<string>\",\n \"execution_policy\": {\n \"datasources\": {},\n \"tools\": {}\n },\n \"execution_policy_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"catalog_urn": "<string>",
"version": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
application/json
Request model for updating an agent definition. Name is intentionally excluded as it serves as the stable identifier for a version chain and cannot be changed.
Human-readable name of the agent
System prompt/instructions
Agent type
Description of the agent
LLM model to use
List of fallback models
Datasource IDs the agent has access to
Tools configuration
Show child attributes
Show child attributes
Catalog URNs of artifacts the agent produces
Confidence scoring module names to apply during execution
LLM temperature
Required range:
0 <= x <= 2Maximum tokens in response
Tags for categorization
UI icon identifier
Inline execution policy constraints (datasources, tools)
Show child attributes
Show child attributes
IDs of stored ExecutionPolicies to compose
Was this page helpful?
⌘I