Skip to main content
Build a memory context packet: the same rendered block the Alfera worker receives at the start of every turn, shaped to fit inside a token budget you choose. You can paste rendered directly into your own model prompt, or inspect facts to see exactly which facts made it into the packet.

Endpoint

Required scope: memory.read

Request fields

string
required
The query to build context around. 1 to 2000 characters.
integer
Maximum tokens for the rendered block. 100 to 20000. Defaults to 1500.
object
{ id, name? } as in search. Include it to surface facts about this person in the packet.

Example request

Example response

Response fields

integer
Version of the rendered format. Current value is 1. Pin your prompt parser to this number so format changes do not break your integration.
string
The complete memory block as a string, ready to paste into a prompt.
array
The exact list of facts the rendered block was built from.
Pin your prompt parsing to packet_version. When the rendering format changes, the version number goes up and nothing else about the response does. That gives you a safe migration path.