Quickstart
KAPEX is memory middleware for apps that people come back to. It sits between your app and the model your app calls: before each reply, your app asks KAPEX for a short note about this person, and after the reply, your app sends KAPEX the new turn.
What runs today
Nothing you can call yet. There is no public endpoint and no hosted sandbox, and self-service signup is closed. The Python and TypeScript clients are in our code repository, which is private, and are not published to PyPI or npm, and the container image is not on a registry. The code on this page shows the shape of an integration. It will not run for you yet.
Access opens through the waitlist at getkapex.ai/waitlist. If you want to talk about an integration before then, write to support@sandstonecloud.com. A person reads it.
The loop, around each reply
An integration is four steps around the model call your app already makes. Two of them are calls to KAPEX.
- Before your model answers, ask KAPEX for the context for this person and this message.
- Put what comes back in your system prompt.
- Call your model as you do now.
- After the reply, send the turn to KAPEX.
If you are starting now, start on the /api/v1 routes. It is the set that does everything the control page on getkapex.ai promises a person.
# Before your model answers: ask what matters about this person for this message
curl -X POST "$KAPEX_URL/api/v1/context/items" \
-H "X-API-Key: $KAPEX_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "ana", "message": "Can you plan me an easy week of runs?"}'
# Write the sentence from each item into your system prompt, then call your model
# After the reply: send the turn, one message per call
curl -X POST "$KAPEX_URL/api/v1/ingest/v2" \
-H "X-API-Key: $KAPEX_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "ana", "speaker": "user",
"message": "Can you plan me an easy week of runs?"}'
curl -X POST "$KAPEX_URL/api/v1/ingest/v2" \
-H "X-API-Key: $KAPEX_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "ana", "speaker": "assistant",
"message": "Here is a gentle week, mostly short runs and one rest day."}'
Shape only. There is no endpoint to send this to yet.
The key goes in an X-API-Key header. The user_id is your app's own id for that person. From /context/items you get items, each with what it is about, a sentence and a date, and no scores; the sentences are plain text, so they can go in front of whichever model your app calls.
The other set, /api/b2c/memory, runs the same loop with POST /retrieve and POST /turn and hands back one block of text. The two sets do not share memory. The API reference shows both.
Where the rest is
- Authentication: which key goes in which header, and where keys come from.
- API reference: both sets of routes, a person's controls, and errors.
- Deleting and exporting: what each delete, erase and export call does.
- MCP server: what it calls today, and why to use REST for now.
The developer page on getkapex.ai covers the same ground in prose: getkapex.ai/developers.