Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
for agent in client.agents.list():
print(f"{agent.name} (v{agent.version}) - {agent.type}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
for await (const agent of client.agents.list()) {
console.log(`${agent.id}: ${agent.display_name} (v${agent.version}, ${agent.type})`);
}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")))
iter := client.Agents.List(context.Background(), v2.AgentListParams{})
for iter.Next() {
agent := iter.Current()
fmt.Printf("%s (%s) - %s\n", agent.DisplayName, agent.Version, agent.Type)
}
if err := iter.Err(); err != nil {
panic(err)
}
}curl --request GET \
--url https://api.meibel.ai/v2/agents \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/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://api.meibel.ai/v2/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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.get("https://api.meibel.ai/v2/agents")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"name": "<string>",
"display_name": "<string>",
"version": "<string>",
"type": "<string>",
"llm_model": "<string>",
"tool_count": 123,
"datasource_count": 123,
"description": "<string>",
"last_execution_status": "<string>",
"last_execution_time": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"offset": 123,
"limit": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Agents
List Agents
GET
/
agents
Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
for agent in client.agents.list():
print(f"{agent.name} (v{agent.version}) - {agent.type}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
for await (const agent of client.agents.list()) {
console.log(`${agent.id}: ${agent.display_name} (v${agent.version}, ${agent.type})`);
}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")))
iter := client.Agents.List(context.Background(), v2.AgentListParams{})
for iter.Next() {
agent := iter.Current()
fmt.Printf("%s (%s) - %s\n", agent.DisplayName, agent.Version, agent.Type)
}
if err := iter.Err(); err != nil {
panic(err)
}
}curl --request GET \
--url https://api.meibel.ai/v2/agents \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/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://api.meibel.ai/v2/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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.get("https://api.meibel.ai/v2/agents")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"name": "<string>",
"display_name": "<string>",
"version": "<string>",
"type": "<string>",
"llm_model": "<string>",
"tool_count": 123,
"datasource_count": 123,
"description": "<string>",
"last_execution_status": "<string>",
"last_execution_time": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"offset": 123,
"limit": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Query Parameters
Number of items to skip
Required range:
x >= 0Maximum number of items to return
Required range:
x >= 1Field to sort by: created_at, name, display_name
Sort order: asc or desc
Pattern:
^(asc|desc)$If true, return only published agents (latest published version per name)
Return only agents whose latest version uses this datasource ID
Return only agents whose latest version produces this artifact (catalog URN)
Was this page helpful?
⌘I