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
Copy file name to clipboardExpand all lines: docs/guides/configure-an-agent.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,10 +59,16 @@ environments:
59
59
packages:
60
60
apt: [git, curl]
61
61
npm: [typescript]
62
+
setup_script: |
63
+
set -euo pipefail
64
+
install -d /data/workspace/.openagentpack
65
+
test -f /data/workspace/.openagentpack/ready || date -u > /data/workspace/.openagentpack/ready
62
66
```
63
67
64
68
Reference an environment from an agent with `environment: dev`.
65
69
70
+
Qoder supports `config.setup_script` for both cloud and self-hosted environments. It runs the script with `/bin/bash -lc` after declared packages are installed. The UTF-8 limit is 64 KB and the timeout is 10 minutes; a non-zero exit prevents the Session from starting. The script runs once per sandbox and runs again when that sandbox is rebuilt, so make it idempotent. Do not embed credentials—use vaults or environment-backed secret references. Other providers currently reject `setup_script` rather than silently ignoring it.
71
+
66
72
## Instructions
67
73
68
74
`instructions` accepts either an inline string or a path to a file:
Copy file name to clipboardExpand all lines: docs/guides/deploy-to-qoder.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,23 @@ providers:
27
27
28
28
A `deployment run` on Qoder creates a native Deployment Run and associated Session. Cron schedules run server-side.
29
29
30
+
## Runtime environment variables
31
+
32
+
Declare `environment_variables` on an Agent to inject variables into its Qoder runtime:
33
+
34
+
```yaml
35
+
agents:
36
+
assistant:
37
+
model: { qoder: auto }
38
+
instructions: Help the user.
39
+
environment: dev
40
+
environment_variables:
41
+
FEATURE_FLAG: "on"
42
+
LOG_LEVEL: debug
43
+
```
44
+
45
+
OpenAgentPack maps this to each Qoder API's native shape: a top-level object on Forward Templates, `config.environment_variables` on Forward Sessions, and the required `KEY=VALUE;...` string on managed Sessions. Other providers reject this Qoder-specific field during validation.
46
+
30
47
## Tool naming
31
48
32
49
Qoder uses PascalCase tool names natively (`Read`, `Glob`, `Grep`, `WebFetch`, `WebSearch`, `Write`, `Edit`, `Bash`). Write tools **lowercase** in config and OpenAgentPack converts them automatically when applying to Qoder — this keeps the same config portable to Bailian, Claude, and Volcengine Ark.
@@ -61,6 +78,12 @@ environments:
61
78
type: cloud
62
79
networking:
63
80
type: unrestricted
81
+
packages:
82
+
npm: ["pnpm@9"]
83
+
setup_script: |
84
+
set -euo pipefail
85
+
install -d /data/workspace/.openagentpack
86
+
test -f /data/workspace/.openagentpack/ready || printf 'ready\n' > /data/workspace/.openagentpack/ready
Qoder runs `setup_script` after package installation with `/bin/bash -lc`. Scripts are limited to 64 KB of UTF-8 text and 10 minutes, and a non-zero exit prevents Session startup. Make them idempotent because they run again whenever the sandbox is rebuilt. Use vaults for credentials; never place secrets directly in a script. Qoder package declarations accept `apt`, `npm`, and `pip` only.
100
+
76
101
## What Qoder uniquely supports
77
102
78
103
- **Memory stores** — persistent context for an agent. See [`examples/qoder/with-memory/`](../../examples/qoder/with-memory/).
| `config.setup_script` | string | no | Sandbox setup script. Qoder runs it with `/bin/bash -lc` after package installation; maximum UTF-8 size is 64 KB. Other providers currently reject this field. |
148
150
| `metadata` | map<string,string> | no | Free-form metadata. |
149
151
152
+
Qoder accepts only `apt`, `npm`, and `pip` in package requests. Its API may return empty `cargo`, `gem`, and `go` arrays as reserved response fields, but declaring non-empty values for them is rejected locally. Setup scripts run while a new sandbox is prepared, time out after 10 minutes, and a non-zero exit prevents the Session from starting. Keep scripts idempotent and use vault-backed credentials instead of embedding secrets.
153
+
154
+
For a managed Qoder `self_hosted` environment, `config` accepts only `type` and optional `setup_script`; networking and packages belong to cloud environments. External `environment_id` references remain unmanaged.
| `environment_variables` | map<string,string> | no | Qoder runtime variables. Managed Sessions use Qoder's `KEY=VALUE;...` wire format; Forward Templates store the map as defaults and Forward Sessions send it under `config.environment_variables`. |
269
277
| `resources` | SessionResource[] | no | Resources attached to every managed Session created for the Agent. |
270
278
| `multiagent.type` | `"coordinator"` | no | Declare a coordinator agent. |
0 commit comments