Skip to main content
POST
Build a SIP
Use this endpoint before each model call to get the memory that matters for the user’s message. EDN returns it as a SIP (Session Initialisation Package): a block of text you put in your model’s system prompt. A typical chat turn uses two calls: this one before your model replies, and Save a conversation turn after.

What EDN does

  1. Finds the memories most relevant to query.
  2. Leaves out unconfirmed AI memories, replaced memories and deleted memories.
  3. With project_id, uses the project’s memory and numbers each item [1], [2] and so on, for citations.
  4. Returns the SIP text, ready to put in your prompt.

Required headers

Request

Response

200 OK

Important behavior

  • Without project_id, EDN builds from your general memory.
  • With project_id, EDN builds only from that project (plus general memory if include_global is true). Your model can cite items as [n], and citations tells you the source behind each number.
  • abstain: true means the project has nothing relevant. The SIP tells the model to say so instead of guessing.
  • Each call counts toward your daily limit on building SIPs.

Errors

See Error handling.

Authorizations

Authorization
string
header
required

Your EDN API key, sent as Bearer YOUR_API_KEY. Create keys in the Console.

Body

application/json
query
string
required

What the user just asked. EDN selects the memories most relevant to it.

Minimum string length: 1
Example:

"Who manages the website project?"

session_id
string
required

The session the question belongs to.

Required string length: 1 - 128
Example:

"chat-42"

include_global
boolean
default:false

With project_id, also use your general memory. Ignored without project_id.

project_id
string | null

Build from this project's memory and documents instead of general memory. The SIP then numbers each item [1], [2] and so on for citations.

Response

Successful Response

records_used
integer
required

How many memory records the SIP contains.

sip
string
required

The memory context to put in your model's prompt, ahead of the user's message.

abstain
boolean
default:false

true when a project build found nothing relevant. The SIP then tells the model to say it doesn't know.

citations
SipCitation · object[]

One entry per numbered item in a project SIP. Empty otherwise.

grounded
boolean
default:false

true when you sent project_id. The SIP then tells the model to answer only from the project's sources.