Skip to content
Get started

Update

client.projects.instructions.update(stringprojectID, InstructionUpdateParams { content } body, RequestOptionsoptions?): InstructionUpdateResponse { memory }
PUT/projects/{projectId}/instructions

Set the project’s assistant instructions (markdown, max 50KB). Set content to null to clear. Team or project admins only.

ParametersExpand Collapse
projectID: string
body: InstructionUpdateParams { content }
content?: string

Markdown content of the memory. Set to null to clear. Max size depends on the scope (20-50 KB).

ReturnsExpand Collapse
InstructionUpdateResponse { memory }
memory?: Memory { id, content, createdAt, 3 more }

Public JSON shape returned by GET endpoints

id: string

The memory ID — deterministic from scope + parent IDs (example: “mem_team_team_abc”)

content: string

Markdown content of the memory

createdAt: string

ISO 8601 timestamp when the memory was first written

sizeBytes: number

UTF-8 byte length of the content — used for quota enforcement

updatedAt: string

ISO 8601 timestamp when the memory was last updated

updatedBy: string

The userId of the last writer — useful for audit/UI

Update

import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const instruction = await client.projects.instructions.update('projectId');

console.log(instruction.memory);
{
  "memory": {
    "id": "id",
    "content": "content",
    "createdAt": "createdAt",
    "sizeBytes": 0,
    "updatedAt": "updatedAt",
    "updatedBy": "updatedBy"
  }
}
Returns Examples
{
  "memory": {
    "id": "id",
    "content": "content",
    "createdAt": "createdAt",
    "sizeBytes": 0,
    "updatedAt": "updatedAt",
    "updatedBy": "updatedBy"
  }
}