Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
agent = client.agents.get(agent_id="agent_abc123")
print(f"{agent.display_name} ({agent.version}) - model: {agent.llm_model}")
if agent.execution_policy and agent.execution_policy.datasources:
for ds_id, ds_view in agent.execution_policy.datasources.items():
print(f"datasource {ds_id} disabled: {ds_view.disabled}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const agent = await client.agents.get("agent_abc123");
console.log(`${agent.display_name} (${agent.version}): ${agent.llm_model}`);
console.log(`Tools: ${agent.tools.length}, Datasources: ${agent.datasources.join(", ")}`);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")))
agent, err := client.Agents.Get(context.Background(), "agent_abc123")
if err != nil {
panic(err)
}
fmt.Printf("%s (%s) - model: %s\n", agent.DisplayName, agent.Version, agent.LlmModel)
}curl --request GET \
--url https://api.meibel.ai/v2/agents/{agent_id} \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
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 => "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/{agent_id}")
.header("Meibel-API-Key", "<api-key>")
.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::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"display_name": "<string>",
"catalog_urn": "<string>",
"version": "<string>",
"type": "<string>",
"llm_model": "<string>",
"fallback_models": [
"<string>"
],
"datasources": [
"<string>"
],
"instructions": "<string>",
"tools": [
{}
],
"artifacts": [
"<string>"
],
"confidence_configs": [
"<string>"
],
"temperature": 123,
"tags": [
"<string>"
],
"parent_version": "<string>",
"description": "<string>",
"max_tokens": 123,
"icon": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"execution_policy": {
"datasources": {
"ds_abc123": {
"documents": {
"filter": {
"data_element.__id__": {
"$in": [
"de_abc",
"de_def"
]
}
}
},
"tables": {
"filter": {
"orders.region": {
"$eq": "EU"
},
"table.__name__": {
"$in": [
"orders",
"customers"
]
}
},
"hidden_columns": {
"customers": [
"ssn",
"credit_card"
]
}
}
},
"ds_xyz789": {
"disabled": true
}
},
"tools": {
"send_email": {
"variables": {
"max_attachments": {
"$lte": 3
},
"to": {
"$eq": "support@acme.com"
}
}
},
"web_search": {
"disabled": true
}
}
},
"execution_policy_ids": [
"<string>"
],
"last_execution_status": "<string>",
"last_execution_time": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Agents
Get Agent
GET
/
agents
/
{agent_id}
Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
agent = client.agents.get(agent_id="agent_abc123")
print(f"{agent.display_name} ({agent.version}) - model: {agent.llm_model}")
if agent.execution_policy and agent.execution_policy.datasources:
for ds_id, ds_view in agent.execution_policy.datasources.items():
print(f"datasource {ds_id} disabled: {ds_view.disabled}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const agent = await client.agents.get("agent_abc123");
console.log(`${agent.display_name} (${agent.version}): ${agent.llm_model}`);
console.log(`Tools: ${agent.tools.length}, Datasources: ${agent.datasources.join(", ")}`);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")))
agent, err := client.Agents.Get(context.Background(), "agent_abc123")
if err != nil {
panic(err)
}
fmt.Printf("%s (%s) - model: %s\n", agent.DisplayName, agent.Version, agent.LlmModel)
}curl --request GET \
--url https://api.meibel.ai/v2/agents/{agent_id} \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
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 => "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/{agent_id}")
.header("Meibel-API-Key", "<api-key>")
.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::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"display_name": "<string>",
"catalog_urn": "<string>",
"version": "<string>",
"type": "<string>",
"llm_model": "<string>",
"fallback_models": [
"<string>"
],
"datasources": [
"<string>"
],
"instructions": "<string>",
"tools": [
{}
],
"artifacts": [
"<string>"
],
"confidence_configs": [
"<string>"
],
"temperature": 123,
"tags": [
"<string>"
],
"parent_version": "<string>",
"description": "<string>",
"max_tokens": 123,
"icon": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"execution_policy": {
"datasources": {
"ds_abc123": {
"documents": {
"filter": {
"data_element.__id__": {
"$in": [
"de_abc",
"de_def"
]
}
}
},
"tables": {
"filter": {
"orders.region": {
"$eq": "EU"
},
"table.__name__": {
"$in": [
"orders",
"customers"
]
}
},
"hidden_columns": {
"customers": [
"ssn",
"credit_card"
]
}
}
},
"ds_xyz789": {
"disabled": true
}
},
"tools": {
"send_email": {
"variables": {
"max_attachments": {
"$lte": 3
},
"to": {
"$eq": "support@acme.com"
}
}
},
"web_search": {
"disabled": true
}
}
},
"execution_policy_ids": [
"<string>"
],
"last_execution_status": "<string>",
"last_execution_time": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Response
Successful Response
Execution policy applied to this agent's sessions.
Show child attributes
Show child attributes
Example:
{
"datasources": {
"ds_abc123": {
"documents": {
"filter": {
"data_element.__id__": { "$in": ["de_abc", "de_def"] }
}
},
"tables": {
"filter": {
"orders.region": { "$eq": "EU" },
"table.__name__": { "$in": ["orders", "customers"] }
},
"hidden_columns": { "customers": ["ssn", "credit_card"] }
}
},
"ds_xyz789": { "disabled": true }
},
"tools": {
"send_email": {
"variables": {
"max_attachments": { "$lte": 3 },
"to": { "$eq": "support@acme.com" }
}
},
"web_search": { "disabled": true }
}
}
Was this page helpful?
⌘I