Skip to main content
In about five minutes you will save a memory, ask EDN for the relevant context, use it with your AI model, and save the new interaction. EDN needs no SDK: it is a plain REST API.

Before you start

You only need three things to follow this Quickstart.
  • An EDN account Create and manage your EDN API key. EDN is currently in private beta: sign in with your invitation at console-beta.tensorpro.ai.
  • A way to call the API This Quickstart includes examples in cURL, Python and TypeScript/Node.js. Choose the one closest to your stack. EDN is a REST API, so you can use it from any language that can make HTTP requests.
  • An API key for your AI model Use this when you call your model in step 5, with your provider’s SDK, such as openai or anthropic. EDN works with any model.

1. Create an API key

Sign in to the Console, then select API Keys in the sidebar. Create a key and copy it. Keep the key secret: never commit it to source control or use it in client-side code. Save the key as an environment variable so every sample below can use it. The second line creates a unique session ID for this Quickstart (see step 3):
This sets the values for your current terminal only. In your own app, set EDN_API_KEY the way you manage other secrets, for example in a .env file or your hosting platform’s settings, and never put the key in your code. The cURL samples use macOS and Linux shell syntax. On Windows, run them in Git Bash or WSL, or use the Python or TypeScript samples.

2. Check the API is reachable

The health check needs no key.
Response

3. Save a memory

Store one user-assistant exchange with POST /api/v1/memory/ingest. session_id identifies the conversation. Use the same value for every turn of a conversation: the command in step 1 created one for you. EDN creates the session the first time you use it.
Response
record_id is the saved conversation turn. fact is the fact EDN saved from the user’s message, or null when the message didn’t state one.

4. Build a SIP

Before each model call, ask EDN for the memory relevant to the user’s message. POST /api/v1/sip/build returns a SIP (Session Initialisation Package): a compact block of relevant memory to place in your model’s prompt. query and session_id are required.
Response (shortened)
records_used is at least 1, and sip contains the memory you saved in step 3. Each memory in the SIP is labelled with its source, for example (ROUND) for a saved conversation. See Provenance for every label.

5. Call your model

Steps 4, 5 and 6 build on each other: in Python or TypeScript, run them in the same file. Call your model as you already do, and add the SIP to the system prompt. EDN does not replace or wrap your model call. The examples show OpenAI and Anthropic; any other model works the same way. With cURL, replace PASTE_THE_SIP_HERE with the sip value from the step 4 response, exactly as it appears between the quotes.

With OpenAI

With Anthropic

6. Save the interaction

Send the new exchange back to EDN so the memory stays up to date. This is the same call as step 3, with the user’s question and your model’s reply.
You now have a complete memory loop. Repeat steps 4 to 6 for every turn of the conversation.
The base URL https://api.tensorpro.ai is the private beta environment.

Next steps

Authentication

How API keys work and how to keep them safe.

How EDN works

The memory lifecycle behind these calls.

API Reference

Every endpoint, with parameters and responses.