Python
import os
from meibel import MeibelClient
from meibel.models import CreateAgentArtifactRequest
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
request = CreateAgentArtifactRequest(
display_name="Customer Support Summary",
type="json",
description="Structured summary of a customer support interaction",
required=True,
schema_def={
"type": "object",
"properties": {
"issue_category": {"type": "string"},
"resolution": {"type": "string"},
"satisfaction_score": {"type": "integer"},
},
"required": ["issue_category", "resolution"],
},
max_size_bytes=1048576,
storage_strategy="auto",
)
response = client.artifact_schemas.create(request)
print(f"Created artifact schema {response.id} ({response.display_name} v{response.version})")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const artifactSchema = await client.artifactSchemas.create({
display_name: "Customer Support Ticket",
type: "json",
description: "Structured summary of a resolved customer support ticket",
required: true,
schema_def: {
type: "object",
properties: {
ticket_id: { type: "string" },
resolution_summary: { type: "string" },
customer_satisfaction: { type: "integer", minimum: 1, maximum: 5 },
},
required: ["ticket_id", "resolution_summary"],
},
max_size_bytes: 65536,
storage_strategy: "auto",
});
console.log(`${artifactSchema.display_name} (${artifactSchema.id}) v${artifactSchema.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")))
schema, err := client.ArtifactSchemas.Create(context.Background(), v2.CreateAgentArtifactRequest{
DisplayName: "Customer Support Summary",
Type: v2.ArtifactTypeJSON,
Description: v2.String("Summary artifact produced after a support conversation"),
Required: v2.Bool(true),
SchemaDef: map[string]any{
"type": "object",
"properties": map[string]any{
"summary": map[string]any{"type": "string"},
"resolved": map[string]any{"type": "boolean"},
},
"required": []string{"summary", "resolved"},
},
MaxSizeBytes: v2.Int(1048576),
StorageStrategy: v2.ArtifactStorageStrategyAuto,
})
if err != nil {
fmt.Println("error creating artifact schema:", err)
return
}
fmt.Printf("Created artifact schema %s (%s) version %s\n", schema.DisplayName, schema.ID, schema.Version)
}curl --request POST \
--url https://api.meibel.ai/v2/artifact-schemas \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"display_name": "<string>",
"schema_def": {},
"description": "",
"required": false,
"max_size_bytes": 123,
"additional_properties": {}
}
'const options = {
method: 'POST',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
schema_def: {},
description: '',
required: false,
max_size_bytes: 123,
additional_properties: {}
})
};
fetch('https://api.meibel.ai/v2/artifact-schemas', 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",
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([
'display_name' => '<string>',
'schema_def' => [
],
'description' => '',
'required' => false,
'max_size_bytes' => 123,
'additional_properties' => [
]
]),
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.post("https://api.meibel.ai/v2/artifact-schemas")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"schema_def\": {},\n \"description\": \"\",\n \"required\": false,\n \"max_size_bytes\": 123,\n \"additional_properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/artifact-schemas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"schema_def\": {},\n \"description\": \"\",\n \"required\": false,\n \"max_size_bytes\": 123,\n \"additional_properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"display_name": "<string>",
"version": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Artifact schemas
Create Artifact Schema
POST
/
artifact-schemas
Python
import os
from meibel import MeibelClient
from meibel.models import CreateAgentArtifactRequest
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
request = CreateAgentArtifactRequest(
display_name="Customer Support Summary",
type="json",
description="Structured summary of a customer support interaction",
required=True,
schema_def={
"type": "object",
"properties": {
"issue_category": {"type": "string"},
"resolution": {"type": "string"},
"satisfaction_score": {"type": "integer"},
},
"required": ["issue_category", "resolution"],
},
max_size_bytes=1048576,
storage_strategy="auto",
)
response = client.artifact_schemas.create(request)
print(f"Created artifact schema {response.id} ({response.display_name} v{response.version})")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const artifactSchema = await client.artifactSchemas.create({
display_name: "Customer Support Ticket",
type: "json",
description: "Structured summary of a resolved customer support ticket",
required: true,
schema_def: {
type: "object",
properties: {
ticket_id: { type: "string" },
resolution_summary: { type: "string" },
customer_satisfaction: { type: "integer", minimum: 1, maximum: 5 },
},
required: ["ticket_id", "resolution_summary"],
},
max_size_bytes: 65536,
storage_strategy: "auto",
});
console.log(`${artifactSchema.display_name} (${artifactSchema.id}) v${artifactSchema.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")))
schema, err := client.ArtifactSchemas.Create(context.Background(), v2.CreateAgentArtifactRequest{
DisplayName: "Customer Support Summary",
Type: v2.ArtifactTypeJSON,
Description: v2.String("Summary artifact produced after a support conversation"),
Required: v2.Bool(true),
SchemaDef: map[string]any{
"type": "object",
"properties": map[string]any{
"summary": map[string]any{"type": "string"},
"resolved": map[string]any{"type": "boolean"},
},
"required": []string{"summary", "resolved"},
},
MaxSizeBytes: v2.Int(1048576),
StorageStrategy: v2.ArtifactStorageStrategyAuto,
})
if err != nil {
fmt.Println("error creating artifact schema:", err)
return
}
fmt.Printf("Created artifact schema %s (%s) version %s\n", schema.DisplayName, schema.ID, schema.Version)
}curl --request POST \
--url https://api.meibel.ai/v2/artifact-schemas \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"display_name": "<string>",
"schema_def": {},
"description": "",
"required": false,
"max_size_bytes": 123,
"additional_properties": {}
}
'const options = {
method: 'POST',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
schema_def: {},
description: '',
required: false,
max_size_bytes: 123,
additional_properties: {}
})
};
fetch('https://api.meibel.ai/v2/artifact-schemas', 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",
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([
'display_name' => '<string>',
'schema_def' => [
],
'description' => '',
'required' => false,
'max_size_bytes' => 123,
'additional_properties' => [
]
]),
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.post("https://api.meibel.ai/v2/artifact-schemas")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"schema_def\": {},\n \"description\": \"\",\n \"required\": false,\n \"max_size_bytes\": 123,\n \"additional_properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/artifact-schemas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"schema_def\": {},\n \"description\": \"\",\n \"required\": false,\n \"max_size_bytes\": 123,\n \"additional_properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"display_name": "<string>",
"version": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
Request model for creating a new agent artifact.
Human-readable name of the artifact (letters, numbers, and spaces only). Converted to kebab-case internally.
Artifact type (json, markdown, csv, yaml, text, html, pdf)
Available options:
json, markdown, csv, yaml, text, html, pdf Schema definition
Description of the artifact
Whether agent must produce this artifact
Maximum artifact size in bytes
Storage strategy (inline, gcs, auto)
Available options:
inline, gcs, auto Was this page helpful?
⌘I