Python
import os
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"),
)
run = client.agents.runs.retrieve(
agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
run_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
verbose=False,
)
print(run)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 run = await client.agents.runs.retrieve('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
agent_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
verbose: false,
});
console.log(run);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()
.runs()
.retrieve(
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
"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.runs.retrieve(
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
agentID: "7c9e6679-7425-40de-944b-e07fc1f90ae7"
)
print(response)curl --request GET \
--url https://api.tryprofound.com/v1/agents/{agent_id}/runs/{run_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}/runs/{run_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}/runs/{run_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}/runs/{run_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}/runs/{run_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/agents/{agent_id}/runs/{run_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",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"error": {},
"outputs": {},
"outputs_expanded": {},
"steps": [
{
"node_id": "<string>",
"node_type": "<string>",
"title": "<string>",
"status": "<string>",
"elapsed_time": 123,
"finished_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"outputs": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Agents
Get an agent run
Retrieve the current status and result details for an agent run.
GET
/
v1
/
agents
/
{agent_id}
/
runs
/
{run_id}
Python
import os
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"),
)
run = client.agents.runs.retrieve(
agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
run_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
verbose=False,
)
print(run)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 run = await client.agents.runs.retrieve('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
agent_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
verbose: false,
});
console.log(run);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()
.runs()
.retrieve(
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
"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.runs.retrieve(
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
agentID: "7c9e6679-7425-40de-944b-e07fc1f90ae7"
)
print(response)curl --request GET \
--url https://api.tryprofound.com/v1/agents/{agent_id}/runs/{run_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}/runs/{run_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}/runs/{run_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}/runs/{run_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}/runs/{run_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/agents/{agent_id}/runs/{run_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",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"error": {},
"outputs": {},
"outputs_expanded": {},
"steps": [
{
"node_id": "<string>",
"node_type": "<string>",
"title": "<string>",
"status": "<string>",
"elapsed_time": 123,
"finished_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"outputs": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Query Parameters
Response
Successful Response
Status and result details for an agent run.
Expanded form of outputs, keyed by the same output-variable UUIDs. Each entry carries the agent's configured human-readable key as title alongside the returned value. title is null when the agent has no configured key for that output. Entries preserve the key order of outputs. The UUID-keyed outputs field remains the stable compatibility field.
Show child attributes
Show child attributes
Was this page helpful?