openclaw_agents_files_set
Write or overwrite an agent file by providing agent ID, file path or name, and content. Existing content is replaced without confirmation.
Instructions
Write or overwrite an agent file. Wraps agents.files.set. Destructive — overwrites existing content silently. Pass agentId, path or name, and content or body (gateway accepts both names depending on version).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | File body. Older alias for `content`; pass either, not both. | |
| name | No | File basename. Pass either this or `path`. | |
| path | No | Full file path (e.g. 'system.md'). Pass either this or `name`. | |
| agentId | Yes | ||
| content | No | File body. Newer field name. | |
| instance | No | Optional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list. |