You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add environment and config usage documentation
Add documentation for the config parameter including:
- environment_id for cloud environments
- model_id, name, and base_prompt options
- MCP server configuration examples
Link to Warp docs for environment setup instructions.
Co-Authored-By: Warp <agent@warp.dev>
Copy file name to clipboardExpand all lines: README.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,67 @@ const response = await client.agent.run({ prompt: 'Fix the bug in auth.go' });
31
31
console.log(response.task_id);
32
32
```
33
33
34
+
### Using environments and configuration
35
+
36
+
You can configure the agent with a custom environment and other settings using the `config` parameter:
37
+
38
+
<!-- prettier-ignore -->
39
+
```ts
40
+
importWarpAPIfrom'warp-sdk';
41
+
42
+
const client =newWarpAPI();
43
+
44
+
const response =awaitclient.agent.run({
45
+
prompt: 'Fix the bug in auth.go',
46
+
config: {
47
+
environment_id: 'your-environment-id', // UID of a cloud environment
48
+
model_id: 'claude-sonnet-4', // Optional: specify the LLM model
49
+
name: 'bug-fix-config', // Optional: config name for traceability
50
+
base_prompt: 'You are a helpful coding assistant.', // Optional: custom base prompt
51
+
},
52
+
});
53
+
54
+
console.log(response.task_id);
55
+
```
56
+
57
+
#### Configuration options
58
+
59
+
The `config` parameter accepts the following fields:
60
+
61
+
-`environment_id`: UID of a cloud environment to run the agent in. Environments define the Docker image, GitHub repositories, and setup commands for agent execution. See [Creating an Environment](https://docs.warp.dev/integrations/integrations-overview/integrations-and-environments#creating-an-environment) for setup instructions.
62
+
-`model_id`: LLM model to use (uses workspace default if not specified)
63
+
-`name`: Config name for searchability and traceability
64
+
-`base_prompt`: Custom base prompt for the agent
65
+
-`mcp_servers`: Map of MCP server configurations by name
66
+
67
+
#### MCP server configuration
68
+
69
+
You can configure MCP servers to extend the agent's capabilities:
70
+
71
+
<!-- prettier-ignore -->
72
+
```ts
73
+
const response =awaitclient.agent.run({
74
+
prompt: 'Check my GitHub issues',
75
+
config: {
76
+
environment_id: 'your-environment-id',
77
+
mcp_servers: {
78
+
github: {
79
+
warp_id: 'your-shared-mcp-server-id', // Reference a Warp shared MCP server
0 commit comments