curl -X PUT "https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{"instructions": "Use TypeScript strict mode. Always write tests."}'
import requests
response = requests.put(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={"instructions": "Use TypeScript strict mode. Always write tests."},
)
print(response.json()["instructions"])
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions",
{
method: "PUT",
headers: {
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
instructions: "Use TypeScript strict mode. Always write tests.",
}),
}
);
const data = await response.json();
console.log(data.instructions);
{
"session_id": "ses_abc123",
"instructions": "Use TypeScript strict mode. Always write tests."
}
Instructions
Set Session Instructions
Set or update per-session custom instructions
PUT
/
api
/
sessions
/
{session_id}
/
instructions
curl -X PUT "https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{"instructions": "Use TypeScript strict mode. Always write tests."}'
import requests
response = requests.put(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={"instructions": "Use TypeScript strict mode. Always write tests."},
)
print(response.json()["instructions"])
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions",
{
method: "PUT",
headers: {
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
instructions: "Use TypeScript strict mode. Always write tests.",
}),
}
);
const data = await response.json();
console.log(data.instructions);
{
"session_id": "ses_abc123",
"instructions": "Use TypeScript strict mode. Always write tests."
}
Sets or updates the custom instructions for a session. Instructions are passed to the coding agent as additional system context.
Required scope:
context:write
Path Parameters
string
required
The session ID (e.g.
ses_abc123).Headers
string
required
Bearer token. Example:
Bearer runtm_xxxBody
string
required
Custom instructions text. Pass an empty string to clear.
Response
string
Session ID.
string
Updated instructions text.
curl -X PUT "https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{"instructions": "Use TypeScript strict mode. Always write tests."}'
import requests
response = requests.put(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={"instructions": "Use TypeScript strict mode. Always write tests."},
)
print(response.json()["instructions"])
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/instructions",
{
method: "PUT",
headers: {
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
instructions: "Use TypeScript strict mode. Always write tests.",
}),
}
);
const data = await response.json();
console.log(data.instructions);
{
"session_id": "ses_abc123",
"instructions": "Use TypeScript strict mode. Always write tests."
}