Python
import os
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"),
)
agent = client.agents.retrieve(
agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
version="published",
)
print(agent)import Profound from '@profoundai/client';
const client = new Profound({
apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
environment: 'production',
});
const agent = await client.agents.retrieve('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
version: 'published',
});
console.log(agent);use profound::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = ProfoundClient::builder()
.api_key(std::env::var("PROFOUND_API_KEY")?)
.build()?;
let response = client
.agents()
.retrieve("7c9e6679-7425-40de-944b-e07fc1f90ae7")
.send()
.await?;
println!("{:?}", response);
Ok(())
}import Foundation
import Profound
let client = ProfoundClient(
apiKey: ProcessInfo.processInfo.environment["PROFOUND_API_KEY"]
)
let response = try await client.agents.retrieve("7c9e6679-7425-40de-944b-e07fc1f90ae7")
print(response)curl --request GET \
--url https://api.tryprofound.com/v1/agents/{agent_id} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tryprofound.com/v1/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.tryprofound.com/v1/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 => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tryprofound.com/v1/agents/{agent_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryprofound.com/v1/agents/{agent_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"schema": {
"input": {},
"output": {}
},
"validation": {
"valid": true,
"issues": [
{
"code": "<string>",
"message": "<string>",
"node_id": "<string>",
"node_title": "<string>",
"field": "<string>",
"field_title": "<string>",
"violation": "<string>"
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Agents
Get an agent
Retrieve an agent and its schema details.
Agents can have both a live published version and a draft version with newer
unpublished changes. Use the version parameter to choose which state to return.
GET
/
v1
/
agents
/
{agent_id}
Python
import os
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"),
)
agent = client.agents.retrieve(
agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
version="published",
)
print(agent)import Profound from '@profoundai/client';
const client = new Profound({
apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
environment: 'production',
});
const agent = await client.agents.retrieve('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
version: 'published',
});
console.log(agent);use profound::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = ProfoundClient::builder()
.api_key(std::env::var("PROFOUND_API_KEY")?)
.build()?;
let response = client
.agents()
.retrieve("7c9e6679-7425-40de-944b-e07fc1f90ae7")
.send()
.await?;
println!("{:?}", response);
Ok(())
}import Foundation
import Profound
let client = ProfoundClient(
apiKey: ProcessInfo.processInfo.environment["PROFOUND_API_KEY"]
)
let response = try await client.agents.retrieve("7c9e6679-7425-40de-944b-e07fc1f90ae7")
print(response)curl --request GET \
--url https://api.tryprofound.com/v1/agents/{agent_id} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tryprofound.com/v1/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.tryprofound.com/v1/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 => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tryprofound.com/v1/agents/{agent_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryprofound.com/v1/agents/{agent_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"schema": {
"input": {},
"output": {}
},
"validation": {
"valid": true,
"issues": [
{
"code": "<string>",
"message": "<string>",
"node_id": "<string>",
"node_title": "<string>",
"field": "<string>",
"field_title": "<string>",
"violation": "<string>"
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Query Parameters
Response
Successful Response
Detailed information for an agent.
Was this page helpful?