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
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,64 @@ response = client.agent.run(
38
38
print(response.task_id)
39
39
```
40
40
41
+
### Using environments and configuration
42
+
43
+
You can configure the agent with a custom environment and other settings using the `config` parameter:
44
+
45
+
```python
46
+
from warp_sdk import WarpAPI
47
+
48
+
client = WarpAPI()
49
+
50
+
response = client.agent.run(
51
+
prompt="Fix the bug in auth.go",
52
+
config={
53
+
"environment_id": "your-environment-id", # UID of a cloud environment
54
+
"model_id": "claude-sonnet-4", # Optional: specify the LLM model
55
+
"name": "bug-fix-config", # Optional: config name for traceability
56
+
"base_prompt": "You are a helpful coding assistant.", # Optional: custom base prompt
57
+
},
58
+
)
59
+
print(response.task_id)
60
+
```
61
+
62
+
#### Configuration options
63
+
64
+
The `config` parameter accepts the following fields:
65
+
66
+
-`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.
67
+
-`model_id`: LLM model to use (uses workspace default if not specified)
68
+
-`name`: Config name for searchability and traceability
69
+
-`base_prompt`: Custom base prompt for the agent
70
+
-`mcp_servers`: Map of MCP server configurations by name
71
+
72
+
#### MCP server configuration
73
+
74
+
You can configure MCP servers to extend the agent's capabilities:
75
+
76
+
```python
77
+
response = client.agent.run(
78
+
prompt="Check my GitHub issues",
79
+
config={
80
+
"environment_id": "your-environment-id",
81
+
"mcp_servers": {
82
+
"github": {
83
+
"warp_id": "your-shared-mcp-server-id", # Reference a Warp shared MCP server
0 commit comments