using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string agentJobId = "YOUR_AGENT_JOB_ID"; // Replace with your agent job ID
string token = "YOUR_API_TOKEN"; // Replace with your API token
string url = $"https://api.roe-ai.com/v1/agents/jobs/{agentJobId}/result/";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
HttpResponseMessage response = await client.GetAsync(url);
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_version_id": "456e7890-e89b-12d3-a456-426614174001",
"inputs": [
{
"key": "input_text",
"value": "Hello world",
"data_type": "text/plain"
}
],
"input_tokens": 100,
"output_tokens": 50,
"outputs": [
{
"key": "output",
"description": "Output JSON data",
"data_type": "application/json",
"value": "{\"summary\": \"hello world!\"}",
"cost": 0.05
}
]
}Get agent job result data.
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string agentJobId = "YOUR_AGENT_JOB_ID"; // Replace with your agent job ID
string token = "YOUR_API_TOKEN"; // Replace with your API token
string url = $"https://api.roe-ai.com/v1/agents/jobs/{agentJobId}/result/";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
HttpResponseMessage response = await client.GetAsync(url);
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_version_id": "456e7890-e89b-12d3-a456-426614174001",
"inputs": [
{
"key": "input_text",
"value": "Hello world",
"data_type": "text/plain"
}
],
"input_tokens": 100,
"output_tokens": 50,
"outputs": [
{
"key": "output",
"description": "Output JSON data",
"data_type": "application/json",
"value": "{\"summary\": \"hello world!\"}",
"cost": 0.05
}
]
}Agent job result with outputs, inputs, tokens and metadata
The ID of the base agent
The ID of the agent version
The input data provided to the agent
Number of input tokens used
Number of output tokens generated
The output data from the agent
Show child attributes
The key of the output
The MIME data type of the output
The value of the output, serialized as a string
The description of the output
The cost of the agent job execution