Environments
Delete an environment
Delete an environment from your catalog.
DELETE
/
api
/
v2
/
environments
/
{id}
from hai_agents import Client
client = Client()
client.environments.delete_environment("wide-browser")
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
await client.environments.deleteEnvironment({ id: "wide-browser" });
curl -X DELETE https://agp.eu.hcompany.ai/api/v2/environments/wide-browser \
-H "Authorization: Bearer $HAI_API_KEY"
Behavior
Running sessions are unaffected. New sessions and agents can’t reference it.Path parameters
string
required
The environment’s
id, for example wide-browser or myorg/wide-browser.Response
204 No Content.
from hai_agents import Client
client = Client()
client.environments.delete_environment("wide-browser")
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
await client.environments.deleteEnvironment({ id: "wide-browser" });
curl -X DELETE https://agp.eu.hcompany.ai/api/v2/environments/wide-browser \
-H "Authorization: Bearer $HAI_API_KEY"
Errors
| Status | Cause |
|---|---|
403 | The environment is reserved (h/) and read-only. |
404 | Not found, or not in your organization. |
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
client.environments.delete_environment("wide-browser")
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
await client.environments.deleteEnvironment({ id: "wide-browser" });
curl -X DELETE https://agp.eu.hcompany.ai/api/v2/environments/wide-browser \
-H "Authorization: Bearer $HAI_API_KEY"