Retrieve an agent environment
EnvironmentInfo beta().agents().environments().retrieve(EnvironmentRetrieveParamsparams = EnvironmentRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/agents/environments/{environment_id}
Retrieves an execution environment’s connection status and safe installed metadata. See environment lifecycle.
Retrieve an agent environment
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.beta.agents.environments.EnvironmentInfo;
import com.openai.models.beta.agents.environments.EnvironmentRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
EnvironmentInfo environmentInfo = client.beta().agents().environments().retrieve("environment_id");
}
}{
"id": "id",
"files": [
{
"id": "id",
"file_id": "file_id",
"path": "path",
"size_bytes": 0,
"type": "file_id"
}
],
"object": "agent.environment",
"plugins": [
{
"description": "description",
"name": "name",
"type": "inline"
}
],
"skills": [
{
"description": "description",
"name": "name",
"skill_id": "skill_id",
"type": "skill_reference",
"version": "version"
}
],
"status": "pending",
"type": "openai_hosted"
}Returns Examples
{
"id": "id",
"files": [
{
"id": "id",
"file_id": "file_id",
"path": "path",
"size_bytes": 0,
"type": "file_id"
}
],
"object": "agent.environment",
"plugins": [
{
"description": "description",
"name": "name",
"type": "inline"
}
],
"skills": [
{
"description": "description",
"name": "name",
"skill_id": "skill_id",
"type": "skill_reference",
"version": "version"
}
],
"status": "pending",
"type": "openai_hosted"
}