EDN_API_KEY and EDN_SESSION_ID environment variables
from the Quickstart, and this setup:
Get context for a turn
Build a SIP with the user’s latest message, then putsip in your model’s
system prompt:
sip is empty, there is no relevant memory, so call your model without it.
Get context from a project
To answer from one project’s memory and documents, addproject_id. Add
include_global: true if general memory should be included too:
citations to show each number’s source to your user. See
Citations.
Help with follow-up questions
Short follow-ups like “and who approves it?” have little to search on. Save each message to the session as the conversation goes:Search memory directly
To look up memory without building a SIP, for example for a search box in your app, useGET /api/v1/retrieval/search:
Response (shortened)
- Results are ordered by
similarity; higher means a closer match. limitdefaults to 10. Values above 50 are treated as 50.- Search covers general memory only, not project memory, and only records that can be used as context.
Next steps
The SIP
Every response field explained.
Writing memory
Save each turn after the model replies.
Quickstart
The full loop in five minutes.
