Write a process
const url = 'https://api.asklucy.eu/v1/memory/processes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","when":"example","body":"example","reads":["example"],"writes":["example"],"applies_to":["example"],"rationale":"example","scope":"user"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.asklucy.eu/v1/memory/processes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "when": "example", "body": "example", "reads": [ "example" ], "writes": [ "example" ], "applies_to": [ "example" ], "rationale": "example", "scope": "user" }'Creates a process and its first version. In your own scope the
version is accepted and Lucy uses it straight away. For a group
or the organization it is proposed, even when an admin writes
it: an admin accepts it (acceptProcessVersion).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Any unique string (a UUID works). Retries with the same key return the first result.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The steps, in Markdown.
The entities it is about (IDs). They must be shared at least as widely as the process.
Default user. A group:<groupId> must be one of your groups.
Responses
Section titled “Responses”Created
object
1, 2, … in order of creation, proposals included.
proposed: waiting for an admin.accepted: the current version.superseded: was current, replaced by a later version.rejected: an admin turned the proposal down.withdrawn: its author took it back or undid it.
When to use it (the requests or situations it is for).
The steps, in Markdown.
Types of entities and relations it reads.
Types of entities and relations it writes.
The entities it is about (IDs).
Why it was written or changed; empty when not given.
The version it was written from; null for a first version.
A person, or Lucy working for that person. The person is null once their memory was erased.
object
The person’s name.
The conversation Lucy wrote it in; given only to its author.
untrusted_input: Lucy wrote it after reading a file or a tool’s output, which may have steered her. Review it with care.
Example
{ "id": "prv_7Hc2Lw", "state": "proposed", "title": "Answer a custody-fee question", "when": "Someone asks why custody fees changed, or to check a custody invoice.", "reads": [ "company" ], "writes": [ "invoice" ], "applies_to": [ "ent_5Tq9Bm" ], "author": { "kind": "person" }, "flags": [ "untrusted_input" ], "decided_by": { "kind": "person" }}The request is invalid; errors lists what’s wrong.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Missing, expired or invalid token.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The token lacks the role this needs (…/errors/forbidden), or
memory is off for the organization or, in your own scope, for you
(…/errors/memory-disabled; getMemory says which).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.