Skip to main content
POST
/
env
/
create
JavaScript
import Client from 'agentlin_client';

const client = new Client({
  apiKey: process.env['AGENTLIN_API_KEY'], // This is the default and can be omitted
});

const env = await client.env.create();

console.log(env.env_id);
{
  "session_id": "<string>",
  "env_id": "<string>",
  "initial_state": {},
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "<string>",
        "parameters": {},
        "description": "<string>",
        "strict": false
      }
    }
  ],
  "done": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

创建环境请求

session_id
string | null
env_id
string | null
user_id
string | null
client_id
string
default:default
env_vars
Env Vars · object
env_class_path
string | null
env_init_kwargs
Env Init Kwargs · object

Response

Successful Response

创建环境响应

session_id
string
required
env_id
string
required
initial_state
Initial State · object
required
tools
Tools · object[]
required
done
boolean
default:false