Write project memory from meetings and agents
A project's memory is a set of Markdown entries in directories. Meetings, automations and agents write entries by path; people read and search them in Youniton.
#The model
- An entry is one Markdown text (CommonMark) at a path in its project, for example
meetings/2026-11-20 kickoff.md. It is a database record, not a file. - A directory is a record too. It can be empty. A write creates the missing parent directories.
- Each entry keeps its source:
person,meetingoragent, with a name for a meeting or an agent. Youniton shows it as a badge, for example Agent · Atlas coding agent.sourceis the first write's;lastSourceis the last write's. - There is no version history: an edit replaces the body.
versionexists only forETagandIf-Match.
#Before you start
Create a personal token with memory:read and memory:write. The member needs the rights "Memory read" and "Memory write" on the project; by default Admins, Product managers and Developers have "Memory write".
#Write by path
#PUT the entry
curl -X PUT "https://app.youniton.example/api/v1/projects/ORB/memory/entries/by-path?path=agents/notes/test" \ -H "Authorization: Bearer $YOUNITON_TOKEN" -H "Content-Type: application/json" \ -d '{"body": "# Notes\n\nWritten by the agent.", "source": {"kind": "agent", "name": "Atlas coding agent"}}' # 201 on the first call: data.path = "agents/notes/test.md" (".md" is added); # the directories agents and agents/notes are createdasync function writeMemory(projectKey, path, markdown, source) { const url = new URL(`https://app.youniton.example/api/v1/projects/${projectKey}/memory/entries/by-path`); url.searchParams.set("path", path); const res = await fetch(url, { method: "PUT", headers: { Authorization: `Bearer ${process.env.YOUNITON_TOKEN}`, "Content-Type": "application/json" }, body: JSON.stringify({ body: markdown, source }), }); if (!res.ok) throw new Error((await res.json()).code); return res.json(); // { data: {...entry}, meta: { outcome: "created" | "updated" | "unchanged" } } } await writeMemory("ORB", "meetings/2026-11-20 kickoff", "# Kickoff\n\n- Scope agreed", { kind: "meeting", name: "Kickoff call" });def write_memory(project_key, path, markdown, source): res = requests.put( f"https://app.youniton.example/api/v1/projects/{project_key}/memory/entries/by-path", params={"path": path}, headers={"Authorization": f"Bearer {os.environ['YOUNITON_TOKEN']}"}, json={"body": markdown, "source": source}, ) res.raise_for_status() return res.json()["meta"]["outcome"] write_memory("ORB", "meetings/2026-11-20 kickoff", "# Kickoff\n\n- Scope agreed", {"kind": "meeting", "name": "Kickoff call"})<?php $res = $client->put('https://app.youniton.example/api/v1/projects/ORB/memory/entries/by-path', [ 'query' => ['path' => 'meetings/2026-11-20 kickoff'], 'headers' => ['Authorization' => 'Bearer ' . getenv('YOUNITON_TOKEN')], 'json' => ['body' => "# Kickoff\n\n- Scope agreed", 'source' => ['kind' => 'meeting', 'name' => 'Kickoff call']], ]);#Repeat it safely
The same body again changes nothing:
200withmeta.outcomeunchanged. A new body replaces the old one:200withupdated. So a meeting automation can send its notes again after an error.If-Matchis optional here. Send it when you must not overwrite a change by a person: a stale version answers412.#Read it back
GET /projects/{projectKey}/memory/entries/by-path curl "https://app.youniton.example/api/v1/projects/ORB/memory/entries/by-path?path=agents/notes/test.md" \ -H "Authorization: Bearer $YOUNITON_TOKEN"
#Path rules
- Youniton adds
.mdto a name without it and changes.markdownto.md.Testing by borisandTesting by boris.mdare the same entry. - A path is unique in its project without regard to letter case.
- A segment has 1–80 characters: letters, digits, space,
._-(). It does not start or end with a space or a dot. - A path has at most 8 directories and 512 characters. One leading
/is removed. - A path that breaks a rule answers
422 memory.path_invalid.
#The body
- CommonMark text in UTF-8, with no NUL and no control character other than tab, LF and CR. An empty body is valid.
- At most the tenant setting
memory.entries.maxBytes(default 1 MiB):422 memory.body_too_large. - Raw HTML stays text. Youniton never shows it as HTML.
#The source
A write with a personal token can set any source. A meeting automation sends {"kind": "meeting", "name": "…"}; an agent sends {"kind": "agent", "name": "…"}. The name is required for meeting and agent (1–120 characters) and absent for person. A write from the Youniton app is always person.
#More operations
- GET
/projects/{projectKey}/memory/entriesList or search the project's memory entries - POST
/projects/{projectKey}/memory/entriesCreate an entry at a new path - GET
/memory/entries/{entryId}One entry with its body - PATCH
/memory/entries/{entryId}Replace the body and/or move the entry to a new path - DELETE
/memory/entries/{entryId}Delete an entry for good - GET
/projects/{projectKey}/memory/directoriesAll directories of the project's memory - POST
/projects/{projectKey}/memory/directoriesCreate a directory (and its missing parents) - PATCH
/memory/directories/{directoryId}Rename or move a directory with its contents - DELETE
/memory/directories/{directoryId}Delete a directory — an empty one, or with everything inside it when recursive
- Search with
q(words of the path, the title or the body), filter bysourceordirectory, and sort bypathorupdated. PATCHandDELETEneedIf-Match. A delete is for good: there is no trash.- A directory with entries is not deleted (
409 memory.directory_not_empty) unless you send?recursive=true. - A project holds at most
memory.entries.perProjectentries (default 5,000) andmemory.directories.perProjectdirectories (default 1,000):409 limit.reached. - The
.mdfile upload is for the Youniton app only; a token uses the JSON operations.
Was this helpful?