Skip to content
Get started

Retrieve

client.projects.instructions.retrieve(stringprojectID, RequestOptionsoptions?): InstructionRetrieveResponse { memory }
GET/projects/{projectId}/instructions

Get the project’s assistant instructions (markdown). Returns 404 if not set. Any project member can read.

ParametersExpand Collapse
projectID: string
ReturnsExpand Collapse
InstructionRetrieveResponse { 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

Retrieve

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.retrieve('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"
  }
}