How to find your contexts
Your contexts live inside the Surrealist dashboard right next to your SurrealDB Cloud instances and are thus visible the moment you select your organisation from the front menu.
To create your first context, choose Create context, give it a name, and select a region where it will be deployed.
Note
Adding conversational knowledge
The easiest way to begin experimenting with a context is by opening up the Playground. This allows you to chat with the agent and watch as memories are formed. You will be able to see a stream of new memories, along with retrieved memories that show what has been recalled by the agent as you chat.
Viewing memories
Once your chat is done, open Memories from the sidebar, where you can inspect the memory graph built from your conversation with the agent.
Adding knowledge
From the sidebar, open Knowledge to go beyond chat-only data to add source-backed knowledge. Inside this view you will see the kinds of sources you can plug in, for example:
PDF
Markdown
JSON
Documents
Web pages
Images
Audio
Media
If you don't have any knowledge sources off hand that you'd like to add, try copying this sample mini dataset in JSON format containing some information on various musical instruments.
API keys
To add knowledge to your context outside of the Surrealist UI, you will want to go to the API keys page to get an API key. This will allow you to interact with a context through cURL commands or your preferred SDK language.
Inside this window you can see your base Spectron url, a random ID for your context (06eqs1luktt4d505nfchtdrfmo, for example) and a section to manage your API keys. While you can create multiple API keys, the actual key will only be displayed once so be sure to save it.
The easiest way to experiment with a new API key is to click on the cURL section, which contains a few examples that only require you to paste in your API key to use. They can then be pasted into a terminal window to see the result.
The same section includes sample queries of the same nature for various programming languages such as JavaScript, Python, and Rust.
Endpoints
The endpoints available to work with your context through an API key are as follows:
add_memorycreate_memory_fielddelete_memoryget_memoryget_memory_llm_usagehealth_checkis_memory_ingestinglist_memorieslist_memory_fieldsquery