Write a memory
Creates the memory or replaces its content, as the memory tool's create does, and records a version with the caller as its actor. This is how an app seeds an Agent's memory. With contentSha256 the write applies only while the memory still has that content ("": only while no memory has the path); otherwise 409 memory_conflict with the current memory. The path ends in .md; the Runtime limits memoryBytes (413) and memoriesPerAgent (409 limit_exceeded) hold.
AuthorizationBearer <token>An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).
agentId*stringThe Agent id, percent-encoded
path*stringThe memory's path under /memories, percent-encoded: conventions%2Frelease.md is /memories/conventions/release.md
Nylorun-Protocol*stringThe protocol version, 18
Nylorun-Subject?stringThe person an application key acts for
Nylorun-Scopes?stringThe subject's space-separated scopes; required with a subject
application/json- body
content*stringcontentSha256?stringThe memory as written
application/json- response
path*stringbytes*integer0 <= valuecontentSha256*stringdescription*string|nullversion*integer0 < valueupdatedAt*stringcontent*stringimport { createClient } from "@nylorun/agents";const client = await createClient();await client.agents.memories.put( "users/alice/assistant", "conventions/release.md", "---\ndescription: How we cut a release\n---\nTag from main after CI passes.\n", { contentSha256: "" }, // only while no memory has the path; else 409 memory_conflict);{ "path": "string", "bytes": 0, "contentSha256": "string", "description": "string", "version": 1, "updatedAt": "string", "content": "string"}