Configure memory for a character
Toggle Long-Term Memory on or off per character via the Convai dashboard or the CharacterService scripting API, and understand the global scope implications.
Enable or disable memory
using Convai.RestAPI;
using UnityEngine;
public class MemoryAdmin : MonoBehaviour
{
private async void Start()
{
using var client = new ConvaiRestClient(ConvaiSettings.Instance.ApiKey);
bool isEnabled = await client.Characters.GetMemoryEnabledAsync("your-character-id");
Debug.Log($"LTM enabled: {isEnabled}");
}
}using Convai.RestAPI;
using UnityEngine;
public class MemoryAdmin : MonoBehaviour
{
private async void Start()
{
using var client = new ConvaiRestClient(ConvaiSettings.Instance.ApiKey);
await client.Characters.SetMemoryEnabledAsync("your-character-id", true);
Debug.Log("Long-term memory enabled.");
}
}Disable memory without deleting records
Next steps
End-user identityManage end-user recordsLast updated
Was this helpful?