Python
import os
from meibel import MeibelClient
from meibel.models import UpdateAgentArtifactRequest
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
request = UpdateAgentArtifactRequest(
display_name="Customer Summary Report",
type="markdown",
description="Summary of customer interactions generated by the support agent",
required=True,
max_size_bytes=5_242_880,
storage_strategy="auto",
)
response = client.artifact_schemas.update(
"artifact_9f8c2a1b",
body=request,
)
print(f"Updated artifact {response.id} to version {response.version}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const updatedSchema = await client.artifactSchemas.update({
artifact_id: "artifact_8f3c1a2b",
display_name: "Customer Support Summary",
type: "markdown",
description: "Summary of the customer support interaction and resolution",
required: true,
max_size_bytes: 524288,
storage_strategy: "auto",
});
console.log(`${updatedSchema.id} updated to version ${updatedSchema.version}`);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.ArtifactSchemas.Update(
context.Background(),
"artifact_9f8a3c2b",
v2.UpdateAgentArtifactRequest{
DisplayName: v2.String("Customer Support Summary"),
Type: v2.ArtifactTypeMarkdown.Ptr(),
Description: v2.String("Summary of the customer support interaction, including resolution status"),
Required: v2.Bool(true),
MaxSizeBytes: v2.Int(524288),
StorageStrategy: v2.ArtifactStorageStrategyAuto.Ptr(),
},
)
if err != nil {
panic(err)
}
fmt.Printf("Updated artifact schema %s to version %s\n", resp.ID, resp.Version)
}curl --request PUT \
--url https://api.meibel.ai/v2/artifact-schemas/{artifact_id} \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"display_name": "<string>",
"description": "<string>",
"required": true,
"schema_def": {},
"max_size_bytes": 123
}
'const options = {
method: 'PUT',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
description: '<string>',
required: true,
schema_def: {},
max_size_bytes: 123
})
};
fetch('https://api.meibel.ai/v2/artifact-schemas/{artifact_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/artifact-schemas/{artifact_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>',
'description' => '<string>',
'required' => true,
'schema_def' => [
],
'max_size_bytes' => 123
]),
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/artifact-schemas/{artifact_id}")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"schema_def\": {},\n \"max_size_bytes\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/artifact-schemas/{artifact_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 \"description\": \"<string>\",\n \"required\": true,\n \"schema_def\": {},\n \"max_size_bytes\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"version": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Artifact schemas
Update Artifact Schema
PUT
/
artifact-schemas
/
{artifact_id}
Python
import os
from meibel import MeibelClient
from meibel.models import UpdateAgentArtifactRequest
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
request = UpdateAgentArtifactRequest(
display_name="Customer Summary Report",
type="markdown",
description="Summary of customer interactions generated by the support agent",
required=True,
max_size_bytes=5_242_880,
storage_strategy="auto",
)
response = client.artifact_schemas.update(
"artifact_9f8c2a1b",
body=request,
)
print(f"Updated artifact {response.id} to version {response.version}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const updatedSchema = await client.artifactSchemas.update({
artifact_id: "artifact_8f3c1a2b",
display_name: "Customer Support Summary",
type: "markdown",
description: "Summary of the customer support interaction and resolution",
required: true,
max_size_bytes: 524288,
storage_strategy: "auto",
});
console.log(`${updatedSchema.id} updated to version ${updatedSchema.version}`);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.ArtifactSchemas.Update(
context.Background(),
"artifact_9f8a3c2b",
v2.UpdateAgentArtifactRequest{
DisplayName: v2.String("Customer Support Summary"),
Type: v2.ArtifactTypeMarkdown.Ptr(),
Description: v2.String("Summary of the customer support interaction, including resolution status"),
Required: v2.Bool(true),
MaxSizeBytes: v2.Int(524288),
StorageStrategy: v2.ArtifactStorageStrategyAuto.Ptr(),
},
)
if err != nil {
panic(err)
}
fmt.Printf("Updated artifact schema %s to version %s\n", resp.ID, resp.Version)
}curl --request PUT \
--url https://api.meibel.ai/v2/artifact-schemas/{artifact_id} \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"display_name": "<string>",
"description": "<string>",
"required": true,
"schema_def": {},
"max_size_bytes": 123
}
'const options = {
method: 'PUT',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
description: '<string>',
required: true,
schema_def: {},
max_size_bytes: 123
})
};
fetch('https://api.meibel.ai/v2/artifact-schemas/{artifact_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/artifact-schemas/{artifact_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>',
'description' => '<string>',
'required' => true,
'schema_def' => [
],
'max_size_bytes' => 123
]),
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/artifact-schemas/{artifact_id}")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"schema_def\": {},\n \"max_size_bytes\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/artifact-schemas/{artifact_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 \"description\": \"<string>\",\n \"required\": true,\n \"schema_def\": {},\n \"max_size_bytes\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<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 artifact. Name is intentionally excluded as it serves as the stable identifier for a version chain and cannot be changed.
Human-readable name of the artifact
Artifact type
Available options:
json, markdown, csv, yaml, text, html, pdf Description of the artifact
Whether agent must produce this artifact
Optional override for the tool's parameters schema
Maximum artifact size in bytes
Storage strategy
Available options:
inline, gcs, auto Was this page helpful?
⌘I