Ai agents
Edit prompts (find & replace)
POST
Find-and-replace in the instructions (system prompt) of several agents at once, without sending whole prompts. All edits apply to all targeted agents, or nothing changes. Saves a prompt version for each changed agent. Owner/admin.
bearer agents:writeheader
AuthorizationBearer <token>API key (rsl_live_…) from Settings → Developers.
Scope: agents:write
application/json- body
agentIds?array<>Agents to edit; omit for all agents of the organization.
Items
items <= 100edits*array<>Items
1 <= items <= 50dryRun?booleanOnly report what would change (previews, problems).
Default
falseexpectedUpdatedAt?array<>Version check (updatedAt from agents_prompt_search or agents_get): nothing changes if an agent was edited meanwhile.
Items
items <= 100Success
application/json- response
applied*booleanproblems*array<>agents*array<>curl -X POST "https://example.com/agents/prompt-edits" \ -H "Content-Type: application/json" \ -d '{ "edits": [ { "find": "string", "replace": "string" } ] }'{ "applied": true, "problems": [ { "target": "string", "edit": 0, "reason": "not_found", "count": 0 } ], "agents": [ { "agentId": "string", "name": "string", "changed": true, "fromLength": 0, "toLength": 0, "updatedAt": 0, "previews": [ { "edit": 0, "before": "string", "after": "string" } ] } ]}