Skip to content

List facts

GET
/memory/facts
curl --request GET \
--url 'https://api.asklucy.eu/v1/memory/facts?limit=25&scope=user' \
--header 'Authorization: Bearer <token>'

Live facts you can see, newest first. With q, one page of the best matches (no next_cursor). Facts that were replaced are left out; your own are in exportMemory.

cursor
string

The next_cursor of the previous page.

limit
integer
default: 25 >= 1 <= 100
scope

Who a piece of memory is for: user (only you, and Lucy when she works for you), group:<groupId> (the members of a group from the identity provider) or org (everyone in the organization).

string
/^(user|org|group:.+)$/

Only this scope. Without it, everything you can see.

entity_id
string
/^ent_[A-Za-z0-9]+$/

Only the facts about this entity.

q
string
<= 500 characters

Search by meaning, words and names, in any language.

OK

Media typeapplication/json
object
data
required
Array<object>

One statement about an entity, with where it comes from. Facts are never changed; a correction replaces them.

object
id
required
string
entity
required
object
id
required
string
type
required
string
name
required
string
text
required
string
<= 500 characters
scope
required

Who a piece of memory is for: user (only you, and Lucy when she works for you), group:<groupId> (the members of a group from the identity provider) or org (everyone in the organization).

string
/^(user|org|group:.+)$/
valid_from
required

Since when it holds, when known.

string | null format: date
valid_to
required

Until when it held, when known.

string | null format: date
recorded_at
required

When Lucy learned it.

string format: date-time
invalidated_at
required

When it was replaced or found wrong; null while it is live.

string | null format: date-time
superseded_by
required

The fact that replaced it.

string | null
source
required

Where it comes from. The conversation, message and file are given only to the person they belong to (null for others).

object
kind
required
string
Allowed values: said_by_person from_file from_tool inferred
user_id
required

The person who said it, or for whom Lucy was working.

string | null
conversation_id
required
string | null
message_id
required
string | null
file_id
required
string | null
next_cursor
required
string | null

Example

{
"data": [
{
"id": "fact_2Rk8Vp",
"entity": {
"id": "ent_5Tq9Bm",
"type": "company"
},
"text": "Custody fees are billed quarterly, in arrears.",
"scope": "user",
"source": {
"kind": "said_by_person"
}
}
]
}

The request is invalid; errors lists what’s wrong.

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
quota

For quota-exceeded, the window that is used up.

object
window
required
string
Allowed values: five_hours week month
percent_used
required
number
<= 100
resets_at
required

Null for a rolling window that hasn’t started.

string | null format: date-time
limited_by
required

organization when the organization’s budget is closer to running out than the member’s own limit.

string
Allowed values: personal organization
request
One of:

A request as its member sees it, where they asked.

object
id
required
string
status
required
string
Allowed values: pending approved declined withdrawn
created_at
required
string format: date-time
decided_at
required
string | null format: date-time
note
required

What the admin who decided wrote back.

string | null
errors

Field-level problems (400 only).

Array<object>
object
field
required

JSON pointer into the request body.

string
message
required
string

Example

{
"type": "https://docs.asklucy.eu/errors/answer-in-progress",
"quota": {
"window": "five_hours",
"limited_by": "personal",
"request": {
"status": "pending"
}
}
}
X-Request-Id
string

Unique per request; quote it to support.

Missing, expired or invalid token.

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
quota

For quota-exceeded, the window that is used up.

object
window
required
string
Allowed values: five_hours week month
percent_used
required
number
<= 100
resets_at
required

Null for a rolling window that hasn’t started.

string | null format: date-time
limited_by
required

organization when the organization’s budget is closer to running out than the member’s own limit.

string
Allowed values: personal organization
request
One of:

A request as its member sees it, where they asked.

object
id
required
string
status
required
string
Allowed values: pending approved declined withdrawn
created_at
required
string format: date-time
decided_at
required
string | null format: date-time
note
required

What the admin who decided wrote back.

string | null
errors

Field-level problems (400 only).

Array<object>
object
field
required

JSON pointer into the request body.

string
message
required
string

Example

{
"type": "https://docs.asklucy.eu/errors/answer-in-progress",
"quota": {
"window": "five_hours",
"limited_by": "personal",
"request": {
"status": "pending"
}
}
}
X-Request-Id
string

Unique per request; quote it to support.

The token is valid but lacks the role this needs.

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
quota

For quota-exceeded, the window that is used up.

object
window
required
string
Allowed values: five_hours week month
percent_used
required
number
<= 100
resets_at
required

Null for a rolling window that hasn’t started.

string | null format: date-time
limited_by
required

organization when the organization’s budget is closer to running out than the member’s own limit.

string
Allowed values: personal organization
request
One of:

A request as its member sees it, where they asked.

object
id
required
string
status
required
string
Allowed values: pending approved declined withdrawn
created_at
required
string format: date-time
decided_at
required
string | null format: date-time
note
required

What the admin who decided wrote back.

string | null
errors

Field-level problems (400 only).

Array<object>
object
field
required

JSON pointer into the request body.

string
message
required
string

Example

{
"type": "https://docs.asklucy.eu/errors/answer-in-progress",
"quota": {
"window": "five_hours",
"limited_by": "personal",
"request": {
"status": "pending"
}
}
}
X-Request-Id
string

Unique per request; quote it to support.